summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-11-19 03:47:41 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-11-19 03:47:41 +1100
commit84c181e692445fb2fc152d378c581fe774b82556 (patch)
tree581a698f2dfb6f277d11fb5de304d9eb4d0f8be7
parent2a6f47e7ae09aee080bdb0213fe000ef3dc817c1 (diff)
Cannot "move" a thread to the same board.
-rw-r--r--mod.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod.php b/mod.php
index 227eebf3..b0129086 100644
--- a/mod.php
+++ b/mod.php
@@ -2183,6 +2183,9 @@
$targetBoard = $_POST['board'];
$shadow = isset($_POST['shadow']);
+ if($targetBoard == $boardName)
+ error("Target and source board are the same.");
+
// copy() if leaving a shadow thread behind. otherwise, rename().
$clone = $shadow ? 'copy' : 'rename';
@@ -2300,6 +2303,8 @@
$__boards = '';
foreach($boards as &$_board) {
+ if($_board['uri'] == $board['uri'])
+ continue;
$__boards .= '<li>' .
'<input type="radio" name="board" id="board_' . $_board['uri'] . '" value="' . $_board['uri'] . '">' .
'<label style="display:inline" for="board_' . $_board['uri'] . '"> ' .