mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Applied license patch from dsa (closes #4085).
This commit is contained in:
parent
6cca148648
commit
dce2f70443
3 changed files with 15 additions and 2 deletions
|
@ -114,6 +114,7 @@ CREATE TABLE Packages (
|
||||||
DummyPkg TINYINT UNSIGNED NOT NULL DEFAULT 0, -- 1=>dummy
|
DummyPkg TINYINT UNSIGNED NOT NULL DEFAULT 0, -- 1=>dummy
|
||||||
FSPath CHAR(255) NOT NULL DEFAULT '',
|
FSPath CHAR(255) NOT NULL DEFAULT '',
|
||||||
URLPath CHAR(255) NOT NULL DEFAULT '',
|
URLPath CHAR(255) NOT NULL DEFAULT '',
|
||||||
|
License CHAR(40) NOT NULL DEFAULT '',
|
||||||
LocationID TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
LocationID TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||||
NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||||
OutOfDate TINYINT UNSIGNED DEFAULT 0,
|
OutOfDate TINYINT UNSIGNED DEFAULT 0,
|
||||||
|
|
|
@ -396,6 +396,7 @@ if ($_COOKIE["AURSID"]) {
|
||||||
$q.="Version='".mysql_escape_string($new_pkgbuild['pkgver'])."-".
|
$q.="Version='".mysql_escape_string($new_pkgbuild['pkgver'])."-".
|
||||||
mysql_escape_string($new_pkgbuild['pkgrel'])."',";
|
mysql_escape_string($new_pkgbuild['pkgrel'])."',";
|
||||||
$q.="CategoryID=".mysql_escape_string($_REQUEST['category']).", ";
|
$q.="CategoryID=".mysql_escape_string($_REQUEST['category']).", ";
|
||||||
|
$q.="License='".mysql_escape_string($new_pkgbuild['license'])."', ";
|
||||||
$q.="Description='".mysql_escape_string($new_pkgbuild['pkgdesc'])."', ";
|
$q.="Description='".mysql_escape_string($new_pkgbuild['pkgdesc'])."', ";
|
||||||
$q.="URL='".mysql_escape_string($new_pkgbuild['url'])."', ";
|
$q.="URL='".mysql_escape_string($new_pkgbuild['url'])."', ";
|
||||||
$q.="LocationID=2, ";
|
$q.="LocationID=2, ";
|
||||||
|
@ -460,13 +461,14 @@ if ($_COOKIE["AURSID"]) {
|
||||||
# this is a brand new package
|
# this is a brand new package
|
||||||
#
|
#
|
||||||
$q = "INSERT INTO Packages ";
|
$q = "INSERT INTO Packages ";
|
||||||
$q.= " (Name, Version, CategoryID, Description, URL, LocationID, ";
|
$q.= " (Name, License, Version, CategoryID, Description, URL, LocationID, ";
|
||||||
if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User" || account_from_sid($_COOKIE["AURSID"]) == "Developer") {
|
if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User" || account_from_sid($_COOKIE["AURSID"]) == "Developer") {
|
||||||
$q.= "Safe, VerifiedBy,";
|
$q.= "Safe, VerifiedBy,";
|
||||||
}
|
}
|
||||||
$q.= " SubmittedTS, SubmitterUID, MaintainerUID, FSPath, URLPath) ";
|
$q.= " SubmittedTS, SubmitterUID, MaintainerUID, FSPath, URLPath) ";
|
||||||
$q.= "VALUES ('";
|
$q.= "VALUES ('";
|
||||||
$q.= mysql_escape_string($new_pkgbuild['pkgname'])."', '";
|
$q.= mysql_escape_string($new_pkgbuild['pkgname'])."', '";
|
||||||
|
$q.= mysql_escape_string($new_pkgbuild['license'])."', '";
|
||||||
$q.= mysql_escape_string($new_pkgbuild['pkgver'])."-".
|
$q.= mysql_escape_string($new_pkgbuild['pkgver'])."-".
|
||||||
mysql_escape_string($new_pkgbuild['pkgrel'])."', ";
|
mysql_escape_string($new_pkgbuild['pkgrel'])."', ";
|
||||||
$q.= mysql_escape_string($_REQUEST['category']).", '";
|
$q.= mysql_escape_string($_REQUEST['category']).", '";
|
||||||
|
|
|
@ -334,6 +334,16 @@ function package_details($id=0, $SID="") {
|
||||||
print $row["NumVotes"] . "</span></td>";
|
print $row["NumVotes"] . "</span></td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
# In case of wanting to put a custom message
|
||||||
|
# Added by: dsa <dsandrade@gmail.com>
|
||||||
|
$msg = "unknown";
|
||||||
|
$license = $row["License"] == "" ? $msg : $row["License"];
|
||||||
|
|
||||||
|
print "<tr>\n";
|
||||||
|
print " <td class='boxSoft' colspan='2'><br><span class='f3'>License: ".$license;
|
||||||
|
print "</a></span></td>\n";
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
print " <td class='boxSoft' colspan='2'><img src='/images/pad.gif' height='15'></td>";
|
print " <td class='boxSoft' colspan='2'><img src='/images/pad.gif' height='15'></td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
Loading…
Add table
Reference in a new issue