bookmark improvement
This commit is contained in:
@@ -8,6 +8,13 @@ $Source$
|
||||
2005-03-07 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/relation.lib.php: db comments broken
|
||||
* libraries/dbi/*.php, lang/*: new $strSocketProblem message
|
||||
* db_details.php, tbl_query_box.php, libraries/bookmark.lib.php:
|
||||
bookmark improvement,
|
||||
based on patch #1034161 by Ryan Schmidt - ryandesign:
|
||||
sort bookmarks by label, remove the number before each bookmark
|
||||
in the drop-down choice. For this I had to change some logic in the
|
||||
calling scripts. It's still possible to have the same label more
|
||||
than once.
|
||||
|
||||
2005-03-07 Michal Čihař <michal@cihar.com>
|
||||
* db_printview.php, tbl_printview.php, css/phpmyadmin.css.php,
|
||||
|
@@ -224,7 +224,7 @@ if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
|
||||
echo ' <select name="id_bookmark">' . "\n";
|
||||
echo ' <option value=""></option>' . "\n";
|
||||
foreach ($bookmark_list AS $key => $value) {
|
||||
echo ' <option value="' . htmlspecialchars($value) . '">' . htmlspecialchars($key) . '</option>' . "\n";
|
||||
echo ' <option value="' . htmlspecialchars($key) . '">' . htmlspecialchars($value) . '</option>' . "\n";
|
||||
}
|
||||
echo ' </select>' . "\n";
|
||||
echo ' </td></tr><tr bgcolor="' . $cfg['BgcolorOne'] . '"><td colspan="2">';
|
||||
|
@@ -54,15 +54,15 @@ function PMA_listBookmarks($db, $cfgBookmark)
|
||||
$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 = \'\')';
|
||||
. ' OR user = \'\')'
|
||||
. ' ORDER BY label';
|
||||
$result = PMA_DBI_query($query, $dbh, PMA_DBI_QUERY_STORE);
|
||||
|
||||
// There are some bookmarks -> store them
|
||||
// use the unique id as the key
|
||||
if ($result > 0 && PMA_DBI_num_rows($result) > 0) {
|
||||
$flag = 1;
|
||||
while ($row = PMA_DBI_fetch_row($result)) {
|
||||
$bookmark_list[$flag . ' - ' . $row[0]] = $row[1];
|
||||
$flag++;
|
||||
$bookmark_list[$row[1]] = $row[0];
|
||||
} // end while
|
||||
return $bookmark_list;
|
||||
}
|
||||
|
@@ -434,7 +434,7 @@ if (!isset($is_inside_querywindow) ||
|
||||
echo ' <select name="id_bookmark" style="vertical-align: middle">' . "\n";
|
||||
echo ' <option value=""></option>' . "\n";
|
||||
foreach($bookmark_list AS $key => $value) {
|
||||
echo ' <option value="' . $value . '">' . htmlspecialchars($key) . '</option>' . "\n";
|
||||
echo ' <option value="' . htmlspecialchars($key) . '">' . htmlspecialchars($value) . '</option>' . "\n";
|
||||
}
|
||||
echo ' </select>' . " \n";
|
||||
echo ' ' . $strVar;
|
||||
|
Reference in New Issue
Block a user