diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-11-19 01:35:22 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-11-19 01:35:22 +1100 |
| commit | d8fe3ff8d82b5437fd83de3716728cdff0885d03 (patch) | |
| tree | 706d6658fe1d1f8d88a803b6e9e1a2798aec1365 /inc | |
| parent | b966670fe4c72de062374b044e364757b14cfe09 (diff) | |
Ability to "move" a thread to another board (2/3 done)
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/config.php | 6 | ||||
| -rw-r--r-- | inc/display.php | 3 | ||||
| -rw-r--r-- | inc/functions.php | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/inc/config.php b/inc/config.php index 9711990f..67158c5a 100644 --- a/inc/config.php +++ b/inc/config.php @@ -691,6 +691,7 @@ $config['mod']['link_unlock'] = '[-Lock]'; $config['mod']['link_bumplock'] = '[Sage]'; $config['mod']['link_bumpunlock'] = '[-Sage]'; + $config['mod']['link_move'] = '[Move]'; // Moderator capcodes $config['capcode'] = ' <a class="capcode">## %s</a>'; @@ -754,6 +755,7 @@ define('JANITOR', 0, true); define('MOD', 1, true); define('ADMIN', 2, true); + define('DISABLED', 3, true); } /* @@ -761,6 +763,8 @@ * Mod permissions * ==================== */ + + // Set any of the below to "DISABLED" to make them unavailable for everyone. // Don't worry about per-board moderators. Let all mods moderate any board. $config['mod']['skip_per_board'] = true; @@ -790,6 +794,8 @@ $config['mod']['bumplock'] = MOD; // View whether a thread has been bumplocked ("-1" to allow non-mods to see too) $config['mod']['view_bumplock'] = MOD; + // "Move" a thread to another board + $config['mod']['move'] = MOD; // Post bypass unoriginal content check on robot-enabled boards $config['mod']['postunoriginal'] = ADMIN; // Bypass flood check diff --git a/inc/display.php b/inc/display.php index 93afd59d..ed5f403b 100644 --- a/inc/display.php +++ b/inc/display.php @@ -376,6 +376,9 @@ else $built .= ' <a title="Lock thread" href="?/' . $board['uri'] . '/lock/' . $this->id . '">' . $config['mod']['link_lock'] . '</a>'; + if(hasPermission($config['mod']['move'], $board['uri'], $this->mod)) + $built .= ' <a title="Move thread to another board" href="?/' . $board['uri'] . '/move/' . $this->id . '">' . $config['mod']['link_move'] . '</a>'; + if(!empty($built)) $built = '<span class="controls op">' . $built . '</span>'; } diff --git a/inc/functions.php b/inc/functions.php index f9b16c8a..c59f6036 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -614,9 +614,9 @@ $query->bindValue(':name', $post['name']); $query->bindValue(':trip', $post['trip']); $query->bindValue(':body', $post['body']); - $query->bindValue(':time', time(), PDO::PARAM_INT); + $query->bindValue(':time', $post['time'] ? $post['time'] : time(), PDO::PARAM_INT); $query->bindValue(':password', $post['password']); - $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); + $query->bindValue(':ip', $post['ip'] ? $post['ip'] : $_SERVER['REMOTE_ADDR']); if($post['mod'] && $post['sticky']) { $query->bindValue(':sticky', 1, PDO::PARAM_INT); |
