]> git.joonet.de Git - adminer.git/commitdiff
Use static methods in Adminer
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 12 Jul 2009 18:50:25 +0000 (18:50 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 12 Jul 2009 18:50:25 +0000 (18:50 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@808 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/functions.inc.php

index 0678186a122b5cd802207cda59a3a3c4bdd9e9c4..ed6edb1e520d48966095c9d7bb09c3fd66ecda59 100644 (file)
@@ -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
 }