Just a few fixes with plugins
parent
18b7d22368
commit
d3d420eb6e
|
|
@ -57,10 +57,10 @@ class configuration {
|
||||||
$this->check_version = $this->get_option("check_version");
|
$this->check_version = $this->get_option("check_version");
|
||||||
|
|
||||||
//TODO: Soporte de los plugins desde BD activar/desactivar
|
//TODO: Soporte de los plugins desde BD activar/desactivar
|
||||||
if ($handle = opendir("plugins")) {
|
if ($handle = opendir(Absolute_Path."plugins")) {
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if (substr($file, strlen($file)-3, 3) == "php") {
|
if (substr($file, strlen($file)-4, 4) == ".php") {
|
||||||
require_once("plugins/{$file}");
|
require_once(Absolute_Path."plugins/{$file}");
|
||||||
$this->plugins[] = substr($file, 0, strlen($file)-4);
|
$this->plugins[] = substr($file, 0, strlen($file)-4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -654,7 +654,7 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
||||||
//echo "[".$index."] => ".$plugin."<br />";
|
//echo "[".$index."] => ".$plugin."<br />";
|
||||||
if (!file_exists("plugins/".$plugin.".php")) {
|
if (!file_exists("plugins/".$plugin.".php")) {
|
||||||
//echo "\tNo existe el archivo<br />";
|
//echo "\tNo existe el archivo<br />";
|
||||||
unset($config->plugins[$index]);
|
unset($conf->plugins[$index]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//echo "\tSi existe el archivo<br />";
|
//echo "\tSi existe el archivo<br />";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue