Index: web/lang/en/pkgfuncs_po.inc =================================================================== --- web/lang/en/pkgfuncs_po.inc (wersja 201) +++ web/lang/en/pkgfuncs_po.inc (kopia robocza) @@ -109,4 +109,12 @@ $_t["en"]["Comments"] = "Comments"; +$_t["en"]["This package has been verified and is safe to use."] = "This package has been verified and is 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"; + ?> \ No newline at end of file Index: web/lang/en/search_po.inc =================================================================== --- web/lang/en/search_po.inc (wersja 201) +++ web/lang/en/search_po.inc (kopia robocza) @@ -67,4 +67,8 @@ $_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."; + ?> \ No newline at end of file Index: web/lang/pl/pkgfuncs_po.inc =================================================================== --- web/lang/pl/pkgfuncs_po.inc (wersja 201) +++ web/lang/pl/pkgfuncs_po.inc (kopia robocza) @@ -65,4 +65,12 @@ $_t["pl"]["New Comment Notification"] = "Powiadomienie o nowym komentarzu."; -?> \ No newline at end of file +$_t["pl"]["This package has been verified and is safe to use."] = "Ten pakiet został sprawdzony i możesz go 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"; + +?> Index: web/lang/pl/search_po.inc =================================================================== --- web/lang/pl/search_po.inc (wersja 201) +++ web/lang/pl/search_po.inc (kopia robocza) @@ -48,4 +48,8 @@ $_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ę."; + +?> Index: web/html/pkgsubmit.php =================================================================== --- web/html/pkgsubmit.php (wersja 201) +++ web/html/pkgsubmit.php (kopia robocza) @@ -355,6 +355,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 201) +++ web/html/packages.php (kopia robocza) @@ -462,6 +462,30 @@ 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 WHERE ID = ".$pid; + db_query($q, $dbh); + print '

'; + print __("The selected packages have been flagged safe."); + print '

'; + pkgdetails_link($pid); + } + } else { + print '

'; + print __("Couldn't flag package safe."); + print '

'; + } + } + } elseif (isset($_REQUEST["do_Notify"])) { # I realize that the implementation here seems a bit convoluted, but we want to # ensure that everything happens as it should, even if someone called this page Index: web/lib/pkgfuncs.inc =================================================================== --- web/lib/pkgfuncs.inc (wersja 201) +++ web/lib/pkgfuncs.inc (kopia robocza) @@ -334,6 +334,15 @@ print "CVS"; } print "\n"; + if ($row["LocationID"] == 2) { + print "\n"; + print " "; + if ($row["Safe"]) { + print __("This package has been verified and is safe to use.").""; + } else { + print __("Be careful! The above files may contain malicious code that can damage your system.").""; + } + } print "\n"; print " "; print "\n"; @@ -429,6 +438,13 @@ print ""; } + # Flag Safe Button + # + if ($row["LocationID"] == 2 && (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer") && $row["Safe"] == 0) + { + print ""; + } print "\n"; print "
\n"; }