Continued rewriting:

- use dba::is_result() everywhere (where I found the old, bad way)
- converted some spaces -> tabs for code
- converted some CRLF -> LF as mixures of both is not good

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Haeder 2016-05-01 14:24:44 +02:00
parent 56a2bbc740
commit 3e701b90ac
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
93 changed files with 451 additions and 450 deletions

View file

@ -276,7 +276,7 @@ function event_store($arr) {
intval($arr['id']),
intval($arr['uid'])
);
return((count($r)) ? $r[0]['id'] : 0);
return((dba::is_result($r)) ? $r[0]['id'] : 0);
}
// The event changed. Update it.
@ -317,7 +317,7 @@ function event_store($arr) {
intval($arr['id']),
intval($arr['uid'])
);
if(count($r)) {
if(dba::is_result($r)) {
$object = '<object><type>' . xmlify(ACTIVITY_OBJ_EVENT) . '</type><title></title><id>' . xmlify($arr['uri']) . '</id>';
$object .= '<content>' . xmlify(format_event_bbcode($arr)) . '</content>';
$object .= '</object>' . "\n";
@ -376,7 +376,7 @@ function event_store($arr) {
dbesc($arr['uri']),
intval($arr['uid'])
);
if(count($r))
if(dba::is_result($r))
$event = $r[0];
$item_arr = array();
@ -418,7 +418,7 @@ function event_store($arr) {
$r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
intval($arr['uid'])
);
//if(count($r))
//if(dba::is_result($r))
// $plink = $a->get_baseurl() . '/display/' . $r[0]['nickname'] . '/' . $item_id;