Use static methods in Adminer
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@808 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
1ef58daaaa
commit
4452cd11e2
|
@ -377,14 +377,10 @@ function email_header($header) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function call_adminer($method, $default, $arg1 = null, $arg2 = null) {
|
function call_adminer($method, $default, $arg1 = null, $arg2 = null) {
|
||||||
static $adminer;
|
|
||||||
if (!isset($adminer)) {
|
|
||||||
$adminer = (class_exists('Adminer') ? new Adminer : false); // user defined class
|
|
||||||
}
|
|
||||||
// maintains original method name in minification
|
// maintains original method name in minification
|
||||||
if (method_exists($adminer, $method)) {
|
if (method_exists('Adminer', $method)) { // user defined class
|
||||||
// can use func_get_args() and call_user_func_array()
|
// can use func_get_args() and call_user_func_array()
|
||||||
return $adminer->$method($arg1, $arg2);
|
return Adminer::$method($arg1, $arg2);
|
||||||
}
|
}
|
||||||
return $default; //! $default is evaluated even if not neccessary
|
return $default; //! $default is evaluated even if not neccessary
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue