Call static methods staticly

This commit is contained in:
Nathan Gray 2014-05-21 16:48:36 +00:00
parent 7ce4dd1e28
commit a5cdc928f0

View File

@ -96,6 +96,13 @@ class egw_json_request
{ {
@list($className,$functionName,$handler) = explode('::',$menuaction); @list($className,$functionName,$handler) = explode('::',$menuaction);
list($appName) = explode('_',$className); list($appName) = explode('_',$className);
// Check for a real static method, avoid instanciation if it is
$m = new ReflectionMethod($menuaction);
if($m->isStatic())
{
$ajaxClass = $className;
}
} }
else else
{ {
@ -143,7 +150,7 @@ class egw_json_request
{ {
$ajaxClass = $GLOBALS['egw']->framework; $ajaxClass = $GLOBALS['egw']->framework;
} }
else else if (!$ajaxClass)
{ {
$ajaxClass = CreateObject($appName.'.'.$className); $ajaxClass = CreateObject($appName.'.'.$className);
} }