Just a few fixes with plugins

master
vbracco 2008-10-31 14:56:09 +00:00
parent d3d420eb6e
commit 1d00d46f5d
2 changed files with 15 additions and 10 deletions

View File

@ -652,7 +652,7 @@ if(!defined('entry') || !entry) die('Not a valid page');
foreach ($conf->plugins as $index => $plugin) {
//echo "[".$index."] => ".$plugin."<br />";
if (!file_exists("plugins/".$plugin.".php")) {
if (!file_exists(Absolute_Path."plugins/".$plugin.".php")) {
//echo "\tNo existe el archivo<br />";
unset($conf->plugins[$index]);
continue;

View File

@ -29,11 +29,14 @@ if(!defined('entry') || !entry) die('Not a valid page');
$index = 0;
foreach (plugins::$instances as $plugin) {
$action = $this->actions[$name][$index][1];
if (is_callable(array($plugin, $action))) {
$plugin->$action();
if(array_key_exists($index,$this->actions[$name])){
$action = $this->actions[$name][$index][1];
if (is_callable(array($plugin, $action))) {
//echo "ejecutar: ".$action."()<br/>";
$plugin->$action();
$index++;
}
}
$index++;
}
}
@ -51,8 +54,10 @@ if(!defined('entry') || !entry) die('Not a valid page');
echo "<br />";
echo $this->actions[$name][0][1];
echo "<br />";*/
if (is_callable(array($plugin, $this->actions[$name][0][1]))) {
return $this->exists[$name] = true;
if(array_key_exists($name,$this->actions)){
if (is_callable(array($plugin, $this->actions[$name][0][1]))) {
return $this->exists[$name] = true;
}
}
}