aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-06-04 08:08:45 +0200
committerMichael Vogel <icarus@dabo.de>2012-06-04 08:08:45 +0200
commit5de91c2a7c924ac6067828a0e5bfbef5572c1f39 (patch)
tree006ccd67dcf06e5919f8228f3ef6290cfcf31560 /include
parentc707cba4c8cd8855124b1991cfe8fd2c0c34c8ba (diff)
downloadvolse-hubzilla-5de91c2a7c924ac6067828a0e5bfbef5572c1f39.tar.gz
volse-hubzilla-5de91c2a7c924ac6067828a0e5bfbef5572c1f39.tar.bz2
volse-hubzilla-5de91c2a7c924ac6067828a0e5bfbef5572c1f39.zip
API: Only repeat items if there is a content
Diffstat (limited to 'include')
-rw-r--r--include/api.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/api.php b/include/api.php
index 5697fbdbc..cd8526f89 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);