VictorPorton has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330815 )

Change subject: which works once per twice :-(
......................................................................

which works once per twice :-(

Change-Id: I1f2a101e219f3228cbced6f3078f256b0ecc4800
---
M NamespacePopups.hooks.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NamespacePopups 
refs/changes/15/330815/1

diff --git a/NamespacePopups.hooks.php b/NamespacePopups.hooks.php
index cf51ee9..c629b90 100644
--- a/NamespacePopups.hooks.php
+++ b/NamespacePopups.hooks.php
@@ -2,6 +2,14 @@
 
 // use MediaWiki\Title;
 
+function var_dump_ret($mixed = null) {
+  ob_start();
+  var_dump($mixed);
+  $content = ob_get_contents();
+  ob_end_clean();
+  return $content;
+}
+
 class NamespacePopupsHooks {
        public static function onHtmlPageLinkRendererEnd( $renderer, $target, 
$isKnown, &$text, &$attribs, &$ret ) {
                 global $wgNamespacePopupsNamespaceMap, 
$wgNamespacePopupsAnchor, $wgArticlePath;
@@ -69,9 +77,10 @@
 
                         $parserOutput->addLink( 
Title::newFromDBkey($popupPage) );
                         $flag = TRUE;
+                        wfDebugLog( 'namespacepopups', "[[$popupPage]]" );
                 }
 
-//                 if(!$flag) return; // update nothing
+                if(!$flag) return; // update nothing
 
                 try {
                         $ourTitle = $page->getPageTitle();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f2a101e219f3228cbced6f3078f256b0ecc4800
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NamespacePopups
Gerrit-Branch: master
Gerrit-Owner: VictorPorton <por...@narod.ru>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to