Pastakhov has uploaded a new change for review.

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

Change subject: merge OutputPageParserOutput hook to ParserAfterTidy hook (v 
3.11.0)
......................................................................

merge OutputPageParserOutput hook to ParserAfterTidy hook (v 3.11.0)

Change-Id: I8d83792a864eaaede608d86c31f9d6cd5c4a41e7
---
M PhpTags.body.php
M PhpTags.php
2 files changed, 11 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags 
refs/changes/08/172508/1

diff --git a/PhpTags.body.php b/PhpTags.body.php
index c77b1e5..3060961 100644
--- a/PhpTags.body.php
+++ b/PhpTags.body.php
@@ -171,20 +171,6 @@
                \PhpTags\Runtime::$transit[PHPTAGS_TRANSIT_PPFRAME] = $frame;
        }
 
-       public static function onOutputPageParserOutput() {
-               wfProfileIn( __METHOD__ );
-               global $wgPhpTagsCounter, $wgPhpTagsBytecodeExptime;
-
-               if ( $wgPhpTagsCounter > 0 ) {
-                       if ( $wgPhpTagsBytecodeExptime > 0 && 
self::$bytecodeNeedsUpdate ) {
-                               self::updateBytecodeCache();
-                       }
-                       PhpTags::reset();
-               }
-
-               wfProfileOut( __METHOD__ );
-       }
-
        private static function updateBytecodeCache() {
                global $wgPhpTagsBytecodeExptime;
 
@@ -295,6 +281,9 @@
        }
 
        public static function onParserAfterTidy( &$parser, &$text ) {
+               global $wgPhpTagsBytecodeExptime;
+               wfProfileIn( __METHOD__ );
+
                if ( self::$globalVariablesScript ) {
                        $vars = array();
                        foreach ( self::$globalVariablesScript as $key=> $value 
) {
@@ -306,6 +295,12 @@
                                )
                        );
                }
+               if ( $wgPhpTagsBytecodeExptime > 0 && 
self::$bytecodeNeedsUpdate ) {
+                       self::updateBytecodeCache();
+               }
+               self::reset();
+
+               wfProfileOut( __METHOD__ );
                return true;
        }
 
diff --git a/PhpTags.php b/PhpTags.php
index 26e6706..965db85 100644
--- a/PhpTags.php
+++ b/PhpTags.php
@@ -16,8 +16,8 @@
 }
 
 const PHPTAGS_MAJOR_VERSION = 3;
-const PHPTAGS_MINOR_VERSION = 10;
-const PHPTAGS_RELEASE_VERSION = 2;
+const PHPTAGS_MINOR_VERSION = 11;
+const PHPTAGS_RELEASE_VERSION = 0;
 define( 'PHPTAGS_VERSION', PHPTAGS_MAJOR_VERSION . '.' . PHPTAGS_MINOR_VERSION 
. '.' . PHPTAGS_RELEASE_VERSION );
 
 const PHPTAGS_HOOK_RELEASE = 5;
@@ -54,15 +54,6 @@
 $wgHooks['CodeMirrorGetExtensionMode'][] = 'PhpTags::getCodeMirrorMode';
 
 $wgPhpTagsCounter = 0;
-
-/**
- * @codeCoverageIgnore
- */
-$wgHooks['OutputPageParserOutput'][] = function () use ( &$wgPhpTagsCounter ) {
-       if ( $wgPhpTagsCounter > 0 ) {
-               \PhpTags::onOutputPageParserOutput();
-       }
-};
 
 /**
  * @codeCoverageIgnore

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d83792a864eaaede608d86c31f9d6cd5c4a41e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTags
Gerrit-Branch: master
Gerrit-Owner: Pastakhov <[email protected]>

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

Reply via email to