From 4452cd11e2e60c30d016060eb4ac0e1311e80890 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Sun, 12 Jul 2009 18:50:25 +0000 Subject: [PATCH] Use static methods in Adminer git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@808 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/include/functions.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 0678186a..ed6edb1e 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -377,14 +377,10 @@ function email_header($header) { } 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 - if (method_exists($adminer, $method)) { + if (method_exists('Adminer', $method)) { // user defined class // 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 }