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