summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2006-08-08 01:28:26 +0000
committerpjmattal <pjmattal>2006-08-08 01:28:26 +0000
commit6e7d75efad94c1ed684f84241767264b26a21e35 (patch)
tree11a802a08358a5d09cf31a2396431d8a7d196d0f
parent13a58b287c367a46d5fffe0a510fdf868c429d2f (diff)
downloadaurweb-6e7d75efad94c1ed684f84241767264b26a21e35.tar.xz
committed dsa's patch to allow periods in package names (closes #4758)
-rw-r--r--web/html/pkgsubmit.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 6bec9f6..9ae74c7 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -33,8 +33,13 @@ if ($_COOKIE["AURSID"]) {
$pkg_name = str_replace("'", "", $_REQUEST["pkgname"]);
$pkg_name = escapeshellarg($pkg_name);
$pkg_name = str_replace("'", "", $pkg_name); # get rid of single quotes
- $presult = preg_match("/^[a-z0-9][a-z0-9_-]*$/", $pkg_name);
- if ($presult == FALSE || $presult <= 0) {
+
+ # Solves the problem when you try to submit PKGBUILD
+ # that have the name with a period like (gstreamer0.10)
+ # Added by: dsa <dsandrade@gmail.com>
+ $presult = preg_match("/^[a-z0-9][a-z0-9\._-]*$/", $pkg_name);
+
+ if ($presult == FALSE || $presult <= 0) {
# FALSE => error processing regex, 0 => invalid characters
#
$error = __("Invalid name: only lowercase letters are allowed.");