Merge remote-tracking branch 'upstream/develop' into app-user2
This commit is contained in:
commit
4495e83eca
36 changed files with 446 additions and 312 deletions
16
mod/item.php
16
mod/item.php
|
@ -680,7 +680,11 @@ function item_post(App $a) {
|
|||
$o = conversation($a, [array_merge($contact_record, $datarray)], 'search', false, true);
|
||||
|
||||
System::jsonExit(['preview' => $o]);
|
||||
} elseif (!empty($_REQUEST['scheduled_at'])) {
|
||||
}
|
||||
|
||||
Hook::callAll('post_local',$datarray);
|
||||
|
||||
if (!empty($_REQUEST['scheduled_at'])) {
|
||||
$scheduled_at = DateTimeFormat::convert($_REQUEST['scheduled_at'], 'UTC', $a->getTimezone());
|
||||
if ($scheduled_at > DateTimeFormat::utcNow()) {
|
||||
unset($datarray['created']);
|
||||
|
@ -691,16 +695,12 @@ function item_post(App $a) {
|
|||
unset($datarray['edit']);
|
||||
unset($datarray['self']);
|
||||
unset($datarray['api_source']);
|
||||
|
||||
Post\Delayed::add($datarray['uri'], $datarray, PRIORITY_HIGH, false, $scheduled_at);
|
||||
|
||||
Post\Delayed::add($datarray['uri'], $datarray, PRIORITY_HIGH, Post\Delayed::PREPARED_NO_HOOK, $scheduled_at);
|
||||
item_post_return(DI::baseUrl(), $api_source, $return_path);
|
||||
}
|
||||
}
|
||||
|
||||
$datarray['uri-id'] = ItemURI::getIdByURI($datarray['uri']);
|
||||
|
||||
Hook::callAll('post_local',$datarray);
|
||||
|
||||
if (!empty($datarray['cancel'])) {
|
||||
Logger::info('mod_item: post cancelled by addon.');
|
||||
if ($return_path) {
|
||||
|
@ -715,6 +715,8 @@ function item_post(App $a) {
|
|||
System::jsonExit($json);
|
||||
}
|
||||
|
||||
$datarray['uri-id'] = ItemURI::getIdByURI($datarray['uri']);
|
||||
|
||||
if ($orig_post) {
|
||||
// Fill the cache field
|
||||
// This could be done in Item::update as well - but we have to check for the existance of some fields.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue