diff options
| author | Christian Fowler <spider@viovio.com> | 2006-06-28 15:45:27 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2006-06-28 15:45:27 +0000 |
| commit | a9080e1d0f2b1a4eebc6ee80cd3b01546d636bab (patch) | |
| tree | 2387a3dce66cefc903f93040c82c25f7d97a9f04 /topic_move.php | |
| download | boards-a9080e1d0f2b1a4eebc6ee80cd3b01546d636bab.tar.gz boards-a9080e1d0f2b1a4eebc6ee80cd3b01546d636bab.tar.bz2 boards-a9080e1d0f2b1a4eebc6ee80cd3b01546d636bab.zip | |
import
Diffstat (limited to 'topic_move.php')
| -rw-r--r-- | topic_move.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/topic_move.php b/topic_move.php new file mode 100644 index 0000000..920b90f --- /dev/null +++ b/topic_move.php @@ -0,0 +1,55 @@ +<?php +require_once( '../bit_setup_inc.php' ); + +require_once( BITBOARDS_PKG_PATH.'BitBoard.php' ); + +// Is package installed and enabled +$gBitSystem->verifyPackage( 'bitboard' ); + +// Now check permissions to access this page +$gBitSystem->verifyPermission( 'p_bitboard_edit' ); + + +if( isset( $_REQUEST["confirm"] ) ) { + require_once( BITBOARDS_PKG_PATH.'lookup_inc.php' ); + if( $gContent->moveTo($_REQUEST["target"]) ) { + header ("location: ".$_REQUEST["ref"] ); + die; + } else { + vd( $gContent->mErrors ); + } + die(); +} + +if( isset( $_REQUEST["target"] ) ) { + $_REQUEST["content_id"] = $_REQUEST["target"]; + require_once( BITBOARDS_PKG_PATH.'lookup_inc.php' ); + $bitThread = $gContent; + unset($gContent); + require_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); + $bitBoard = $gContent; + + $gBitSystem->setBrowserTitle( tra( 'Confirm moving' ).' "' .$bitThread->mInfo['flc_title'] .'" '. tra("to Board"). ' "'.$bitBoard->mInfo['title'].'"'); + $formHash=array(); + if (empty($_REQUEST["ref"])) { + $_REQUEST["ref"]=$_SERVER['HTTP_REFERER']; + } elseif ($_REQUEST["ref"]=="-") { + $_REQUEST["ref"]=$bitThread->getDisplayUrl(); + } + $formHash["ref"]=$_REQUEST["ref"]; + $formHash["target"]=$_REQUEST["target"]; + $formHash["t"]=$_REQUEST["t"]; + $msgHash = array( + 'label' => tra( "Move Thread" ).": ".$bitThread->mInfo['flc_title'] , + 'confirm_item' => $bitThread->mInfo['flc_title'] , + 'warning' => tra( "Move ".' "' .$bitThread->mInfo['flc_title'] .'" '. tra("to Board"). ' "'.$bitBoard->mInfo['title'].'"'."<br />This cannot be undone!" ), + ); + $gBitSystem->confirmDialog( $formHash,$msgHash ); +} + +$board = new BitBoard(); +$gBitSmarty->assign_by_ref('boards', $board->getForumBoardSelectList()); +require_once( BITBOARDS_PKG_PATH .'lookup_bittopic_inc.php' ); + +$gBitSystem->display( 'bitpackage:bitboard/topic_move.tpl', tra('Category') ); +?>
\ No newline at end of file |
