summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-10 22:37:39 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-10 22:37:39 +1100
commitffb215eb476d1344ffd904626288c2553f95355d (patch)
tree8bfa9b41c657bb9df5ee8d0996b64b8a655c2680 /inc/display.php
parent851d8eaa9b01fa0b15d7af9caa1a90a9cbb6d3f4 (diff)
added "bumplocking" feature
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/inc/display.php b/inc/display.php
index 4377ea3c..655aaf22 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -276,7 +276,7 @@
};
class Thread {
- public function __construct($id, $subject, $email, $name, $trip, $capcode, $body, $time, $thumb, $thumbx, $thumby, $file, $filex, $filey, $filesize, $filename, $ip, $sticky, $locked, $embed, $root=null, $mod=false, $hr=true) {
+ public function __construct($id, $subject, $email, $name, $trip, $capcode, $body, $time, $thumb, $thumbx, $thumby, $file, $filex, $filey, $filesize, $filename, $ip, $sticky, $locked, $bumplocked, $embed, $root=null, $mod=false, $hr=true) {
global $config;
if(!isset($root)) $root = &$config['root'];
@@ -302,6 +302,7 @@
$this->ip = $ip;
$this->sticky = $sticky;
$this->locked = $locked;
+ $this->bumplocked = $bumplocked;
$this->embed = $embed;
$this->root = $root;
$this->mod = $mod;
@@ -357,6 +358,12 @@
else
$built .= ' <a title="Make thread sticky" href="?/' . $board['uri'] . '/sticky/' . $this->id . '">' . $config['mod']['link_sticky'] . '</a>';
+ if(hasPermission($config['mod']['bumplock'], $board['uri'], $this->mod))
+ if($this->bumplocked)
+ $built .= ' <a title="Allow thread to be bumped" href="?/' . $board['uri'] . '/bumpunlock/' . $this->id . '">' . $config['mod']['link_bumpunlock'] . '</a>';
+ else
+ $built .= ' <a title="Prevent thread from being bumped" href="?/' . $board['uri'] . '/bumplock/' . $this->id . '">' . $config['mod']['link_bumplock'] . '</a>';
+
// Lock
if(hasPermission($config['mod']['lock'], $board['uri'], $this->mod))
if($this->locked)