diff options
Diffstat (limited to 'includes/module_controls_inc.php')
| -rwxr-xr-x | includes/module_controls_inc.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/includes/module_controls_inc.php b/includes/module_controls_inc.php index fef85ee..751bcdc 100755 --- a/includes/module_controls_inc.php +++ b/includes/module_controls_inc.php @@ -14,32 +14,32 @@ use Bitweaver\KernelTools; $check_req = (isset($_REQUEST["mc_unassign"]) - || isset($_REQUEST["mc_up"]) - || isset($_REQUEST["mc_down"]) - || isset($_REQUEST["mc_move"])); + || isset($_REQUEST["mc_up"]) + || isset($_REQUEST["mc_down"]) + || isset($_REQUEST["mc_move"])); if (!$gBitUser->hasPermission( 'p_tidbits_configure_modules' ) && $check_req) { $gBitSmarty->assign('msg', KernelTools::tra( "You dont have permission to use this feature" )); - $gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'display' )); + $gBitSystem->display( 'error.tpl' , null, [ 'display_mode' => 'display' ]); die; } if ($site_user_assigned_modules != 'y' && $check_req) { $gBitSmarty->assign('msg', KernelTools::tra( "This feature is disabled").": site_user_assigned_modules" ); - $gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'display' )); + $gBitSystem->display( 'error.tpl' , null, [ 'display_mode' => 'display' ]); die; } if ( !$gBitUser->isRegistered() && $check_req) { $gBitSmarty->assign('msg', KernelTools::tra( "You must log in to use this feature" )); - $gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'display' )); + $gBitSystem->display( 'error.tpl' , null, [ 'display_mode' => 'display' ]); die; } $url = $_SERVER["REQUEST_URI"]; if ($check_req) { // global $debugger; // $debugger->msg('Module control clicked: '.$check_req); - // Make defaults if user still ot configure modules for himself - if (!$usermoduleslib->user_has_assigned_modules($user)) - $usermoduleslib->create_user_assigned_modules($user); - // Handle control icon click + // Make defaults if user still ot configure modules for himself + if (!$usermoduleslib->user_has_assigned_modules($user)) + $usermoduleslib->create_user_assigned_modules($user); + // Handle control icon click if (isset($_REQUEST["mc_up"])) $usermoduleslib->swap_up_user_module($_REQUEST["mc_up"], $user); elseif (isset($_REQUEST["mc_down"])) @@ -48,10 +48,10 @@ if ($check_req) { $usermoduleslib->move_module($_REQUEST["mc_move"], $user); else $usermoduleslib->unassign_user_module($_REQUEST["mc_unassign"], $user); - // Remove module movemet paramaters from an URL - // \todo What if 'mc_xxx' arg was not at the end? (if smbd fix URL by hands...) - // should I handle this very special (hack?) case? - $url = preg_replace('/(.*)(\?|&)[1](mc_up|mc_down|mc_move|mc_unassign)=[^&]*/','\1', $url); + // Remove module movemet paramaters from an URL + // \todo What if 'mc_xxx' arg was not at the end? (if smbd fix URL by hands...) + // should I handle this very special (hack?) case? + $url = preg_replace('/(.*)(\?|&)[1](mc_up|mc_down|mc_move|mc_unassign)=[^&]*/','\1', $url); } // Fix locaton if parameter was removed... if ($url != $_SERVER["REQUEST_URI"]) header('location: '.$url); |
