forked from extern/egroupware
"new static hook methods (class::method) are navitvly supported from php5.2.3+ on, so we need to add some compatibility for our required php5.1
"
This commit is contained in:
parent
afb99a49e9
commit
a3a7503c0f
@ -731,6 +731,12 @@
|
|||||||
*/
|
*/
|
||||||
function &ExecMethod2($acm)
|
function &ExecMethod2($acm)
|
||||||
{
|
{
|
||||||
|
// class::method is php5.2.3+
|
||||||
|
if (strpos($acm,'::') !== false && version_compare(PHP_VERSION,'5.2.3','<'))
|
||||||
|
{
|
||||||
|
list($class,$method) = explode('::',$acm);
|
||||||
|
$acm = array($class,$method);
|
||||||
|
}
|
||||||
if (!is_callable($acm))
|
if (!is_callable($acm))
|
||||||
{
|
{
|
||||||
list($app,$class,$method) = explode('.',$acm);
|
list($app,$class,$method) = explode('.',$acm);
|
||||||
@ -768,6 +774,13 @@
|
|||||||
{
|
{
|
||||||
/* Need to make sure this is working against a single dimensional object */
|
/* Need to make sure this is working against a single dimensional object */
|
||||||
$partscount = count(explode('.',$method)) - 1;
|
$partscount = count(explode('.',$method)) - 1;
|
||||||
|
|
||||||
|
// class::method is php5.2.3+
|
||||||
|
if (strpos($method,'::') !== false && version_compare(PHP_VERSION,'5.2.3','<'))
|
||||||
|
{
|
||||||
|
list($class,$method) = explode('::',$method);
|
||||||
|
$method = array($class,$method);
|
||||||
|
}
|
||||||
if (!is_callable($method) && $partscount == 2)
|
if (!is_callable($method) && $partscount == 2)
|
||||||
{
|
{
|
||||||
list($appname,$classname,$functionname) = explode(".", $method);
|
list($appname,$classname,$functionname) = explode(".", $method);
|
||||||
|
Loading…
Reference in New Issue
Block a user