Continued with coding convention:

- added curly braces around conditional code blocks
- added space between if/foreach/... and brace
- rewrote a code block so if dbm::is_result() fails it will abort, else the id
  is fetched from INSERT statement
- made some SQL keywords upper-cased and added back-ticks to columns/table names

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-20 21:15:53 +01:00
commit 52f14ffa5f
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
31 changed files with 173 additions and 127 deletions

View file

@ -255,7 +255,7 @@ function photos_post(&$a) {
);
}
if (dbm::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
$res[] = "'" . dbesc($rr['rid']) . "'" ;
}
} else {
@ -277,7 +277,7 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
if (dbm::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
dbesc(datetime_convert()),
dbesc($rr['parent-uri']),