Skip to content

Commit 820d065

Browse files
authored
Update Hooks.php - re-add "Use418" setting
1 parent 5e27d2d commit 820d065

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

includes/Hooks.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ public function onSpecialPageBeforeExecute( $special, $subPage ) {
104104
$protectedSpecialPages = $config->get( 'CrawlerProtectedSpecialPages' );
105105
$customDenialHeader = $config->get( 'CrawlerProtectionDenialHeader' );
106106
$customDenialText = $config->get( 'CrawlerProtectionDenialText' );
107+
$use418 = $config->get( 'CrawlerProtectionUse418' );
108+
if ( $customDenialHeader === null && $customDenialText === null && $use418 ) {
109+
$customDenialHeader = 'HTTP/1.0 I\'m a teapot';
110+
$customDenialText = 'I\'m a teapot';
111+
}
107112

108113
// Normalize protected special pages: lowercase and strip 'Special:' prefix
109114
$normalizedProtectedPages = array_map(

0 commit comments

Comments
 (0)