added curly braces + space between "if" and brace + added missing @param

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-20 11:18:54 +01:00
parent e05a8e9974
commit fa444f373c

View File

@ -766,8 +766,9 @@ function item_post(&$a) {
}
$json = array('cancel' => 1);
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
if (x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) {
$json['reload'] = App::get_baseurl() . '/' . $_REQUEST['jsreload'];
}
echo json_encode($json);
killme();
@ -1054,8 +1055,9 @@ function item_post_return($baseurl, $api_source, $return_path) {
}
$json = array('success' => 1);
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
if (x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) {
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
}
logger('post_json: ' . print_r($json,true), LOGGER_DEBUG);
@ -1067,8 +1069,9 @@ function item_post_return($baseurl, $api_source, $return_path) {
function item_content(&$a) {
if((! local_user()) && (! remote_user()))
if ((! local_user()) && (! remote_user())) {
return;
}
require_once('include/security.php');
@ -1088,6 +1091,7 @@ function item_content(&$a) {
* This function removes the tag $tag from the text $body and replaces it with
* the appropiate link.
*
* @param App $a Application instance @TODO is unused in this function's scope (excluding included files)
* @param unknown_type $body the text to replace the tag in
* @param string $inform a comma-seperated string containing everybody to inform
* @param string $str_tags string to add the tag to
@ -1110,8 +1114,9 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo
if (strpos($tag,'[url=')) {
//append tag to str_tags
if (!stristr($str_tags,$tag)) {
if(strlen($str_tags))
if (strlen($str_tags)) {
$str_tags .= ',';
}
$str_tags .= $tag;
}