mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 10:03:45 +00:00
We delete now with dba::delete - if available
This commit is contained in:
parent
7dde8842cf
commit
fc5ba4ee15
1 changed files with 9 additions and 1 deletions
|
@ -688,7 +688,15 @@ function twitter_expire($a,$b) {
|
||||||
if ($days == 0)
|
if ($days == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$r = q("DELETE FROM `item` WHERE `deleted` AND `network` = '%s'", dbesc(NETWORK_TWITTER));
|
if (method_exists('dba', 'delete')) {
|
||||||
|
$r = dba::select('item', array('id'), array('deleted' => true, 'network' => NETWORK_TWITTER));
|
||||||
|
while ($row = dba::fetch($r)) {
|
||||||
|
dba::delete('item', array('id' => $row['id']));
|
||||||
|
}
|
||||||
|
dba::close($r);
|
||||||
|
} else {
|
||||||
|
$r = q("DELETE FROM `item` WHERE `deleted` AND `network` = '%s'", dbesc(NETWORK_TWITTER));
|
||||||
|
}
|
||||||
|
|
||||||
require_once("include/items.php");
|
require_once("include/items.php");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue