OSDN Git Service

If parent plugin was not included then include that before child include
authorSotaro KARASAWA <sotarok@users.sourceforge.jp>
Wed, 9 Sep 2009 07:43:11 +0000 (16:43 +0900)
committerSotaro KARASAWA <sotarok@users.sourceforge.jp>
Wed, 9 Sep 2009 07:43:11 +0000 (16:43 +0900)
class/Ethna_Plugin.php

index 59046bf..07262c3 100644 (file)
@@ -495,6 +495,12 @@ class Ethna_Plugin
      */
     function includePlugin($type, $name = null)
     {
+        if ($name !== null) {
+            list($class, $file) = $this->getPluginNaming($type);
+            $dir = $this->_searchPluginSrcDir($type);
+            $this->_includePluginSrc($class, $dir, $file);
+        }
+
         list($class, $file) = $this->getPluginNaming($type, $name);
         $dir = $this->_searchPluginSrcDir($type, $name);
         $this->_includePluginSrc($class, $dir, $file);
@@ -516,10 +522,6 @@ class Ethna_Plugin
         $ctl =& Ethna_Controller::getInstance();
         $plugin =& $ctl->getPlugin();
 
-        if ($appid === null) {
-            $appid = $ctl->getAppId();
-        }
-
         $plugin->includePlugin($type, $name);
     }
     // }}}