]> git.joonet.de Git - adminer.git/commitdiff
Use static variable instead of property
authorJakub Vrana <jakub@vrana.cz>
Thu, 17 Feb 2011 20:39:20 +0000 (21:39 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 17 Feb 2011 20:39:20 +0000 (21:39 +0100)
plugins/dump-xml.php

index 7e8f3dd22d281e865857706e21d9cee85fd8ffb3..af39363f788ff71f4c3dc5605ba9205e5467ecf5 100644 (file)
@@ -6,7 +6,6 @@
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
 */
 class AdminerDumpXml {
-       var $_database = false;
        
        function dumpFormat() {
                return array('xml' => 'XML');
@@ -23,9 +22,10 @@ class AdminerDumpXml {
        }
        
        function dumpData($table, $style, $query) {
+               static $database = false;
                if ($_POST["format"] == "xml") {
-                       if (!$this->_database) {
-                               $this->_database = true;
+                       if (!$database) {
+                               $database = true;
                                echo "<database name='" . h(DB) . "'>\n";
                                register_shutdown_function(array($this, '_database'));
                        }