Revert "Coding convention applied - part 1"

This commit is contained in:
Hypolite Petovan 2017-03-21 12:02:59 -04:00 committed by GitHub
commit 7b352f3f74
181 changed files with 3507 additions and 4338 deletions

View file

@ -1345,11 +1345,10 @@ function photos_content(App $a) {
// The query leads to a really intense used index.
// By now we hide it if someone wants to.
if (!Config::get('system', 'no_count', false)) {
if ($_GET['order'] === 'posted') {
if ($_GET['order'] === 'posted')
$order = 'ASC';
} else {
else
$order = 'DESC';
}
$prvnxt = qu("SELECT `resource-id` FROM `photo` WHERE `album` = '%s' AND `uid` = %d AND `scale` = 0
$sql_extra ORDER BY `created` $order ",
@ -1357,17 +1356,15 @@ function photos_content(App $a) {
intval($owner_uid)
);
if (dbm::is_result($prvnxt)) {
if (count($prvnxt)) {
for($z = 0; $z < count($prvnxt); $z++) {
if ($prvnxt[$z]['resource-id'] == $ph[0]['resource-id']) {
$prv = $z - 1;
$nxt = $z + 1;
if ($prv < 0) {
if ($prv < 0)
$prv = count($prvnxt) - 1;
}
if ($nxt >= count($prvnxt)) {
if ($nxt >= count($prvnxt))
$nxt = 0;
}
break;
}
}
@ -1377,9 +1374,8 @@ function photos_content(App $a) {
}
}
if (count($ph) == 1) {
if (count($ph) == 1)
$hires = $lores = $ph[0];
}
if (count($ph) > 1) {
if ($ph[1]['scale'] == 2) {
// original is 640 or less, we can display it directly