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 Haeder 2016-12-20 21:13:50 +01:00
parent de689583e2
commit 6c0c9d542a
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
18 changed files with 82 additions and 67 deletions

View file

@ -294,7 +294,7 @@ function profile_sidebar($profile, $block = 0) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
$profile['menu']['entries'][] = array(
'photo' => $rr['thumb'],
'id' => $rr['id'],
@ -469,7 +469,7 @@ function get_birthdays() {
$cids = array();
$istoday = false;
foreach($r as $rr) {
foreach ($r as $rr) {
if(strlen($rr['name']))
$total ++;
if((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now))
@ -549,7 +549,7 @@ function get_events() {
if (dbm::is_result($r)) {
$now = strtotime('now');
$istoday = false;
foreach($r as $rr) {
foreach ($r as $rr) {
if(strlen($rr['name']))
$total ++;