summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Prelude.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-01 09:22:20 +0100
committerYorhel <git@yorhel.nl>2019-12-01 13:40:59 +0100
commit165b62acc991cbf30cb721af27b04a066dbc9413 (patch)
tree34cbe7fef4a020fe121ddf1026dd6be13e9498a2 /lib/VNWeb/Prelude.pm
parentb2ba46a9a0900d2b9d62a5ff84c4d4c9d9780abc (diff)
v2rw: Convert thread display + poll voting
I did not reimplement the 'poll_recast' and 'poll_preview' settings, these actions are now always permitted. Updated CSS a little bit to highlight the linked post and fix the double border at the bottom. The nice thing about the sql_visible_threads() function I wrote earlier is that is can also be used for access control on a single thread. More code re-use. \o/
Diffstat (limited to 'lib/VNWeb/Prelude.pm')
-rw-r--r--lib/VNWeb/Prelude.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VNWeb/Prelude.pm b/lib/VNWeb/Prelude.pm
index bf1db2a0..b942ff8f 100644
--- a/lib/VNWeb/Prelude.pm
+++ b/lib/VNWeb/Prelude.pm
@@ -8,6 +8,7 @@
# use Exporter 'import';
# use Time::HiRes 'time';
# use List::Util 'min', 'max', 'sum';
+# use POSIX 'ceil';
#
# use VNDBUtil;
# use VNDB::BBCode;
@@ -51,6 +52,7 @@ sub import {
use Exporter 'import';
use Time::HiRes 'time';
use List::Util 'min', 'max', 'sum';
+ use POSIX 'ceil';
use VNDBUtil;
use VNDB::BBCode;
@@ -87,12 +89,14 @@ our %RE = (
pid => qr{p$id},
iid => qr{i$id},
did => qr{d$id},
+ tid => qr{t$id},
vrev => qr{v$id$rev?},
rrev => qr{r$id$rev?},
prev => qr{p$id$rev?},
srev => qr{s$id$rev?},
crev => qr{c$id$rev?},
drev => qr{d$id$rev?},
+ postid => qr{t$id\.(?<num>$num)},
);