summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJules Laplace <carbon@melanarchy.org>2013-09-12 13:25:13 -0500
committerJules Laplace <carbon@melanarchy.org>2013-09-12 13:25:13 -0500
commitde2c01c711867eb764b295ca33e0b764ca1b4011 (patch)
tree8d09287734540bd3b0e8e76943577d3ad66248f7 /lib
parentd6a423cd5249ea09d9fbcab130cd38fd252eee05 (diff)
bury a thread
Diffstat (limited to 'lib')
-rw-r--r--lib/db.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/db.pm b/lib/db.pm
index 1faa3f4..aefdbe3 100644
--- a/lib/db.pm
+++ b/lib/db.pm
@@ -944,6 +944,24 @@ sub get_recent_files
return \@rows;
}
+sub get_thread_comment_modified
+ {
+ my ($id) = @_;
+ my $query;
+
+ $id = $dbh->quote($id);
+ $query = "SELECT MAX(date) FROM comments WHERE id=$id";
+
+ $sth = $dbh->prepare($query);
+ $sth->execute();
+ my ($date) = $sth->fetchrow_array();
+ $sth->finish();
+
+ if ($date == 0)
+ { return -1; }
+
+ return $date;
+ }
@@ -1684,6 +1702,14 @@ sub update_thread_size
$rows = $dbh->do($query);
}
+sub update_thread_lastmodified
+ {
+ my ($id, $disp) = @_;
+ $id = $dbh->quote($id);
+ $disp = $dbh->quote($disp);
+ $query = "UPDATE threads SET lastmodified=$disp WHERE id=$id";
+ $dbh->do($query);
+ }
sub update_thread_display
{
my ($id, $disp) = @_;