1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Links for column search in select

This commit is contained in:
Jakub Vrana
2012-07-29 11:16:41 -07:00
parent e8b95f127f
commit e2dbb9c7bd
3 changed files with 26 additions and 1 deletions

View File

@@ -273,10 +273,12 @@ if (!$columns) {
if ($name != "") {
$rank++;
$names[$key] = $name;
$column = idf_escape($key);
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
echo '<th><a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
echo "<a href='" . h("$href&desc%5B0%5D=1") . "' title='" . lang('descending') . "' class='text'> ↓</a>";
if (!$val["fun"]) {
echo '<a href="#fieldset-search" onclick="selectSearch(\'' . h(js_escape($key)) . '\'); return false;" title="' . lang('Search') . '" class="text jsonly"> =</a>';
}
}
$functions[$key] = $val["fun"];
next($select);