[aur-dev] [PATCH] Split keywords at commas and semicolons

Lukas Fleischer lfleischer at archlinux.org
Sun Jun 14 10:16:33 UTC 2015


Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 web/html/pkgbase.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index ac50888..5179d0c 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -97,7 +97,7 @@ if (check_token()) {
 	} elseif (current_action("do_DeleteComment")) {
 		list($ret, $output) = pkgbase_delete_comment();
 	} elseif (current_action("do_SetKeywords")) {
-		list($ret, $output) = pkgbase_set_keywords($base_id, explode(" ", $_POST['keywords']));
+		list($ret, $output) = pkgbase_set_keywords($base_id, preg_split("/[\s,;]+/", $_POST['keywords'], -1, PREG_SPLIT_NO_EMPTY));
 	} elseif (current_action("do_FileRequest")) {
 		list($ret, $output) = pkgreq_file($ids, $_POST['type'], $_POST['merge_into'], $_POST['comments']);
 	} elseif (current_action("do_CloseRequest")) {
-- 
2.4.3


More information about the aur-dev mailing list