[interface] Indicate shared bookmarks in interface.

This commit is contained in:
Michal Čihař
2011-02-10 13:47:24 +01:00
parent d8d3d4106a
commit 41813c09aa
2 changed files with 19 additions and 3 deletions

View File

@@ -137,6 +137,7 @@
- bug #3175227 [auth] Reset user cache on login.
- rfe #3148361 [interface] Replace hard coded limit with $cfg['LimitChars'].
- bug #3177136 [interface] Indicate that bookmark is being used on browse.
- [interface] Indicate shared bookmarks in interface.
3.3.10.0 (not yet released)
- patch #3147400 [structure] Aria table size printed as unknown,

View File

@@ -69,10 +69,25 @@ function PMA_Bookmark_getList($db)
$query = 'SELECT label, id FROM '. PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table'])
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND (user = \'' . PMA_sqlAddslashes($cfgBookmark['user']) . '\''
. ' OR user = \'\')'
. ' AND user = \'' . PMA_sqlAddslashes($cfgBookmark['user']) . '\''
. ' ORDER BY label';
return PMA_DBI_fetch_result($query, 'id', 'label', $controllink, PMA_DBI_QUERY_STORE);
$per_user = PMA_DBI_fetch_result($query, 'id', 'label', $controllink, PMA_DBI_QUERY_STORE);
$query = 'SELECT label, id FROM '. PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table'])
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND user = \'\''
. ' ORDER BY label';
$global = PMA_DBI_fetch_result($query, 'id', 'label', $controllink, PMA_DBI_QUERY_STORE);
foreach($global as $key => $val) {
$global[$key] = $val . ' (' . __('shared') . ')';
}
$ret = $global + $per_user;
asort($ret);
return $ret;
} // end of the 'PMA_Bookmark_getList()' function