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:
parent
e05a8e9974
commit
fa444f373c
25
mod/item.php
25
mod/item.php
|
@ -766,8 +766,9 @@ function item_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$json = array('cancel' => 1);
|
$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'];
|
$json['reload'] = App::get_baseurl() . '/' . $_REQUEST['jsreload'];
|
||||||
|
}
|
||||||
|
|
||||||
echo json_encode($json);
|
echo json_encode($json);
|
||||||
killme();
|
killme();
|
||||||
|
@ -1049,13 +1050,14 @@ function item_post_return($baseurl, $api_source, $return_path) {
|
||||||
if($api_source)
|
if($api_source)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if($return_path) {
|
if ($return_path) {
|
||||||
goaway($return_path);
|
goaway($return_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
$json = array('success' => 1);
|
$json = array('success' => 1);
|
||||||
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
|
if (x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) {
|
||||||
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
|
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
|
||||||
|
}
|
||||||
|
|
||||||
logger('post_json: ' . print_r($json,true), LOGGER_DEBUG);
|
logger('post_json: ' . print_r($json,true), LOGGER_DEBUG);
|
||||||
|
|
||||||
|
@ -1067,15 +1069,16 @@ function item_post_return($baseurl, $api_source, $return_path) {
|
||||||
|
|
||||||
function item_content(&$a) {
|
function item_content(&$a) {
|
||||||
|
|
||||||
if((! local_user()) && (! remote_user()))
|
if ((! local_user()) && (! remote_user())) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
if(($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
|
if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
|
||||||
$o = drop_item($a->argv[2], !is_ajax());
|
$o = drop_item($a->argv[2], !is_ajax());
|
||||||
if (is_ajax()){
|
if (is_ajax()) {
|
||||||
// ajax return: [<item id>, 0 (no perm) | <owner id>]
|
// ajax return: [<item id>, 0 (no perm) | <owner id>]
|
||||||
echo json_encode(array(intval($a->argv[2]), intval($o)));
|
echo json_encode(array(intval($a->argv[2]), intval($o)));
|
||||||
killme();
|
killme();
|
||||||
|
@ -1088,6 +1091,7 @@ function item_content(&$a) {
|
||||||
* This function removes the tag $tag from the text $body and replaces it with
|
* This function removes the tag $tag from the text $body and replaces it with
|
||||||
* the appropiate link.
|
* 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 unknown_type $body the text to replace the tag in
|
||||||
* @param string $inform a comma-seperated string containing everybody to inform
|
* @param string $inform a comma-seperated string containing everybody to inform
|
||||||
* @param string $str_tags string to add the tag to
|
* @param string $str_tags string to add the tag to
|
||||||
|
@ -1105,13 +1109,14 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo
|
||||||
$r = null;
|
$r = null;
|
||||||
|
|
||||||
//is it a person tag?
|
//is it a person tag?
|
||||||
if(strpos($tag,'@') === 0) {
|
if (strpos($tag,'@') === 0) {
|
||||||
//is it already replaced?
|
//is it already replaced?
|
||||||
if(strpos($tag,'[url=')) {
|
if (strpos($tag,'[url=')) {
|
||||||
//append tag to str_tags
|
//append tag to str_tags
|
||||||
if(!stristr($str_tags,$tag)) {
|
if (!stristr($str_tags,$tag)) {
|
||||||
if(strlen($str_tags))
|
if (strlen($str_tags)) {
|
||||||
$str_tags .= ',';
|
$str_tags .= ',';
|
||||||
|
}
|
||||||
$str_tags .= $tag;
|
$str_tags .= $tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue