Merge pull request #7328 from annando/fix-delivery
Item delivery data must only be stored when there is data
This commit is contained in:
commit
541593fd4d
|
@ -34,7 +34,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1314);
|
||||
define('DB_UPDATE_VERSION', 1315);
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
|
@ -1883,7 +1883,9 @@ class Item extends BaseObject
|
|||
self::updateThread($parent_id);
|
||||
}
|
||||
|
||||
ItemDeliveryData::insert($current_post, $delivery_data);
|
||||
if (!empty($item['origin']) || !empty($item['wall']) || !empty($delivery_data['postopts']) || !empty($delivery_data['inform'])) {
|
||||
ItemDeliveryData::insert($current_post, $delivery_data);
|
||||
}
|
||||
|
||||
DBA::commit();
|
||||
|
||||
|
|
|
@ -369,3 +369,8 @@ function update_1309()
|
|||
}
|
||||
return Update::SUCCESS;
|
||||
}
|
||||
|
||||
function update_1315()
|
||||
{
|
||||
DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue