Revert Count API module instantiations and Hook runs
authorBryan Davis <bd808@wikimedia.org>
Wed, 8 Jul 2015 21:13:16 +0000 (15:13 -0600)
committerBryan Davis <bd808@wikimedia.org>
Wed, 8 Jul 2015 21:13:16 +0000 (15:13 -0600)
Reverts I6f807adc9cbf71c5d7b83c7eec43965dce1d2a16 and
Ic04daf475b936b942833362c7a979dde671b3ef4

When this hit group1 wikis statsite went nuts with errors like:
* "Failed value conversion! Input: :moduleManager:1"
* "Failed value conversion! Input: :getMessagesFileName:1"
* "Failed value conversion! Input: :get:1"

Change-Id: If0237cdd0d66634d75b2bab8bc4292c0f3ef75ef

includes/Hooks.php
includes/api/ApiMain.php

index 28c54d2..036d65c 100644 (file)
@@ -135,7 +135,6 @@ class Hooks {
         *   returning null) is equivalent to returning true.
         */
        public static function run( $event, array $args = array(), $deprecatedVersion = null ) {
-               RequestContext::getMain()->getStats()->increment( 'hooks.' . $event );
                foreach ( self::getHandlers( $event ) as $hook ) {
                        // Turn non-array values into an array. (Can't use casting because of objects.)
                        if ( !is_array( $hook ) ) {
index 46dc7df..f2059d7 100644 (file)
@@ -1090,8 +1090,6 @@ class ApiMain extends ApiBase {
                $this->checkAsserts( $params );
 
                // Execute
-               $this->getContext()->getStats()->increment(
-                       'api.modules.' . strtr( $module->getModulePath(), '+', '.' ) );
                $module->execute();
                Hooks::run( 'APIAfterExecute', array( &$module ) );