mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:02:54 +00:00
Removed "insert" parameter
This commit is contained in:
parent
06da3084f5
commit
c4062ddb3b
3 changed files with 7 additions and 9 deletions
|
@ -36,13 +36,11 @@ use Friendica\Model\Post\Category;
|
||||||
use Friendica\Protocol\Activity;
|
use Friendica\Protocol\Activity;
|
||||||
use Friendica\Protocol\ActivityPub;
|
use Friendica\Protocol\ActivityPub;
|
||||||
use Friendica\Protocol\Diaspora;
|
use Friendica\Protocol\Diaspora;
|
||||||
use Friendica\Protocol\OStatus;
|
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Map;
|
use Friendica\Util\Map;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\Security;
|
use Friendica\Util\Security;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
use Friendica\Util\XML;
|
|
||||||
use Friendica\Worker\Delivery;
|
use Friendica\Worker\Delivery;
|
||||||
use Text_LanguageDetect;
|
use Text_LanguageDetect;
|
||||||
use Friendica\Repository\PermissionSet as RepPermissionSet;
|
use Friendica\Repository\PermissionSet as RepPermissionSet;
|
||||||
|
@ -1595,7 +1593,7 @@ class Item
|
||||||
return GRAVITY_UNKNOWN; // Should not happen
|
return GRAVITY_UNKNOWN; // Should not happen
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function insert($item, $dummy = false, $notify = false, $dontcache = false)
|
public static function insert($item, $notify = false, $dontcache = false)
|
||||||
{
|
{
|
||||||
$orig_item = $item;
|
$orig_item = $item;
|
||||||
|
|
||||||
|
@ -2277,7 +2275,7 @@ class Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$distributed = self::insert($item, false, $notify, true);
|
$distributed = self::insert($item, $notify, true);
|
||||||
|
|
||||||
if (!$distributed) {
|
if (!$distributed) {
|
||||||
Logger::log("Distributed public item " . $itemid . " for user " . $uid . " wasn't stored", Logger::DEBUG);
|
Logger::log("Distributed public item " . $itemid . " for user " . $uid . " wasn't stored", Logger::DEBUG);
|
||||||
|
@ -2344,7 +2342,7 @@ class Item
|
||||||
$item['contact-id'] = $item['author-id'];
|
$item['contact-id'] = $item['author-id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$public_shadow = self::insert($item, false, false, true);
|
$public_shadow = self::insert($item, false, true);
|
||||||
|
|
||||||
Logger::log("Stored public shadow for thread ".$itemid." under id ".$public_shadow, Logger::DEBUG);
|
Logger::log("Stored public shadow for thread ".$itemid." under id ".$public_shadow, Logger::DEBUG);
|
||||||
}
|
}
|
||||||
|
@ -2402,7 +2400,7 @@ class Item
|
||||||
unset($item['inform']);
|
unset($item['inform']);
|
||||||
$item['contact-id'] = Contact::getIdForURL($item['author-link']);
|
$item['contact-id'] = Contact::getIdForURL($item['author-link']);
|
||||||
|
|
||||||
$public_shadow = self::insert($item, false, false, true);
|
$public_shadow = self::insert($item, false, true);
|
||||||
|
|
||||||
Logger::log("Stored public shadow for comment ".$item['uri']." under id ".$public_shadow, Logger::DEBUG);
|
Logger::log("Stored public shadow for comment ".$item['uri']." under id ".$public_shadow, Logger::DEBUG);
|
||||||
|
|
||||||
|
@ -2788,7 +2786,7 @@ class Item
|
||||||
|
|
||||||
if ($contact['network'] != Protocol::FEED) {
|
if ($contact['network'] != Protocol::FEED) {
|
||||||
// Store the original post
|
// Store the original post
|
||||||
$result = self::insert($datarray2, false, false);
|
$result = self::insert($datarray2);
|
||||||
Logger::log('remote-self post original item - Contact '.$contact['url'].' return '.$result.' Item '.print_r($datarray2, true), Logger::DEBUG);
|
Logger::log('remote-self post original item - Contact '.$contact['url'].' return '.$result.' Item '.print_r($datarray2, true), Logger::DEBUG);
|
||||||
} else {
|
} else {
|
||||||
$datarray["app"] = "Feed";
|
$datarray["app"] = "Feed";
|
||||||
|
|
|
@ -2584,7 +2584,7 @@ class DFRN
|
||||||
// Turn this into a wall post.
|
// Turn this into a wall post.
|
||||||
$notify = Item::isRemoteSelf($importer, $item);
|
$notify = Item::isRemoteSelf($importer, $item);
|
||||||
|
|
||||||
$posted_id = Item::insert($item, false, $notify);
|
$posted_id = Item::insert($item, $notify);
|
||||||
|
|
||||||
if ($notify) {
|
if ($notify) {
|
||||||
$posted_id = $notify;
|
$posted_id = $notify;
|
||||||
|
|
|
@ -511,7 +511,7 @@ class Feed {
|
||||||
$notify = PRIORITY_MEDIUM;
|
$notify = PRIORITY_MEDIUM;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = Item::insert($item, false, $notify);
|
$id = Item::insert($item, $notify);
|
||||||
|
|
||||||
Logger::info("Feed for contact " . $contact["url"] . " stored under id " . $id);
|
Logger::info("Feed for contact " . $contact["url"] . " stored under id " . $id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue