Index: support/schema/aur-schema.sql
===================================================================
--- support/schema/aur-schema.sql (wersja 204)
+++ support/schema/aur-schema.sql (kopia robocza)
@@ -122,6 +122,8 @@
SubmitterUID INTEGER UNSIGNED NOT NULL DEFAULT 0, -- who submitted it?
MaintainerUID INTEGER UNSIGNED NOT NULL DEFAULT 0, -- User
AURMaintainerUID INTEGER UNSIGNED NOT NULL DEFAULT 0, -- TU/Dev
+ Safe TINYINT UNSIGNED NOT NULL DEFAULT 0, -- verified to be safe?
+ VerifiedBy INTEGER UNSIGNED NOT NULL DEFAULT 0, -- who verified?
PRIMARY KEY (ID),
UNIQUE (Name),
INDEX (CategoryID),
@@ -132,6 +134,8 @@
INDEX (SubmitterUID),
INDEX (MaintainerUID),
INDEX (AURMaintainerUID),
+ INDEX (Safe),
+ INDEX (VerifiedBy),
FOREIGN KEY (CategoryID) REFERENCES PackageCategories(ID) ON DELETE NO ACTION,
FOREIGN KEY (LocationID) REFERENCES PackageLocations(ID) ON DELETE NO ACTION,
FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE NO ACTION,
Index: web/lang/en/pkgfuncs_po.inc
===================================================================
--- web/lang/en/pkgfuncs_po.inc (wersja 204)
+++ web/lang/en/pkgfuncs_po.inc (kopia robocza)
@@ -109,4 +109,16 @@
$_t["en"]["Comments"] = "Comments";
+$_t["en"]["The above files have been verified (by %s) and are safe to use."] = "The above files have been verified (by %s) and are safe to use.";
+
+$_t["en"]["Be careful! The above files may contain malicious code that can damage your system."] = "Be careful! The above files may contain malicious code that can damage your system.";
+
+$_t["en"]["Flag Safe"] = "Flag Safe";
+
+$_t["en"]["Flag Package Safe To Use"] = "Flag Package Safe To Use";
+
+$_t["en"]["Unflag Safe"] = "Unflag Safe";
+
+$_t["en"]["Unflag Package Safe To Use"] = "Unflag Package Safe To Use";
+
?>
\ No newline at end of file
Index: web/lang/en/search_po.inc
===================================================================
--- web/lang/en/search_po.inc (wersja 204)
+++ web/lang/en/search_po.inc (kopia robocza)
@@ -67,4 +67,12 @@
$_t["en"]["Couldn't remove from notification list."] = "Couldn't remove from notification list.";
+$_t["en"]["The selected packages have been flagged safe."] = "The selected packages have been flagged safe.";
+
+$_t["en"]["Couldn't flag package safe."] = "Couldn't flag package safe.";
+
+$_t["en"]["The selected packages have been unflagged safe."] = "The selected packages have been unflagged safe.";
+
+$_t["en"]["Couldn't unflag package safe."] = "Couldn't unflag package safe.";
+
?>
\ No newline at end of file
Index: web/lang/pl/pkgfuncs_po.inc
===================================================================
--- web/lang/pl/pkgfuncs_po.inc (wersja 204)
+++ web/lang/pl/pkgfuncs_po.inc (kopia robocza)
@@ -65,4 +65,16 @@
$_t["pl"]["New Comment Notification"] = "Powiadomienie o nowym komentarzu.";
-?>
\ No newline at end of file
+$_t["pl"]["The above files have been verified (by %s) and are safe to use."] = "Powyższe pliki zostały sprawdzone (przez: %s) i możesz ich bezpiecznie uzywać.";
+
+$_t["pl"]["Be careful! The above files may contain malicious code that can damage your system."] = "Zachowaj ostrożność! Powyższe pliki mogą zawierać szkodliwy kod zagrażający twojemu systemowi.";
+
+$_t["pl"]["Flag Safe"] = "Zaznacz jako bezpieczny";
+
+$_t["pl"]["Flag Package Safe To Use"] = "Zaznacz pakiet jako bezpieczny w użyciu";
+
+$_t["pl"]["Unflag Safe"] = "Usuń flagę bezpieczeństwa";
+
+$_t["pl"]["Unflag Package Safe To Use"] = "Usuń flagę oznaczającą pakiet jako bezpieczny w użyciu";
+
+?>
Index: web/lang/pl/search_po.inc
===================================================================
--- web/lang/pl/search_po.inc (wersja 204)
+++ web/lang/pl/search_po.inc (kopia robocza)
@@ -48,4 +48,12 @@
$_t["pl"]["Couldn't remove from notification list."] = "Usunięcie z listy powiadamiania nie powiodło się.";
-?>
\ No newline at end of file
+$_t["pl"]["The selected packages have been flagged safe."] = "Wybrane pakiety zostały zaznaczone jako bezpieczne.";
+
+$_t["pl"]["Couldn't flag package safe."] = "Zaznaczenie pakietu jako bezpiecznego nie powiodło się.";
+
+$_t["pl"]["The selected packages have been unflagged safe."] = "Wybrane pakiety zostały odznaczone jako bezpieczne.";
+
+$_t["pl"]["Couldn't unflag package safe."] = "Odznaczenie pakietu jako bezpiecznego nie powiodło się.";
+
+?>
Index: web/html/css/fonts.css
===================================================================
--- web/html/css/fonts.css (wersja 204)
+++ web/html/css/fonts.css (kopia robocza)
@@ -34,6 +34,18 @@
font-family: trebuchet ms, tahoma, verdana;
font-size: 11px;
}
+ span.f6 /* Red Message */
+ {
+ color: #b06d6e;
+ font-size: 14px;
+ font-weight: bold;
+ }
+ span.f7 /* Green Message */
+ {
+ color: #6db06d;
+ font-size: 14px;
+ font-weight: bold;
+ }
span.fix /* Monospace fixed-font */
{
color: #000;
Index: web/html/pkgsubmit.php
===================================================================
--- web/html/pkgsubmit.php (wersja 204)
+++ web/html/pkgsubmit.php (kopia robocza)
@@ -376,6 +376,7 @@
$q.="Description='".mysql_escape_string($new_pkgbuild['pkgdesc'])."', ";
$q.="URL='".mysql_escape_string($new_pkgbuild['url'])."', ";
$q.="LocationID=2, ";
+ $q.="Safe=0, ";
$fspath=$INCOMING_DIR.$pkg_name."/".$_FILES["pfile"]["name"];
$q.="FSPath='".mysql_escape_string($fspath)."', ";
$urlpath=$URL_DIR.$pkg_name."/".$_FILES["pfile"]["name"];
Index: web/html/packages.php
===================================================================
--- web/html/packages.php (wersja 204)
+++ web/html/packages.php (kopia robocza)
@@ -462,6 +462,54 @@
pkgsearch_results_link();
+} elseif (isset($_REQUEST["do_FlagSafe"])) {
+ if (!$atype) {
+ print __("You must be logged in before you can flag packages.");
+ print "
\n";
+ } else {
+ if (!empty($ids) || $atype == "User") {
+ $dbh = db_connect();
+ # There currently shouldn't be multiple requests here, but the format in which
+ # it's sent requires this
+ while (list($pid, $v) = each($ids)) {
+ $q = "UPDATE Packages SET Safe = 1, VerifiedBy = ".uid_from_sid($_COOKIE["AURSID"])." WHERE ID = ".$pid;
+ db_query($q, $dbh);
+ print '
';
+ print __("The selected packages have been flagged safe.");
+ print '
';
+ print __("Couldn't flag package safe.");
+ print '
';
+ print __("The selected packages have been unflagged safe.");
+ print '
';
+ print __("Couldn't unflag package safe.");
+ print '