[aur-dev] [PATCH] Rename "Age" search order to "Last modified"

Lukas Fleischer lfleischer at archlinux.org
Sun Sep 20 09:16:06 UTC 2015


Use a better description for sorting by modification time, as it is not
clear whether "Age" refers to the package creation date or to the
modification date.

The possibility to sort by "Age" is kept internally (but hidden from the
user interface) such that old links to search results still work.

Fixes FS#46319.

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 web/lib/pkgfuncs.inc.php         | 4 ++++
 web/template/pkg_search_form.php | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 62bea65..600e590 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -755,7 +755,11 @@ function pkg_search_page($SID="") {
 	case 'm':
 		$q_sort .= "Maintainer " . $order . ", ";
 		break;
+	case 'l':
+		$q_sort .= "ModifiedTS " . $order . ", ";
+		break;
 	case 'a':
+		/* For compatibility with old search links. */
 		$q_sort .= "-ModifiedTS " . $order . ", ";
 		break;
 	default:
diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php
index 404d16e..1cc5fb2 100644
--- a/web/template/pkg_search_form.php
+++ b/web/template/pkg_search_form.php
@@ -24,7 +24,7 @@ $sortby = array(
 	'w' => __('Voted'),
 	'o' => __('Notify'),
 	'm' => __('Maintainer'),
-	'a' => __('Age')
+	'l' => __('Last modified')
 );
 
 $orderby = array(
-- 
2.5.2


More information about the aur-dev mailing list