mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
added swiergot's checking patch as well as modifying it to also
list package name in green on the package list page (with legend)
This commit is contained in:
parent
37cc16182a
commit
a8999a6917
8 changed files with 252 additions and 113 deletions
|
@ -1,108 +1,124 @@
|
|||
/* Standard Fonts */
|
||||
span /* Applicable by default in all fonts */
|
||||
{
|
||||
color: #666;
|
||||
font-family: verdana, trebuchet ms, tahoma, luxi sans;
|
||||
}
|
||||
span.f1 /* Important */
|
||||
{
|
||||
font-family: verdana;
|
||||
font-size: 20px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
span.f2 /* Title */
|
||||
{
|
||||
font-size: 14px;
|
||||
color: rgb(108, 131, 176);
|
||||
font-weight: bold;
|
||||
}
|
||||
span.f3 /* Sub Title */
|
||||
{
|
||||
color: #888;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
span.f4 /* Content Text */
|
||||
{
|
||||
color: #444;
|
||||
font-family: verdana;
|
||||
font-size: 12px;
|
||||
}
|
||||
span.f5 /* Content Small */
|
||||
{
|
||||
color: #333;
|
||||
font-family: trebuchet ms, tahoma, verdana;
|
||||
font-size: 11px;
|
||||
}
|
||||
span.fix /* Monospace fixed-font */
|
||||
{
|
||||
color: #000;
|
||||
font-family: monospace, fixed, terminal;
|
||||
font-size: 12px;
|
||||
}
|
||||
span.error /* Content Text */
|
||||
{
|
||||
color: #900;
|
||||
font-family: verdana;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Font Attribute Change (#6c83b0)*/
|
||||
span.blue
|
||||
{
|
||||
color: rgb( 108, 131, 176 );
|
||||
}
|
||||
span.white
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
span.black
|
||||
{
|
||||
color: black;
|
||||
}
|
||||
span.link
|
||||
{
|
||||
color: rgb( 108, 131, 176 );
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Misc (c9d1e2) */
|
||||
span.preHeader
|
||||
{
|
||||
color: rgb( 201, 209, 226 );
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
font-family: tahoma, trebuchet ms, verdana;
|
||||
padding-right: 8px;
|
||||
word-spacing: 8px;
|
||||
}
|
||||
span.sideBarSmallHeader
|
||||
{
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
font-family: tahoma, trebuchet ms, verdana;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: rgb(108,131,176);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: rgb(108,131,176);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #990000;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4 {
|
||||
font-size: 16pt;
|
||||
}
|
||||
/* Standard Fonts */
|
||||
span /* Applicable by default in all fonts */
|
||||
{
|
||||
color: #666;
|
||||
font-family: verdana, trebuchet ms, tahoma, luxi sans;
|
||||
}
|
||||
span.f1 /* Important */
|
||||
{
|
||||
font-family: verdana;
|
||||
font-size: 20px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
span.f2 /* Title */
|
||||
{
|
||||
font-size: 14px;
|
||||
color: rgb(108, 131, 176);
|
||||
font-weight: bold;
|
||||
}
|
||||
span.f3 /* Sub Title */
|
||||
{
|
||||
color: #888;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
span.f4 /* Content Text */
|
||||
{
|
||||
color: #444;
|
||||
font-family: verdana;
|
||||
font-size: 12px;
|
||||
}
|
||||
span.f5 /* Content Small */
|
||||
{
|
||||
color: #333;
|
||||
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;
|
||||
font-family: monospace, fixed, terminal;
|
||||
font-size: 12px;
|
||||
}
|
||||
span.error /* Content Text */
|
||||
{
|
||||
color: #900;
|
||||
font-family: verdana;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Font Attribute Change (#6c83b0)*/
|
||||
span.blue
|
||||
{
|
||||
color: rgb( 108, 131, 176 );
|
||||
}
|
||||
span.white
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
span.black
|
||||
{
|
||||
color: black;
|
||||
}
|
||||
span.green
|
||||
{
|
||||
color: #6db06d;
|
||||
}
|
||||
span.link
|
||||
{
|
||||
color: rgb( 108, 131, 176 );
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Misc (c9d1e2) */
|
||||
span.preHeader
|
||||
{
|
||||
color: rgb( 201, 209, 226 );
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
font-family: tahoma, trebuchet ms, verdana;
|
||||
padding-right: 8px;
|
||||
word-spacing: 8px;
|
||||
}
|
||||
span.sideBarSmallHeader
|
||||
{
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
font-family: tahoma, trebuchet ms, verdana;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: rgb(108,131,176);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: rgb(108,131,176);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #990000;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4 {
|
||||
font-size: 16pt;
|
||||
}
|
||||
|
|
|
@ -462,6 +462,54 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
pkgsearch_results_link();
|
||||
|
||||
|
||||
} elseif (isset($_REQUEST["do_FlagSafe"])) {
|
||||
if (!$atype) {
|
||||
print __("You must be logged in before you can flag packages.");
|
||||
print "<br />\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 '<p>';
|
||||
print __("The selected packages have been flagged safe.");
|
||||
print '<br /></p>';
|
||||
pkgdetails_link($pid);
|
||||
}
|
||||
} else {
|
||||
print '<p>';
|
||||
print __("Couldn't flag package safe.");
|
||||
print '<br /></p>';
|
||||
}
|
||||
}
|
||||
|
||||
} elseif (isset($_REQUEST["do_UnFlagSafe"])) {
|
||||
if (!$atype) {
|
||||
print __("You must be logged in before you can unflag packages.");
|
||||
print "<br />\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 = 0 WHERE ID = ".$pid;
|
||||
db_query($q, $dbh);
|
||||
print '<p>';
|
||||
print __("The selected packages have been unflagged safe.");
|
||||
print '<br /></p>';
|
||||
pkgdetails_link($pid);
|
||||
}
|
||||
} else {
|
||||
print '<p>';
|
||||
print __("Couldn't unflag package safe.");
|
||||
print '<br /></p>';
|
||||
}
|
||||
}
|
||||
|
||||
} 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
|
||||
|
|
|
@ -376,6 +376,7 @@ if ($_COOKIE["AURSID"]) {
|
|||
$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"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue