Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mysql.php')
-rw-r--r--lib/mysql.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/mysql.php b/lib/mysql.php
index 2193ab1..ca683d8 100644
--- a/lib/mysql.php
+++ b/lib/mysql.php
@@ -87,3 +87,14 @@ function mysql_query_package_version($table) {
")" .
")";
}
+
+function arch_filter_query($table) {
+ $arch_filter="`" . $table . "`.`name` IN (\"\"";
+ foreach (explode("&", $_SERVER["QUERY_STRING"]) as $param) {
+ if (strpos($param, "arch=")!==0)
+ continue;
+ $arch_filter .= ",from_base64(\"" . base64_encode(substr($param,5)) . "\")";
+ }
+ $arch_filter .= ")";
+ return $arch_filter;
+}