From: Michael Vogel Date: Sat, 27 Sep 2014 21:37:05 +0000 (+0200) Subject: API: Set the application name to "api" (if not defined), "remote_self" has an applica... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=21c09c07325cf2b3d6985f9a6f878bfb048269e1;p=friendica.git API: Set the application name to "api" (if not defined), "remote_self" has an application name as well. --- diff --git a/include/api.php b/include/api.php index 69dc51bac9..f4e744f045 100644 --- a/include/api.php +++ b/include/api.php @@ -726,6 +726,9 @@ $_REQUEST['api_source'] = true; + if (!isset($_REQUEST["source"]) OR ($_REQUEST["source"] == "")) + $_REQUEST["source"] = "api"; + // call out normal post function require_once('mod/item.php'); @@ -1300,6 +1303,9 @@ $_REQUEST['type'] = 'wall'; $_REQUEST['api_source'] = true; + if (!isset($_REQUEST["source"]) OR ($_REQUEST["source"] == "")) + $_REQUEST["source"] = "api"; + require_once('mod/item.php'); item_post($a); } diff --git a/include/items.php b/include/items.php index e0e0c842b7..8cbcc3e6e9 100644 --- a/include/items.php +++ b/include/items.php @@ -1938,6 +1938,7 @@ function edited_timestamp_is_newer($existing, $update) { function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) { require_once('library/simplepie/simplepie.inc'); + require_once('include/contact_selectors.php'); if(! strlen($xml)) { logger('consume_feed: empty input'); @@ -2593,6 +2594,9 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) } } + if (!isset($datarray["app"]) OR ($datarray["app"] == "")) + $datarray["app"] = network_to_name($contact['network']); + $notify = true; if($contact['network'] === NETWORK_FEED) { $datarray['private'] = 0;