From a00e5b040a42349e40a6d22cf822042ccf651be4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 26 Aug 2011 07:47:44 +0200 Subject: Link to current page in the login bar HTTPs link This is way more convenient if you follow a HTTP link. Implements FS#25757. Signed-off-by: Lukas Fleischer --- web/template/login_form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/template/login_form.php b/web/template/login_form.php index b351a27e..969a371e 100644 --- a/web/template/login_form.php +++ b/web/template/login_form.php @@ -31,8 +31,8 @@ elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) else { ?> - - https://aur.archlinux.org/ + ', ''); ?> -- cgit v1.2.3-24-g4f1b From 1b63994b8d1ccd4d8cb4b065fde8c8b798d7781d Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 2 Sep 2011 17:17:01 +0200 Subject: web/html/pkgsubmit.php: Deal with unset category ID Do not move the package to the incoming package directory and fail to create proper database entries if some AUR upload helper doesn't provide a category. We got several failing constraints here, such as: Cannot add or update a child row: a foreign key constraint fails (`AUR`.`Packages`, CONSTRAINT `Packages_ibfk_1` FOREIGN KEY (`CategoryID`) REFERENCES `PackageCategories` (`ID`) ON DELETE NO ACTION) Instead, default to "1" (which is "none", or "keep category" for existing packages) if no category is supplied. Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 64281c7a..21776f9c 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -311,6 +311,18 @@ if ($uid): $pkg_version = sprintf('%s-%s', $new_pkgbuild['pkgver'], $new_pkgbuild['pkgrel']); } + # Check the category to use, "1" meaning "none" (or "keep category" for + # existing packages). + if (isset($_POST['category'])) { + $category_id = intval($_POST['category']); + if ($category_id <= 0) { + $category_id = 1; + } + } + else { + $category_id = 1; + } + if ($pdata) { # This is an overwrite of an existing package, the database ID # needs to be preserved so that any votes are retained. However, @@ -324,9 +336,9 @@ if ($uid): db_query($q, $dbh); # If a new category was chosen, change it to that - if ($_POST['category'] > 1) { + if ($category_id > 1) { $q = sprintf( "UPDATE Packages SET CategoryID = %d WHERE ID = %d", - mysql_real_escape_string($_REQUEST['category']), + $category_id, $packageID); db_query($q, $dbh); @@ -350,7 +362,7 @@ if ($uid): mysql_real_escape_string($new_pkgbuild['pkgname']), mysql_real_escape_string($new_pkgbuild['license']), mysql_real_escape_string($pkg_version), - mysql_real_escape_string($_REQUEST['category']), + $category_id, mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['url']), $uid, -- cgit v1.2.3-24-g4f1b From 20b20c20f2d40ad2bc1cc2e164f0b6d3c92321dd Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 5 Sep 2011 16:56:09 +0200 Subject: web/template/login_form.php: Escape the request URI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Thomas Bächler Signed-off-by: Lukas Fleischer --- web/template/login_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/login_form.php b/web/template/login_form.php index 969a371e..c27e9ba3 100644 --- a/web/template/login_form.php +++ b/web/template/login_form.php @@ -11,7 +11,7 @@ elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) print "" . $login_error . "
\n"; } ?> -
+
\n" "Language-Team: LANGUAGE \n" @@ -536,6 +536,12 @@ msgstr "" msgid "Bad username or password." msgstr "" +msgid "Category" +msgstr "" + +msgid "Change category" +msgstr "" + msgid "Votes" msgstr "" @@ -700,7 +706,9 @@ msgstr "" msgid "Forgot Password" msgstr "" -msgid "HTTP login is disabled. Please switch to HTTPs if you want to login: " +#, php-format +msgid "" +"HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login." msgstr "" msgid "Recent Updates" @@ -748,9 +756,6 @@ msgstr "" msgid "Package Listing" msgstr "" -msgid "Category" -msgstr "" - msgid "Name" msgstr "" -- cgit v1.2.3-24-g4f1b