Robert Vogel has uploaded a new change for review.

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

Change subject: refreshLinks.php: Added switch for tag hooks
......................................................................

refreshLinks.php: Added switch for tag hooks

Added a switch that allows to include extension tag hooks in the
processing.

This change was sugessted on MediaWiki-l:
http://markmail.org/message/55bemgwqrvyy7fav

Change-Id: I2f67209a682081c79c90b46e2356ca6b103aee27
---
M maintenance/refreshLinks.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/265262/1

diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index a0cd6a9..15c7b07 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -39,6 +39,7 @@
                $this->addOption( 'e', 'Last page id to refresh', false, true );
                $this->addOption( 'dfn-chunk-size', 'Maximum number of existent 
IDs to check per ' .
                        'query, default 100000', false, true );
+               $this->addOption( 'taghooks', 'Leave tag hooks of the parser 
enabled', false, false );
                $this->addArg( 'start', 'Page_id to start from, default 1', 
false );
                $this->setBatchSize( 100 );
        }
@@ -85,8 +86,10 @@
                // Give extensions a chance to optimize settings
                Hooks::run( 'MaintenanceRefreshLinksInit', array( $this ) );
 
-               # Don't generate extension images (e.g. Timeline)
-               $wgParser->clearTagHooks();
+               if ( !$this->getOption( 'taghooks', false ) ) {
+                       # Don't generate extension images (e.g. Timeline)
+                       $wgParser->clearTagHooks();
+               }
 
                $what = $redirectsOnly ? "redirects" : "links";
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f67209a682081c79c90b46e2356ca6b103aee27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>

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

Reply via email to