Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/246299

Change subject: Slightly tighten check on empty pages
......................................................................

Slightly tighten check on empty pages

- Skip categories, they're often empty
- Check for NewPP in first 10 chars, not 50. Should be 6 in
  the empty scenario

Change-Id: I994a66a0fb9b843ad0c5d1cf012809b501e1b5ff
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/99/246299/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index cbfe59a..0e412d5 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -242,9 +242,9 @@
 // from site outage. -- Chad, 2015-10-14
 $wgHooks['RejectParserCacheValue'][] = function( ParserOutput $parserOutput, 
$page, ParserOptions $popts ) {
        $text = trim( $parserOutput->getText() );
+       $title = $page->getTitle();
        $pos = strpos( $text, 'NewPP' );
-       if ( $pos !== false && $pos < 50 ) {
-               $title = $page->getTitle();
+       if ( $title->getNamespace() != NS_CATEGORY && $pos !== false && $pos < 
10 ) {
                LoggerFactory::getInstance( 'T115505' )->info(
                        'Purging empty content page: ' . 
$title->getPrefixedDBkey()
                );

-- 
To view, visit https://gerrit.wikimedia.org/r/246299
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I994a66a0fb9b843ad0c5d1cf012809b501e1b5ff
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to