The branch, master has been updated
via 0515e1b03ed5dcf055efffb75aa5f42a26969e94 (commit)
from 3e3f5f64fb36bba7e924374f1a386d96ba7e67f5 (commit)
- Log -----------------------------------------------------------------
commit 0515e1b03ed5dcf055efffb75aa5f42a26969e94
Author: Piotr Przybylski <[email protected]>
Date: Wed Feb 16 21:51:53 2011 +0100
store userprefs using JSON instead of serialized PHP array
-----------------------------------------------------------------------
Summary of changes:
libraries/user_preferences.lib.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libraries/user_preferences.lib.php
b/libraries/user_preferences.lib.php
index bf84b25..6c48116 100644
--- a/libraries/user_preferences.lib.php
+++ b/libraries/user_preferences.lib.php
@@ -68,8 +68,9 @@ function PMA_load_userprefs()
FROM ' . $query_table . '
WHERE `username` = \'' . PMA_sqlAddslashes($cfgRelation['user']) .
'\'';
$row = PMA_DBI_fetch_single_row($query, 'ASSOC', $GLOBALS['controllink']);
+
return array(
- 'config_data' => $row ? unserialize($row['config_data']) : array(),
+ 'config_data' => $row ? (array)json_decode($row['config_data']) :
array(),
'mtime' => $row ? $row['ts'] : time(),
'type' => 'db');
}
@@ -122,7 +123,7 @@ function PMA_save_userprefs(array $config_array)
WHERE `username` = \'' . PMA_sqlAddslashes($cfgRelation['user']) .
'\'';
$has_config = PMA_DBI_fetch_value($query, 0, 0, $GLOBALS['controllink']);
- $config_data = serialize($config_array);
+ $config_data = json_encode($config_array);
if ($has_config) {
$query = '
UPDATE ' . $query_table . '
hooks/post-receive
--
phpMyAdmin
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git