Coding convention applied:
- space between "if" and brace - curly braces on conditional blocks Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
dac1dbd3e9
commit
fb676335db
53 changed files with 117 additions and 87 deletions
|
@ -105,8 +105,9 @@ class dfrn {
|
|||
dbesc($owner_nick)
|
||||
);
|
||||
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
killme();
|
||||
}
|
||||
|
||||
$owner = $r[0];
|
||||
$owner_id = $owner['uid'];
|
||||
|
@ -139,8 +140,9 @@ class dfrn {
|
|||
intval($owner_id)
|
||||
);
|
||||
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
killme();
|
||||
}
|
||||
|
||||
$contact = $r[0];
|
||||
require_once('include/security.php');
|
||||
|
|
|
@ -254,7 +254,7 @@ function new_contact($uid,$url,$interactive = false) {
|
|||
intval($uid)
|
||||
);
|
||||
|
||||
if(! dbm::is_result($r)) {
|
||||
if (! dbm::is_result($r)) {
|
||||
$result['message'] .= t('Unable to retrieve contact information.') . EOL;
|
||||
return $result;
|
||||
}
|
||||
|
|
|
@ -143,13 +143,14 @@ function group_add_member($uid,$name,$member,$gid = 0) {
|
|||
return true; // You might question this, but
|
||||
// we indicate success because the group member was in fact created
|
||||
// -- It was just created at another time
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
$r = q("INSERT INTO `group_member` (`uid`, `gid`, `contact-id`)
|
||||
VALUES( %d, %d, %d ) ",
|
||||
intval($uid),
|
||||
intval($gid),
|
||||
intval($member)
|
||||
);
|
||||
);
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,8 +78,9 @@ function do_like($item_id, $verb) {
|
|||
intval($item['contact-id']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
return false;
|
||||
}
|
||||
if(! $r[0]['self'])
|
||||
$remote_owner = $r[0];
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ function lock_function($fn_name, $block = true, $wait_sec = 2, $timeout = 30) {
|
|||
);
|
||||
$got_lock = true;
|
||||
}
|
||||
elseif(! dbm::is_result($r)) {
|
||||
elseif (! dbm::is_result($r)) {
|
||||
/// @TODO the Boolean value for count($r) should be equivalent to the Boolean value of $r
|
||||
q("INSERT INTO `locks` (`name`, `created`, `locked`) VALUES ('%s', '%s', 1)",
|
||||
dbesc($fn_name),
|
||||
|
|
|
@ -210,8 +210,9 @@ function notifier_run(&$argv, &$argc){
|
|||
intval($uid)
|
||||
);
|
||||
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$owner = $r[0];
|
||||
|
||||
|
|
|
@ -143,8 +143,9 @@ function onepoll_run(&$argv, &$argc){
|
|||
$r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` INNER JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
|
||||
intval($importer_uid)
|
||||
);
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$importer = $r[0];
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ function auto_redir(&$a, $contact_nick) {
|
|||
dbesc($nurl)
|
||||
);
|
||||
|
||||
if((! dbm::is_result($r)) || $r[0]['id'] == remote_user())
|
||||
if ((! dbm::is_result($r)) || $r[0]['id'] == remote_user()) {
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
$r = q("SELECT * FROM contact WHERE nick = '%s'
|
||||
AND network = '%s' AND uid = %d AND url LIKE '%%%s%%' LIMIT 1",
|
||||
|
@ -48,8 +48,9 @@ function auto_redir(&$a, $contact_nick) {
|
|||
dbesc($baseurl)
|
||||
);
|
||||
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cid = $r[0]['id'];
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
|
|||
intval($gcid),
|
||||
intval($zcid)
|
||||
);
|
||||
if(! dbm::is_result($r)) {
|
||||
if (! dbm::is_result($r)) {
|
||||
q("INSERT INTO `glink` (`cid`,`uid`,`gcid`,`zcid`, `updated`) VALUES (%d,%d,%d,%d, '%s') ",
|
||||
intval($cid),
|
||||
intval($uid),
|
||||
|
|
|
@ -2000,8 +2000,9 @@ function file_tag_unsave_file($uid,$item,$file,$cat = false) {
|
|||
intval($item),
|
||||
intval($uid)
|
||||
);
|
||||
if(! dbm::is_result($r))
|
||||
if (! dbm::is_result($r)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
q("UPDATE `item` SET `file` = '%s' WHERE `id` = %d AND `uid` = %d",
|
||||
dbesc(str_replace($pattern,'',$r[0]['file'])),
|
||||
|
@ -2020,11 +2021,11 @@ function file_tag_unsave_file($uid,$item,$file,$cat = false) {
|
|||
//$r = q("select file from item where uid = %d and deleted = 0 " . file_tag_file_query('item',$file,(($cat) ? 'category' : 'file')),
|
||||
//);
|
||||
|
||||
if(! dbm::is_result($r)) {
|
||||
if (! dbm::is_result($r)) {
|
||||
$saved = get_pconfig($uid,'system','filetags');
|
||||
set_pconfig($uid,'system','filetags',str_replace($pattern,'',$saved));
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue