mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Be consistent in PHP logical operator usage
A mix of logical operator styles are currently in use. The predominant style uses "&&" and "||" instead of "and" and "or", respectively. This inconsistency is minor, but is easily avoided. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
e7f6deeb33
commit
345b3216c8
4 changed files with 8 additions and 8 deletions
|
@ -13,7 +13,7 @@ if (isset($_COOKIE["AURSID"])) {
|
||||||
$atype = "";
|
$atype = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($atype == "Trusted User" OR $atype == "Developer") {
|
if ($atype == "Trusted User" || $atype == "Developer") {
|
||||||
$dbh = db_connect();
|
$dbh = db_connect();
|
||||||
|
|
||||||
if (!empty($_POST['addVote'])) {
|
if (!empty($_POST['addVote'])) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ if (isset($_COOKIE["AURSID"])) {
|
||||||
$atype = account_from_sid($_COOKIE["AURSID"]);
|
$atype = account_from_sid($_COOKIE["AURSID"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($atype == "Trusted User" OR $atype == "Developer") {
|
if ($atype == "Trusted User" || $atype == "Developer") {
|
||||||
|
|
||||||
if (isset($_GET['id'])) {
|
if (isset($_GET['id'])) {
|
||||||
if (is_numeric($_GET['id'])) {
|
if (is_numeric($_GET['id'])) {
|
||||||
|
@ -123,7 +123,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
|
||||||
else
|
else
|
||||||
$by = 'desc';
|
$by = 'desc';
|
||||||
|
|
||||||
if (!empty($offset) AND is_numeric($offset)) {
|
if (!empty($offset) && is_numeric($offset)) {
|
||||||
if ($offset >= 1) {
|
if ($offset >= 1) {
|
||||||
$off = $offset;
|
$off = $offset;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1105,8 +1105,8 @@ function pkg_change_category($atype, $dbh=NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$uid = uid_from_sid($_COOKIE["AURSID"], $dbh);
|
$uid = uid_from_sid($_COOKIE["AURSID"], $dbh);
|
||||||
if ($uid == $pkg["MaintainerUID"] or
|
if ($uid == $pkg["MaintainerUID"] ||
|
||||||
($atype == "Developer" or $atype == "Trusted User")) {
|
($atype == "Developer" || $atype == "Trusted User")) {
|
||||||
$q = "UPDATE Packages ";
|
$q = "UPDATE Packages ";
|
||||||
$q.= "SET CategoryID = ".intval($category_id)." ";
|
$q.= "SET CategoryID = ".intval($category_id)." ";
|
||||||
$q.= "WHERE ID = ".intval($pid);
|
$q.= "WHERE ID = ".intval($pid);
|
||||||
|
|
|
@ -9,8 +9,8 @@ else {
|
||||||
$pkgid = pkgid_from_name($_REQUEST['N']);
|
$pkgid = pkgid_from_name($_REQUEST['N']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($uid == $row["MaintainerUID"] or
|
if ($uid == $row["MaintainerUID"] ||
|
||||||
($atype == "Developer" or $atype == "Trusted User")) {
|
($atype == "Developer" || $atype == "Trusted User")) {
|
||||||
|
|
||||||
$catarr = pkgCategories();
|
$catarr = pkgCategories();
|
||||||
$edit_cat = "<form method='post' action='packages.php?ID=".$pkgid."'>\n";
|
$edit_cat = "<form method='post' action='packages.php?ID=".$pkgid."'>\n";
|
||||||
|
@ -55,7 +55,7 @@ if ($row["MaintainerUID"]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$votes = __('Votes') . ': ' . $row['NumVotes'];
|
$votes = __('Votes') . ': ' . $row['NumVotes'];
|
||||||
if ($atype == "Developer" or $atype == "Trusted User") {
|
if ($atype == "Developer" || $atype == "Trusted User") {
|
||||||
$votes = "<a href=\"voters.php?ID=$pkgid\">$votes</a>";
|
$votes = "<a href=\"voters.php?ID=$pkgid\">$votes</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue