mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
Item delivery data must only be stored when there is data
This commit is contained in:
parent
c5d8d82bd2
commit
3121d967c5
3 changed files with 9 additions and 2 deletions
|
@ -34,7 +34,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1314);
|
define('DB_UPDATE_VERSION', 1315);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1883,7 +1883,9 @@ class Item extends BaseObject
|
||||||
self::updateThread($parent_id);
|
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();
|
DBA::commit();
|
||||||
|
|
||||||
|
|
|
@ -369,3 +369,8 @@ function update_1309()
|
||||||
}
|
}
|
||||||
return Update::SUCCESS;
|
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