committed dsa's patch to allow periods in package names (closes #4758)

This commit is contained in:
pjmattal 2006-08-08 01:28:26 +00:00
parent 13a58b287c
commit 6e7d75efad

View file

@ -33,7 +33,12 @@ if ($_COOKIE["AURSID"]) {
$pkg_name = str_replace("'", "", $_REQUEST["pkgname"]); $pkg_name = str_replace("'", "", $_REQUEST["pkgname"]);
$pkg_name = escapeshellarg($pkg_name); $pkg_name = escapeshellarg($pkg_name);
$pkg_name = str_replace("'", "", $pkg_name); # get rid of single quotes $pkg_name = str_replace("'", "", $pkg_name); # get rid of single quotes
$presult = preg_match("/^[a-z0-9][a-z0-9_-]*$/", $pkg_name);
# 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) { if ($presult == FALSE || $presult <= 0) {
# FALSE => error processing regex, 0 => invalid characters # FALSE => error processing regex, 0 => invalid characters
# #