From 72fbe9084b1c53a198c7e5623f965af60240a8bc Mon Sep 17 00:00:00 2001 From: megan_w Date: Wed, 21 Nov 2007 06:55:40 +0000 Subject: [PATCH] KTS-2708 "Refactor plugins registration and loading" Updated. Added in the code to call the setup function on registering the plugin. --- lib/plugins/plugin.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/plugins/plugin.inc.php b/lib/plugins/plugin.inc.php index 552596c..f14502a 100644 --- a/lib/plugins/plugin.inc.php +++ b/lib/plugins/plugin.inc.php @@ -672,7 +672,7 @@ class KTPlugin { 'friendlyname' => $friendly_name, )); // FIXME we -really- need to raise an error here, somehow. - return $oEntity; + //return $oEntity; } else { $oEntity->updateFromArray(array( 'path' => $this->stripKtDir($this->sFilename), @@ -680,8 +680,11 @@ class KTPlugin { 'unavailable' => false, 'friendlyname' => $friendly_name, )); - return $oEntity; + //return $oEntity; } + /* ** Quick fix for optimisation. Reread must run plugin setup. ** */ + $this->setup(); + return $oEntity; } $disabled = 1; if ($this->bAlwaysInclude || $this->autoRegister) { $disabled = 0; } @@ -697,6 +700,8 @@ class KTPlugin { if (PEAR::isError($oEntity)) { return $oEntity; } + /* ** Quick fix for optimisation. Reread must run plugin setup. ** */ + $this->setup(); return true; } } -- libgit2 0.21.4