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:
parent
af2909bf8f
commit
6e44acfed6
31 changed files with 173 additions and 127 deletions
|
@ -157,8 +157,9 @@ function follow_post(App &$a) {
|
|||
// NOTREACHED
|
||||
}
|
||||
|
||||
if ($_REQUEST['cancel'])
|
||||
if ($_REQUEST['cancel']) {
|
||||
goaway($_SESSION['return_url']);
|
||||
}
|
||||
|
||||
$uid = local_user();
|
||||
$url = notags(trim($_REQUEST['url']));
|
||||
|
@ -170,17 +171,21 @@ function follow_post(App &$a) {
|
|||
|
||||
$result = new_contact($uid,$url,true);
|
||||
|
||||
if($result['success'] == false) {
|
||||
if($result['message'])
|
||||
if ($result['success'] == false) {
|
||||
if ($result['message']) {
|
||||
notice($result['message']);
|
||||
}
|
||||
goaway($return_url);
|
||||
} elseif ($result['cid'])
|
||||
}
|
||||
elseif ($result['cid']) {
|
||||
goaway(App::get_baseurl().'/contacts/'.$result['cid']);
|
||||
}
|
||||
|
||||
info( t('Contact added').EOL);
|
||||
|
||||
if(strstr($return_url,'contacts'))
|
||||
if (strstr($return_url,'contacts')) {
|
||||
goaway(App::get_baseurl().'/contacts/'.$contact_id);
|
||||
}
|
||||
|
||||
goaway($return_url);
|
||||
// NOTREACHED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue