aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-05 17:58:56 -0700
committerfriendica <info@friendica.com>2012-06-05 17:58:56 -0700
commitd873ceb71995db5d669f2d5ffe85d85a8974efeb (patch)
tree86ce9b64807a17bc10859f8071fcbdeb41cc9a8e /include/api.php
parentc7b1b4b752de738c7e1fa124b61ab73bdaca628c (diff)
parent0353410cd4b8153fd2b6e9d3524c6e46ad4acd68 (diff)
downloadvolse-hubzilla-d873ceb71995db5d669f2d5ffe85d85a8974efeb.tar.gz
volse-hubzilla-d873ceb71995db5d669f2d5ffe85d85a8974efeb.tar.bz2
volse-hubzilla-d873ceb71995db5d669f2d5ffe85d85a8974efeb.zip
Merge pull request #325 from annando/master
API: Repeating items only when there is content
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/api.php b/include/api.php
index 5c17b35f5..9925b5766 100644
--- a/include/api.php
+++ b/include/api.php
@@ -898,7 +898,7 @@
// params
$id = intval($a->argv[3]);
- logger('API: api_statuses_repeat: '.$id);
+ logger('API: api_statuses_repeat: '.$id);
//$include_entities = (x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:false);
@@ -915,13 +915,15 @@
intval($id)
);
- $_REQUEST['body'] = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8')."[url=".$r[0]['reply_url']."]".$r[0]['reply_author']."[/url] \n".$r[0]['body'];
- $_REQUEST['profile_uid'] = local_user();
- $_REQUEST['type'] = 'wall';
- $_REQUEST['api_source'] = true;
+ if ($r[0]['body'] != "") {
+ $_REQUEST['body'] = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8')."[url=".$r[0]['reply_url']."]".$r[0]['reply_author']."[/url] \n".$r[0]['body'];
+ $_REQUEST['profile_uid'] = local_user();
+ $_REQUEST['type'] = 'wall';
+ $_REQUEST['api_source'] = true;
- require_once('mod/item.php');
- item_post($a);
+ require_once('mod/item.php');
+ item_post($a);
+ }
if ($type == 'xml')
$ok = "true";
@@ -943,7 +945,7 @@
// params
$id = intval($a->argv[3]);
- logger('API: api_statuses_destroy: '.$id);
+ logger('API: api_statuses_destroy: '.$id);
require_once('include/items.php');
drop_item($id, false);