diff options
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 2 | ||||
-rw-r--r-- | install/schema_mysql.sql | 3 | ||||
-rw-r--r-- | install/schema_postgres.sql | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 8835d8fca..7b951e7d4 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -97,7 +97,7 @@ class Cron { // Clean expired photos from cache - $sql_interval = db_utcnow() . ' - INTERVAL ' . db_quoteinterval(get_config('system','active_expire_days', '30') . ' DAY'); + $sql_interval = "'" . dbesc(datetime_convert()) . "' - INTERVAL " . db_quoteinterval(get_config('system','active_expire_days', '30') . ' DAY'); $r = q("SELECT DISTINCT xchan, content FROM photo WHERE photo_usage = %d AND expires < $sql_interval", intval(PHOTO_CACHE) ); diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 7faeb93dd..977d26232 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -595,7 +595,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `layout_mid` char(191) NOT NULL DEFAULT '', `postopts` text NOT NULL, `route` text NOT NULL, - `llink` char(191) NOT NULL DEFAULT '', + `llink` text NOT NULL, `plink` text NOT NULL, `resource_id` char(191) NOT NULL DEFAULT '', `resource_type` char(16) NOT NULL DEFAULT '', @@ -659,7 +659,6 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `commented` (`commented`), KEY `verb` (`verb`), KEY `obj_type` (`obj_type`), - KEY `llink` (`llink`), KEY `expires` (`expires`), KEY `revision` (`revision`), KEY `mimetype` (`mimetype`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index c1c222b37..c04ba9c67 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -644,7 +644,6 @@ create index "item_resource_type" on item ("resource_type"); create index "item_commented" on item ("commented"); create index "item_verb" on item ("verb"); create index "item_obj_type" on item ("obj_type"); -create index "item_llink" on item ("llink"); create index "item_expires" on item ("expires"); create index "item_revision" on item ("revision"); create index "item_mimetype" on item ("mimetype"); |