diff options
-rw-r--r-- | lib/ChangeLog | 5 | ||||
-rw-r--r-- | lib/Multi/Maintenance.pm | 10 | ||||
-rw-r--r-- | lib/VNDB/Util/DB.pm | 9 |
3 files changed, 11 insertions, 13 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index a37bce7f..04691079 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -6,7 +6,10 @@ TODO: (preferably with the option to re-add them when unhiding) + Add a link for the hidden 'h' option at /hist -1.19 - ? +1.20 - ? + - ? + +1.19 - 2008-07-08 (r62) - Integrated discussion board - Colored diff for alies field - 'ttabs' for user entries diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm index 93734473..f2170deb 100644 --- a/lib/Multi/Maintenance.pm +++ b/lib/Multi/Maintenance.pm @@ -26,10 +26,10 @@ sub spawn { sub _start { $_[KERNEL]->alias_set('maintenance'); - $_[KERNEL]->call(core => register => qr/^maintenance((?: (?:vncache|ratings|revcache|integrity|unkanime|logrotate))+)$/, 'cmd_maintenance'); + $_[KERNEL]->call(core => register => qr/^maintenance((?: (?:vncache|revcache|integrity|unkanime|logrotate))+)$/, 'cmd_maintenance'); # Perform some maintenance functions every day on 0:00 - $_[KERNEL]->post(core => addcron => '0 0 * * *', 'maintenance vncache ratings integrity unkanime'); + $_[KERNEL]->post(core => addcron => '0 0 * * *', 'maintenance vncache integrity unkanime'); # update caches and rotate logs every 1st day of the month at 0:05 $_[KERNEL]->post(core => addcron => '5 0 1 * *' => 'maintenance revcache logrotate'); } @@ -49,12 +49,6 @@ sub vncache { } -sub ratings { - $_[KERNEL]->call(core => log => 3 => 'Recalculating VN ratings...'); - $Multi::SQL->do('SELECT calculate_rating()'); -} - - sub revcache { $_[KERNEL]->call(core => log => 3 => 'Updating rev column in the changes table...'); # this can take a while, maybe split these up in 3 queries? diff --git a/lib/VNDB/Util/DB.pm b/lib/VNDB/Util/DB.pm index 4c5b3085..e3685687 100644 --- a/lib/VNDB/Util/DB.pm +++ b/lib/VNDB/Util/DB.pm @@ -1311,13 +1311,14 @@ sub DBEditThread { # %options->{ id title locked hidden tags } } -sub DBAddThread { # %options->{ title tags } +sub DBAddThread { # %options->{ title hidden locked tags } my($s, %o) = @_; my $id = $s->DBRow(q| - INSERT INTO threads (title) - VALUES (!s) - RETURNING id|, $o{title} + INSERT INTO threads (title, hidden, locked) + VALUES (!s, %d, %d) + RETURNING id|, + $o{title}, $o{hidden}?1:0, $o{locked}?1:0 )->{id}; $s->DBExec(q| |