Remove "return to board" link when showing "board already exists" error

This commit is contained in:
Savetheinternet 2011-01-03 17:30:17 +11:00
parent 05712d7457
commit dbae5dbf56

View File

@ -183,8 +183,10 @@
if(!preg_match('/^\w+$/', $b['uri'])) if(!preg_match('/^\w+$/', $b['uri']))
error(sprintf(ERROR_INVALIDFIELD, 'URI')); error(sprintf(ERROR_INVALIDFIELD, 'URI'));
if(openBoard($b['uri'])) if(openBoard($b['uri'])) {
unset($board);
error(sprintf(ERROR_BOARDEXISTS, sprintf(BOARD_ABBREVIATION, $b['uri']))); error(sprintf(ERROR_BOARDEXISTS, sprintf(BOARD_ABBREVIATION, $b['uri'])));
}
$query = prepare("INSERT INTO `boards` VALUES (NULL, :uri, :title, :subtitle)"); $query = prepare("INSERT INTO `boards` VALUES (NULL, :uri, :title, :subtitle)");
$query->bindValue(':uri', $b['uri']); $query->bindValue(':uri', $b['uri']);