From 35ccd9c2fe058ed76be905d9efe06c31c11fd696 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Wed, 8 Jul 2015 15:13:16 -0600 Subject: [PATCH] Revert Count API module instantiations and Hook runs 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 | 1 - includes/api/ApiMain.php | 2 -- 2 files changed, 3 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 28c54d2033..036d65c71e 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -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 ) ) { diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 46dc7dff9e..f2059d759e 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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 ) ); -- 2.20.1