Merge pull request #1166 from annando/1409-issue-1158

issue #1158 - and other stuff that I didn't wanted to merge (I hate GIT)
This commit is contained in:
fabrixxm 2014-09-29 09:23:09 +02:00
commit d60122e7a6
2 changed files with 11 additions and 1 deletions

View File

@ -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);
}
@ -1387,7 +1393,7 @@
AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`parent` IN (SELECT `iid` from thread where uid = %d AND `mention`)
AND `item`.`parent` IN (SELECT `iid` from thread where uid = %d AND `mention` AND !`ignored`)
$sql_extra
AND `item`.`id`>%d
ORDER BY `item`.`id` DESC LIMIT %d ,%d ",

View File

@ -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;