mirror of
https://github.com/friendica/friendica
synced 2025-05-08 07:44:10 +02:00
Some more replaced old database functions
This commit is contained in:
parent
663c38afed
commit
7c3fd2adb5
10 changed files with 65 additions and 107 deletions
|
@ -155,14 +155,15 @@ class CronJobs {
|
|||
if (!$cachetime) {
|
||||
$cachetime = PROXY_DEFAULT_TIME;
|
||||
}
|
||||
q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime);
|
||||
$condition = array('`uid` = 0 AND `resource-id` LIKE "pic:%" AND `created` < NOW() - INTERVAL ? SECOND', $cachetime);
|
||||
dba::delete('photo', $condition);
|
||||
}
|
||||
|
||||
// Delete the cached OEmbed entries that are older than one year
|
||||
q("DELETE FROM `oembed` WHERE `created` < NOW() - INTERVAL 3 MONTH");
|
||||
// Delete the cached OEmbed entries that are older than three month
|
||||
dba::delete('oembed', array("`created` < NOW() - INTERVAL 3 MONTH"));
|
||||
|
||||
// Delete the cached "parse_url" entries that are older than one year
|
||||
q("DELETE FROM `parsed_url` WHERE `created` < NOW() - INTERVAL 3 MONTH");
|
||||
// Delete the cached "parse_url" entries that are older than three month
|
||||
dba::delete('parsed_url', array("`created` < NOW() - INTERVAL 3 MONTH"));
|
||||
|
||||
// Maximum table size in megabyte
|
||||
$max_tablesize = intval(Config::get('system','optimize_max_tablesize')) * 1000000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue