From 17369b2f14734f0c9bad0984912a085d35cc0c0f Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Tue, 24 Jul 2012 16:14:04 +0000 Subject: [PATCH] Replaced $initalize Plugin class member by static one --- .../phpunit_autotest_plugin_manager/plugin.mibew.inc.php | 2 +- src/messenger/webim/libs/classes/plugin.php | 2 +- src/messenger/webim/libs/classes/plugin_manager.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/messenger/tests/webim/libs/classes/phpunit_autotest_plugin_manager/plugin.mibew.inc.php b/src/messenger/tests/webim/libs/classes/phpunit_autotest_plugin_manager/plugin.mibew.inc.php index 98c21e9a..dc6e052c 100644 --- a/src/messenger/tests/webim/libs/classes/phpunit_autotest_plugin_manager/plugin.mibew.inc.php +++ b/src/messenger/tests/webim/libs/classes/phpunit_autotest_plugin_manager/plugin.mibew.inc.php @@ -33,7 +33,7 @@ Class Phpunit_autotest_plugin_managerPlugin extends Plugin{ } public function __construct(){ - $this->initialized = true; + self::$initialized = true; } } diff --git a/src/messenger/webim/libs/classes/plugin.php b/src/messenger/webim/libs/classes/plugin.php index 7b67029e..ca4be31d 100644 --- a/src/messenger/webim/libs/classes/plugin.php +++ b/src/messenger/webim/libs/classes/plugin.php @@ -25,7 +25,7 @@ abstract Class Plugin { * failures * @var boolean */ - public $initialized = false; + public static $initialized = false; /** * An array of plugin configuration diff --git a/src/messenger/webim/libs/classes/plugin_manager.php b/src/messenger/webim/libs/classes/plugin_manager.php index f653d46f..8bae5176 100644 --- a/src/messenger/webim/libs/classes/plugin_manager.php +++ b/src/messenger/webim/libs/classes/plugin_manager.php @@ -78,7 +78,7 @@ Class PluginManager { } // Add plugin to loading queue $plugin_instance = new $plugin_classname($plugin_config); - if ($plugin_instance->initialized) { + if ($plugin_classname::$initialized) { $loading_queue[$plugin_instance->getWeight() . "_" . $offset] = $plugin_instance; $offset++; } else {