summaryrefslogtreecommitdiff
path: root/edit_topic.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:49:08 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:49:08 +0100
commitef793a806a8d5a479c29c061780c56f62c4d3535 (patch)
treedabe63be7a0cf383196bccfeb8743310e1d28fba /edit_topic.php
parent39508ee5ad8908fa720db48fcf7923f309fdce9d (diff)
downloadboards-ef793a806a8d5a479c29c061780c56f62c4d3535.tar.gz
boards-ef793a806a8d5a479c29c061780c56f62c4d3535.tar.bz2
boards-ef793a806a8d5a479c29c061780c56f62c4d3535.zip
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'edit_topic.php')
-rwxr-xr-xedit_topic.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/edit_topic.php b/edit_topic.php
index 47f448e..6ba2ded 100755
--- a/edit_topic.php
+++ b/edit_topic.php
@@ -39,7 +39,7 @@ $rslt = false;
if( isset($_REQUEST['is_locked']) || isset($_REQUEST['is_sticky']) ){
// Check permissions to edit this topic
$board->verifyUpdatePermission();
-
+
if ( isset($_REQUEST['is_locked']) && is_numeric($_REQUEST['is_locked']) ){
$rslt = $gContent->lock($_REQUEST['is_locked']);
} elseif ( isset($_REQUEST['is_sticky']) && is_numeric($_REQUEST['is_sticky']) ){
@@ -51,17 +51,17 @@ if( isset($_REQUEST['is_locked']) || isset($_REQUEST['is_sticky']) ){
if( !(( $gContent->mInfo['root_id'] == $gContent->mInfo['board_content_id'] && $board->hasAdminPermission() ) || $gBitUser->hasPermission('p_liberty_admin_comments')) ){
$gBitSystem->fatalError( tra('You do not have permission to delete this topic.') );
}
-
+
if( !empty( $_REQUEST['cancel'] ) ) {
// user cancelled - just continue on, doing nothing
} elseif( empty( $_REQUEST['confirm'] ) ) {
$formHash['remove'] = true;
$formHash['t'] = $_REQUEST['t'];
- $gBitSystem->confirmDialog( $formHash,
- array(
+ $gBitSystem->confirmDialog( $formHash,
+ [
'warning' => tra( 'Are you sure you want to delete this topic?' ) . ' ' . $gContent->getTitle(),
- 'error' => tra('This cannot be undone!')
- )
+ 'error' => tra('This cannot be undone!'),
+ ],
);
} else {
// @TODO Topic should extend LibertyComment - but until that day we load it up a second time
@@ -69,7 +69,7 @@ if( isset($_REQUEST['is_locked']) || isset($_REQUEST['is_sticky']) ){
if( !$topicAsComment->expunge() ) {
$gBitSmarty->assign( 'errors', $topicAsComment->mErrors );
}
- // send us back to the baord - http_referer won't work with confirm process
+ // send us back to the baord - http_referer won't work with confirm process
bit_redirect( BOARDS_PKG_URL.'index.php?b='. $gContent->mInfo['board_id'] );
}
// User pref options on a topic - not really editing but this simplifies topic related processes putting it here
@@ -87,9 +87,8 @@ if( isset($_REQUEST['is_locked']) || isset($_REQUEST['is_sticky']) ){
if($rslt){
// Return us to where we came from
header ("location: ".$_SERVER['HTTP_REFERER']);
-}else{
+}
// @TODO put error into an alert
//trigger_error(var_export($gContent->mErrors,true ));
-}
?>