summaryrefslogtreecommitdiff
path: root/topic_move.php
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2013-10-16 12:35:58 -0400
committerspiderr <spider@viovio.com>2013-10-16 12:35:58 -0400
commit21a12d3b861e058c58612fb2be09b78b82aebd41 (patch)
tree4900489f065da9c9f04f6964800a78ddf0d92b7c /topic_move.php
parentdbcacb230403cf7baf0e5ccc5215573a8579ac4e (diff)
downloadboards-21a12d3b861e058c58612fb2be09b78b82aebd41.tar.gz
boards-21a12d3b861e058c58612fb2be09b78b82aebd41.tar.bz2
boards-21a12d3b861e058c58612fb2be09b78b82aebd41.zip
clean up move topic; if only one boards, show topics on default page
Diffstat (limited to 'topic_move.php')
-rw-r--r--topic_move.php31
1 files changed, 5 insertions, 26 deletions
diff --git a/topic_move.php b/topic_move.php
index 8dbfa45..0802280 100644
--- a/topic_move.php
+++ b/topic_move.php
@@ -35,31 +35,10 @@ if( isset( $_REQUEST["target"] ) ) {
$gBitSystem->fatalError( 'You do not have permission to move topics to the Board' . $targetBoard->mInfo['title'] );
}
- if( isset( $_REQUEST["confirm"] ) ) {
- if( $gContent->moveTo($_REQUEST["target"]) ) {
- header ("location: ".$gContent-getDisplayUrl() );
- die;
- } else {
- $gBitSystem->fatalError( "There was an error moving the topic: ".vc( $gContent->mErrors ));
- }
- }else{
- $gBitSystem->setBrowserTitle( tra( 'Confirm moving' ).' "' .$gContent->mInfo['title'] .'" '. tra("to Board"). ' "'.$targetBoard->mInfo['title'].'"');
- $formHash=array();
- if (empty($_REQUEST["ref"])) {
- $_REQUEST["ref"]=$_SERVER['HTTP_REFERER'];
- } elseif ($_REQUEST["ref"]=="-") {
- $_REQUEST["ref"]=$gContent->getDisplayUrl();
- }
- $formHash["ref"]=$_REQUEST["ref"];
- $formHash["target"]=$_REQUEST["target"];
- $formHash["t"]=$_REQUEST["t"];
- $msgHash = array(
- 'label' => tra( "Move Thread" ).": ".$gContent->mInfo['title'] ,
-// redundant to title in tpl
-// 'confirm_item' => $gContent->mInfo['title'] ,
- 'warning' => tra( "Move ".' "' .$gContent->mInfo['title'] .'" '. tra("to Board"). ' "'.$targetBoard->mInfo['title'].'"'."<br />This cannot be undone!" ),
- );
- $gBitSystem->confirmDialog( $formHash,$msgHash );
+ if( $gContent->moveTo($_REQUEST["target"]) ) {
+ bit_redirect( $gContent->getDisplayUrl() );
+ } else {
+ $gBitSystem->fatalError( "There was an error moving the topic: ".vc( $gContent->mErrors ));
}
}
@@ -69,5 +48,5 @@ $gBitSmarty->assign_by_ref('boards', $boards);
$gBitSmarty->assign('fromBoardId', $board->mContentId);
-$gBitSystem->display( 'bitpackage:boards/topic_move.tpl', tra('Category') , array( 'display_mode' => 'display' ));
+$gBitSystem->display( 'bitpackage:boards/topic_move.tpl', tra('Move Topic').':'.$gContent->getTitle(), array( 'display_mode' => 'display' ));
?>