Pretty-print the folder URLs too.
This commit is contained in:
parent
e067ae4518
commit
51601c7153
1
CHANGES
1
CHANGES
|
@ -43,6 +43,7 @@ For further information about Photo Organizer, see its web site at:
|
|||
[add] List available image sizes. (will improve this later)
|
||||
[add] Generate a full-size image from RAW imports.
|
||||
[add] Initial background image import/processing worker.
|
||||
[add] Pretty-URL the folder search too.
|
||||
|
||||
2.36.1 (September 27, 2008)
|
||||
|
||||
|
|
|
@ -2930,6 +2930,13 @@ function generate_link($type, $arg0='', $args = array(), $raw = FALSE) {
|
|||
else
|
||||
$url = "folder.php?folder=$arg0";
|
||||
break;
|
||||
case 'search.folder':
|
||||
if ($pretty_urls) {
|
||||
$url = "folders/$arg0";
|
||||
} else {
|
||||
$url = "search.folders.php?search_string=$arg0";
|
||||
}
|
||||
break;
|
||||
case 'tag':
|
||||
if ($arg0) {
|
||||
if ($pretty_urls) {
|
||||
|
|
|
@ -39,7 +39,7 @@ function search_i18n_data() {
|
|||
$search_interface = array("text_general" => array("idx" => 1, 'link' => "search.text.general.php", "alt" => $strings['search_gen_text']),
|
||||
"text_advanced" => array("idx" => 2, 'link' => "search.text.advanced.php", "alt" => $strings['search_adv_text']));
|
||||
|
||||
$search_interface["folder"] = array("idx" => 3, 'link' => 'search.folder.php', 'alt' => $strings['search_folders']);
|
||||
$search_interface["folder"] = array("idx" => 3, 'link' => generate_link('search.folders', ''), 'alt' => $strings['search_folders']);
|
||||
$search_interface["users"] = array("idx" => 4, 'link' => 'search.users.php', 'alt' => $strings['search_users']);
|
||||
$search_interface["tags"] = array("idx" => 5, 'link' => generate_link('tag', ''), 'alt' => $strings['search_tags']);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ function display_folder_search_entry($database, $search_string, $current_user_id
|
|||
|
||||
theme_display_navigator_box_top($search_interface['folder']['idx'], $search_interface, "100%");
|
||||
|
||||
print "<form action=\"search.folder.php\" method=\"post\" accept-charset=\"".$strings['formats_encoding']."\">";
|
||||
print "<form action=\"".generate_link('search.folder', '')."\" method=\"post\" accept-charset=\"".$strings['formats_encoding']."\">";
|
||||
print "<table class=\"search\">";
|
||||
print "<tr><td align=\"center\">";
|
||||
print "<input type=\"text\" name=\"search_string\" value=\"$search_string\" size=\"50\"/>";
|
||||
|
@ -62,7 +62,7 @@ function build_folder_search_string($search_string, $identifier) {
|
|||
} elseif (strncmp($token, "OR", 2) == 0) {
|
||||
$itemized_search_string = $itemized_search_string . "OR ";
|
||||
} else {
|
||||
$itemized_search_string = $itemized_search_string . emit_a("search.folder.php?$identifier=$token", $token);
|
||||
$itemized_search_string = $itemized_search_string . emit_a(generate_link('search.folder', $token), $token);
|
||||
}
|
||||
$token = strtok("+ \n\t");
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ site_navigator_status($strings['search_searched_for']." $itemized_search_string"
|
|||
display_folder_search_entry($database, $search_string, $current_user_id);
|
||||
|
||||
$sstr = urlencode($search_string);
|
||||
$uri = "search.folder.php?search_string=$sstr&current_user=$current_user_id";
|
||||
$uri = emit_a(generate_link('search.folder', $sstr, ('current_user'=>$current_user_id)));
|
||||
|
||||
if (pg_num_rows($search_result_f) > 0)
|
||||
display_folder_with_users($database, $po_user['id'], $search_result_f, $uri);
|
||||
|
|
Loading…
Reference in New Issue