diff options
-rw-r--r-- | support/schema/aur-schema.sql | 13 | ||||
-rw-r--r-- | web/html/pkgsubmit.php | 22 | ||||
-rw-r--r-- | web/lang/submit_po.inc | 115 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc | 32 |
4 files changed, 162 insertions, 20 deletions
diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql index fde8b95..b6f7a67 100644 --- a/support/schema/aur-schema.sql +++ b/support/schema/aur-schema.sql @@ -174,3 +174,16 @@ CREATE TABLE PackageContents ( FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE ); +-- Record comments for users submitting packages to AUR/unsupported +-- +CREATE TABLE PackageUploadHistory ( + PackageID INTEGER UNSIGNED NOT NULL, + UsersID INTEGER UNSIGNED NOT NULL, + Comments TEXT NOT NULl DEFAULT '', + UploadTS BIGINT UNSIGNED NOT NULL DEFAULT 0, + INDEX (UsersID), + INDEX (PackageID), + FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE, + FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE +); + diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index a670421..1094799 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -32,6 +32,10 @@ if ($_COOKIE["AURSID"]) { } } + if (!$_REQUEST["comments"] && !$error) { + $error = __("You must supply a comment."); + } + if (!$error) { # first, see if this package already exists, and if it can be overwritten # @@ -195,7 +199,8 @@ if ($_COOKIE["AURSID"]) { # this is a variable/value pair, strip out # array parens and any quoting # - $pkgbuild[$lparts[0]] = str_replace(array("(",")","\"","'"), "", $lparts[1]); + $pkgbuild[$lparts[0]] = str_replace(array("(",")","\"","'"), "", + $lparts[1]); } else { # either a comment, blank line, continued line, or build function # @@ -246,10 +251,6 @@ if ($_COOKIE["AURSID"]) { $dbh = db_connect(); if ($pkg_exists) { - # TODO add some kind of package history table - for who - # was the last person to upload, a timestamp, and maybe a - # comment about it too - # this is an overwrite of an existing package, the database ID # needs to be preserved so that any votes are retained. However, # PackageDepends, PackageSources, and PackageContents can be @@ -272,6 +273,8 @@ if ($_COOKIE["AURSID"]) { # TODO # $q = "UPDATE Packages ..." + # $q = "INSERT INTO PackageUploadHistory ..." + } else { # this is a brand new package # @@ -330,11 +333,20 @@ if ($_COOKIE["AURSID"]) { print __("No"); print " </td>\n"; print "</tr>\n"; + print "<tr>\n"; + print " <td valign='top' span='f4' align='right'>"; + print __("Comments").":</td>\n"; + print " <td span='f4' align='left'>"; + print "<textarea rows='10' cols='50' name='comments'></textarea>"; + print " </td>\n"; + print "</tr>\n"; print "<tr>\n"; print " <td> </td>\n"; print " <td align='left'>"; print "<input class='button' type='submit' value='".__("Upload")."' />\n"; + print " "; + print "<input class='button' type='reset' value='".__("Reset")."' />\n"; print "</td>\n"; print "</tr>\n"; print "</table>\n"; diff --git a/web/lang/submit_po.inc b/web/lang/submit_po.inc index fcab03c..dcc79b0 100644 --- a/web/lang/submit_po.inc +++ b/web/lang/submit_po.inc @@ -56,4 +56,119 @@ $_t["en"]["Overwrite existing package?"] = "Overwrite existing package?"; # $_t["fr"]["Overwrite existing package?"] = "--> Traduction française ici. <--"; # $_t["de"]["Overwrite existing package?"] = "--> Deutsche Übersetzung hier. <--"; +$_t["en"]["Missing build function in PKGBUILD."] = "Missing build function in PKGBUILD."; +# $_t["es"]["Missing build function in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing build function in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing build function in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Could not create incoming directory: %s."] = "Could not create incoming directory: %s."; +# $_t["es"]["Could not create incoming directory: %s."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Could not create incoming directory: %s."] = "--> Traduction française ici. <--"; +# $_t["de"]["Could not create incoming directory: %s."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Comments"] = "Comments"; +# $_t["es"]["Comments"] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Comments"] = "--> Traduction française ici. <--"; +# $_t["de"]["Comments"] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing pkgdesc variable in PKGBUILD."] = "Missing pkgdesc variable in PKGBUILD."; +# $_t["es"]["Missing pkgdesc variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing pkgdesc variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing pkgdesc variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Error exec'ing the mv command."] = "Error exec'ing the mv command."; +# $_t["es"]["Error exec'ing the mv command."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Error exec'ing the mv command."] = "--> Traduction française ici. <--"; +# $_t["de"]["Error exec'ing the mv command."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["You did not specify a package name."] = "You did not specify a package name."; +# $_t["es"]["You did not specify a package name."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["You did not specify a package name."] = "--> Traduction française ici. <--"; +# $_t["de"]["You did not specify a package name."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Error trying to unpack upload - PKGBUILD does not exist."] = "Error trying to unpack upload - PKGBUILD does not exist."; +# $_t["es"]["Error trying to unpack upload - PKGBUILD does not exist."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Error trying to unpack upload - PKGBUILD does not exist."] = "--> Traduction française ici. <--"; +# $_t["de"]["Error trying to unpack upload - PKGBUILD does not exist."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["You are not allowed to overwrite the %h%s%h package."] = "You are not allowed to overwrite the %h%s%h package."; +# $_t["es"]["You are not allowed to overwrite the %h%s%h package."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["You are not allowed to overwrite the %h%s%h package."] = "--> Traduction française ici. <--"; +# $_t["de"]["You are not allowed to overwrite the %h%s%h package."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Upload package file"] = "Upload package file"; +# $_t["es"]["Upload package file"] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Upload package file"] = "--> Traduction française ici. <--"; +# $_t["de"]["Upload package file"] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing url variable in PKGBUILD."] = "Missing url variable in PKGBUILD."; +# $_t["es"]["Missing url variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing url variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing url variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing pkgver variable in PKGBUILD."] = "Missing pkgver variable in PKGBUILD."; +# $_t["es"]["Missing pkgver variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing pkgver variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing pkgver variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Could not change to directory %s."] = "Could not change to directory %s."; +# $_t["es"]["Could not change to directory %s."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Could not change to directory %s."] = "--> Traduction française ici. <--"; +# $_t["de"]["Could not change to directory %s."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["You did not tag the 'overwrite' checkbox."] = "You did not tag the 'overwrite' checkbox."; +# $_t["es"]["You did not tag the 'overwrite' checkbox."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["You did not tag the 'overwrite' checkbox."] = "--> Traduction française ici. <--"; +# $_t["de"]["You did not tag the 'overwrite' checkbox."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Could not change directory to %s."] = "Could not change directory to %s."; +# $_t["es"]["Could not change directory to %s."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Could not change directory to %s."] = "--> Traduction française ici. <--"; +# $_t["de"]["Could not change directory to %s."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Invalid name: only lowercase letters are allowed."] = "Invalid name: only lowercase letters are allowed."; +# $_t["es"]["Invalid name: only lowercase letters are allowed."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Invalid name: only lowercase letters are allowed."] = "--> Traduction française ici. <--"; +# $_t["de"]["Invalid name: only lowercase letters are allowed."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Package names do not match."] = "Package names do not match."; +# $_t["es"]["Package names do not match."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Package names do not match."] = "--> Traduction française ici. <--"; +# $_t["de"]["Package names do not match."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Package name"] = "Package name"; +# $_t["es"]["Package name"] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Package name"] = "--> Traduction française ici. <--"; +# $_t["de"]["Package name"] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing md5sums variable in PKGBUILD."] = "Missing md5sums variable in PKGBUILD."; +# $_t["es"]["Missing md5sums variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing md5sums variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing md5sums variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing pkgrel variable in PKGBUILD."] = "Missing pkgrel variable in PKGBUILD."; +# $_t["es"]["Missing pkgrel variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing pkgrel variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing pkgrel variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing pkgname variable in PKGBUILD."] = "Missing pkgname variable in PKGBUILD."; +# $_t["es"]["Missing pkgname variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing pkgname variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing pkgname variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Could not create directory %s."] = "Could not create directory %s."; +# $_t["es"]["Could not create directory %s."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Could not create directory %s."] = "--> Traduction française ici. <--"; +# $_t["de"]["Could not create directory %s."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Unknown file format for uploaded file."] = "Unknown file format for uploaded file."; +# $_t["es"]["Unknown file format for uploaded file."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Unknown file format for uploaded file."] = "--> Traduction française ici. <--"; +# $_t["de"]["Unknown file format for uploaded file."] = "--> Deutsche Übersetzung hier. <--"; + +$_t["en"]["Missing source variable in PKGBUILD."] = "Missing source variable in PKGBUILD."; +# $_t["es"]["Missing source variable in PKGBUILD."] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Missing source variable in PKGBUILD."] = "--> Traduction française ici. <--"; +# $_t["de"]["Missing source variable in PKGBUILD."] = "--> Deutsche Übersetzung hier. <--"; + ?>
\ No newline at end of file diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 658dfba..bfdaa58 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -558,10 +558,11 @@ function pkg_search_page($SID="") { print " bottom'><span class='f2'>".__("Description")."</span></th>\n"; print " <th style='border-bottom: #666 1px solid; vertical-align:"; print " bottom'><span class='f2'>".__("Maintainer")."</span></th>\n"; - if ($SID) { - print " <th style='border-bottom: #666 1px solid; vertical-align:"; - print " bottom'><span class='f2'>".__("Manage")."</span></th>\n"; - } +# REMOVED LINK TO 'pkgmgmnt.php' +# if ($SID) { +# print " <th style='border-bottom: #666 1px solid; vertical-align:"; +# print " bottom'><span class='f2'>".__("Manage")."</span></th>\n"; +# } print "</tr>\n"; for ($i=0; $row = mysql_fetch_assoc($result); $i++) { @@ -633,17 +634,18 @@ function pkg_search_page($SID="") { } print "</span></span></td>\n"; - # print the managed link if applicable - # - if (canManagePackage($myuid, $row["AURMaintainerUID"], - $row["MaintainerUID"], $row["SubmitterUID"], $managed)) { - $manage_url = "<a href='/pkgmgmnt.php?ID="; - $manage_url.= $row["ID"]."'><span class='black'>Manage</span></a>"; - print " <td class='".$c."'><span class='f4'>"; - print $manage_url."</span></td>\n"; - } else { - print "<td class='".$c."'><span class='f4'> </span></td>\n"; - } +# REMOVED LINK TO 'pkgmgmnt.php' +# # print the managed link if applicable +# # +# if (canManagePackage($myuid, $row["AURMaintainerUID"], +# $row["MaintainerUID"], $row["SubmitterUID"], $managed)) { +# $manage_url = "<a href='/pkgmgmnt.php?ID="; +# $manage_url.= $row["ID"]."'><span class='black'>Manage</span></a>"; +# print " <td class='".$c."'><span class='f4'>"; +# print $manage_url."</span></td>\n"; +# } else { +# print "<td class='".$c."'><span class='f4'> </span></td>\n"; +# } print "</tr>\n"; |