Just a few fixes with plugins
parent
d3d420eb6e
commit
1d00d46f5d
|
|
@ -652,7 +652,7 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
||||||
|
|
||||||
foreach ($conf->plugins as $index => $plugin) {
|
foreach ($conf->plugins as $index => $plugin) {
|
||||||
//echo "[".$index."] => ".$plugin."<br />";
|
//echo "[".$index."] => ".$plugin."<br />";
|
||||||
if (!file_exists("plugins/".$plugin.".php")) {
|
if (!file_exists(Absolute_Path."plugins/".$plugin.".php")) {
|
||||||
//echo "\tNo existe el archivo<br />";
|
//echo "\tNo existe el archivo<br />";
|
||||||
unset($conf->plugins[$index]);
|
unset($conf->plugins[$index]);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,16 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
foreach (plugins::$instances as $plugin) {
|
foreach (plugins::$instances as $plugin) {
|
||||||
|
if(array_key_exists($index,$this->actions[$name])){
|
||||||
$action = $this->actions[$name][$index][1];
|
$action = $this->actions[$name][$index][1];
|
||||||
if (is_callable(array($plugin, $action))) {
|
if (is_callable(array($plugin, $action))) {
|
||||||
|
//echo "ejecutar: ".$action."()<br/>";
|
||||||
$plugin->$action();
|
$plugin->$action();
|
||||||
}
|
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function exists($name) {
|
function exists($name) {
|
||||||
if (isset($this->exists[$name])) {
|
if (isset($this->exists[$name])) {
|
||||||
|
|
@ -51,10 +54,12 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo $this->actions[$name][0][1];
|
echo $this->actions[$name][0][1];
|
||||||
echo "<br />";*/
|
echo "<br />";*/
|
||||||
|
if(array_key_exists($name,$this->actions)){
|
||||||
if (is_callable(array($plugin, $this->actions[$name][0][1]))) {
|
if (is_callable(array($plugin, $this->actions[$name][0][1]))) {
|
||||||
return $this->exists[$name] = true;
|
return $this->exists[$name] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this->exists[$name] = false;
|
return $this->exists[$name] = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue