summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-09 06:24:14 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-09 06:24:14 +0000
commit69cc216f416c78f6bb5b25fcfd17a75aab5f9a87 (patch)
tree01d118a1bd66902e5c41134943db6e131d7cdfe3
parent329729db62636b8355d5c12e66e8cb58e3a50928 (diff)
Added possibility to create a hidden thread and removed ratings calculation from Multi
git-svn-id: svn://vndb.org/vndb@63 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
-rw-r--r--lib/ChangeLog5
-rw-r--r--lib/Multi/Maintenance.pm10
-rw-r--r--lib/VNDB/Util/DB.pm9
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|