]> git.joonet.de Git - adminer.git/commitdiff
Set MySQL time zone by PHP setting only in Editor
authorJakub Vrana <jakub@vrana.cz>
Wed, 23 Mar 2011 12:35:35 +0000 (13:35 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 23 Mar 2011 12:35:35 +0000 (13:35 +0100)
adminer/drivers/mysql.inc.php
changes.txt
editor/include/adminer.inc.php

index b73379ab20edfb47d32e17a7221b5c75cc2ed22b..ba8359ce2410dd1de2a9d14d9b84198f147e8c35 100644 (file)
@@ -251,7 +251,6 @@ if (!defined("DRIVER")) {
                $credentials = $adminer->credentials();
                if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
                        $connection->query("SET sql_quote_show_create = 1");
-                       $connection->query("SET time_zone = " . $connection->quote(substr_replace(@date("O"), ":", -2, 0))); // date("P") available since PHP 5.1.3, @ - requires date.timezone since PHP 5.3.0
                        return $connection;
                }
                return $connection->error;
index 788178fcf48cafb3e70d8c148d13fddf6fd4f1ee..9600f61eb4d604a47a20d06da9511125d2fc793e 100644 (file)
@@ -10,12 +10,12 @@ Parse UTF-16 and UTF-8 BOM in all text uploads
 Display ; in history (thanks to Jan Cerny)
 Use DELIMITER in history
 Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski)
-Set MySQL time zone by PHP setting
 Disable maxlength with functions in edit
 Better placement of AJAX icon
 Table header in CSV export (Editor)
 Time format hint (Editor)
 Respect order after search (Editor)
+Set MySQL time zone by PHP setting (Editor)
 Allow own code in <head> (customization)
 Polish translation
 
index 030e73f33d0b4d5b0a7b9d42a87c279d7bb3d131..0ac51da59fb01c743225367a100aa1ca398dbca8 100644 (file)
@@ -50,6 +50,8 @@ document.getElementById('username').focus();
        }
        
        function login($login, $password) {
+               global $connection;
+               $connection->query("SET time_zone = " . q(substr_replace(@date("O"), ":", -2, 0))); // date("P") available since PHP 5.1.3, @ - requires date.timezone since PHP 5.3.0
                return true;
        }