diff --git a/include/functions.inc.php b/include/functions.inc.php index ada6b22cf..5f450ab7e 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -94,7 +94,11 @@ function redirect($location, $message = null) { function query_redirect($query, $location, $message, $redirect = true, $execute = true, $failed = false) { global $dbh, $error, $SELF; $id = "sql-" . count($_SESSION["messages"]); - $sql = ($query ? " " . lang('SQL command') . "' : ""); + $sql = ""; + if ($query) { + $sql = " " . lang('SQL command') . "'; + $_SESSION["history"][] = $query; + } if ($execute) { $failed = !$dbh->query($query); } diff --git a/sql.inc.php b/sql.inc.php index 452108bf4..74454ffc0 100644 --- a/sql.inc.php +++ b/sql.inc.php @@ -67,7 +67,7 @@ ?>
-

+

diff --git a/todo.txt b/todo.txt index 018790e19..451269706 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,3 @@ -Join repeated echo in _compile.php Bulk database create and drop Add whisperer to fields with foreign key Highlight found fields @@ -6,9 +5,9 @@ MySQL 5 BIT data type Transactions in export Compress export and import Create view and routine options -SQL queries history - utilize in edit link in .message and .error +Visualize SQL queries history Function to fix database encoding - http://php.vrana.cz/prevod-kodovani-mysql.php ? Save token also to cookie - for session expiration and login in other window ? Save uploaded files after error to session variable instead of hidden field -? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB, JS shrink can save 1 KB +? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB, JS packer can save 1 KB ? AJAX editing - select page has all data to display edit form