1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 15:46:44 +02:00

e_cron loading fix.

This commit is contained in:
CaMer0n
2009-11-16 22:39:53 +00:00
parent c188fd6430
commit d1782cd2b2

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org/). | GNU General Public License (http://gnu.org/).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/cron.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/cron.php,v $
| $Revision: 1.15 $ | $Revision: 1.16 $
| $Date: 2009-11-15 17:38:04 $ | $Date: 2009-11-16 22:39:53 $
| $Author: e107steved $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -326,12 +326,17 @@ function setCronPwd()
$class_name = $key."_cron"; $class_name = $key."_cron";
$method_name = 'config'; $method_name = 'config';
$this->cronExecuteMethod($class_name,$method_name); if($array = $this->cronExecuteMethod($class_name,$method_name,'data'))
{
$new_cron[] = $array;
}
} }
} }
} }
$this->e_cron = array_merge($core_cron,$new_cron); $this->e_cron = array_merge($core_cron,$new_cron);
} }
@@ -557,7 +562,7 @@ function setCronPwd()
} }
function cronExecuteMethod($class_name,$method_name) function cronExecuteMethod($class_name,$method_name,$return='boolean')
{ {
$mes = e107::getMessage(); $mes = e107::getMessage();
@@ -567,10 +572,17 @@ function setCronPwd()
if(method_exists($obj,$method_name)) if(method_exists($obj,$method_name))
{ {
$mes->add("Executing config function <b>".$key." : ".$method_name."()</b>", E_MESSAGE_DEBUG); $mes->add("Executing config function <b>".$key." : ".$method_name."()</b>", E_MESSAGE_DEBUG);
if($return == 'boolean')
{
call_user_func(array($obj,$method_name)); call_user_func(array($obj,$method_name));
return TRUE; return TRUE;
} }
else else
{
return call_user_func(array($obj,$method_name));
}
}
else
{ {
$mes->add("Config function <b>".$method_name."()</b> NOT found.", E_MESSAGE_DEBUG); $mes->add("Config function <b>".$method_name."()</b> NOT found.", E_MESSAGE_DEBUG);
} }