diff --git a/classes/functions.php b/classes/functions.php index 50b5ae0..841a148 100644 --- a/classes/functions.php +++ b/classes/functions.php @@ -652,7 +652,7 @@ if(!defined('entry') || !entry) die('Not a valid page'); foreach ($conf->plugins as $index => $plugin) { //echo "[".$index."] => ".$plugin."
"; - if (!file_exists("plugins/".$plugin.".php")) { + if (!file_exists(Absolute_Path."plugins/".$plugin.".php")) { //echo "\tNo existe el archivo
"; unset($conf->plugins[$index]); continue; diff --git a/classes/plugin.class.php b/classes/plugin.class.php index 9910005..897df26 100644 --- a/classes/plugin.class.php +++ b/classes/plugin.class.php @@ -28,14 +28,17 @@ if(!defined('entry') || !entry) die('Not a valid page'); echo "
";*/ $index = 0; - foreach (plugins::$instances as $plugin) { - $action = $this->actions[$name][$index][1]; - if (is_callable(array($plugin, $action))) { - $plugin->$action(); + foreach (plugins::$instances as $plugin) { + if(array_key_exists($index,$this->actions[$name])){ + $action = $this->actions[$name][$index][1]; + if (is_callable(array($plugin, $action))) { + //echo "ejecutar: ".$action."()
"; + $plugin->$action(); + $index++; + } } - $index++; } - } + } function exists($name) { if (isset($this->exists[$name])) { @@ -50,9 +53,11 @@ if(!defined('entry') || !entry) die('Not a valid page'); print_r($this->actions[$name]); echo "
"; echo $this->actions[$name][0][1]; - echo "
";*/ - if (is_callable(array($plugin, $this->actions[$name][0][1]))) { - return $this->exists[$name] = true; + echo "
";*/ + if(array_key_exists($name,$this->actions)){ + if (is_callable(array($plugin, $this->actions[$name][0][1]))) { + return $this->exists[$name] = true; + } } }