From c87683c7c56b59a77ada5ae79d1b8e5127e9bf0c Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 30 Oct 2012 10:42:46 +0000 Subject: [PATCH] Remove the conference rooms from the menu, leave conference center and if the user doesn't have access to the conference center redirect them to the conference room. --- app/conference_centers/app_config.php | 18 ------------------ app/conference_centers/conference_centers.php | 12 +++++++++--- app/conference_centers/conference_rooms.php | 5 +---- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/app/conference_centers/app_config.php b/app/conference_centers/app_config.php index f3c6987f2e..c0e6b5cd08 100644 --- a/app/conference_centers/app_config.php +++ b/app/conference_centers/app_config.php @@ -36,24 +36,6 @@ $apps[$x]['menu'][$y]['path'] = '/app/conference_centers/conference_centers.php'; $apps[$x]['menu'][$y]['groups'][] = 'admin'; $apps[$x]['menu'][$y]['groups'][] = 'superadmin'; - $y++; - $apps[$x]['menu'][$y]['title']['en-us'] = 'Conference Rooms'; - $apps[$x]['menu'][$y]['title']['es-mx'] = ''; - $apps[$x]['menu'][$y]['title']['de'] = ''; - $apps[$x]['menu'][$y]['title']['de-ch'] = ''; - $apps[$x]['menu'][$y]['title']['de-at'] = ''; - $apps[$x]['menu'][$y]['title']['fr'] = ''; - $apps[$x]['menu'][$y]['title']['fr-ca'] = ''; - $apps[$x]['menu'][$y]['title']['fr-ch'] = ''; - $apps[$x]['menu'][$y]['title']['pt-pt'] = ''; - $apps[$x]['menu'][$y]['title']['pt-br'] = ''; - $apps[$x]['menu'][$y]['uuid'] = '0daea9eb-5555-4325-be57-e3b6a30d5253'; - $apps[$x]['menu'][$y]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5'; - $apps[$x]['menu'][$y]['category'] = 'internal'; - $apps[$x]['menu'][$y]['path'] = '/app/conference_centers/conference_rooms.php'; - $apps[$x]['menu'][$y]['groups'][] = 'user'; - $apps[$x]['menu'][$y]['groups'][] = 'admin'; - $apps[$x]['menu'][$y]['groups'][] = 'superadmin'; //permission details $y = 0; diff --git a/app/conference_centers/conference_centers.php b/app/conference_centers/conference_centers.php index 68025242ab..fda33833a4 100644 --- a/app/conference_centers/conference_centers.php +++ b/app/conference_centers/conference_centers.php @@ -30,8 +30,14 @@ if (permission_exists('conference_center_view')) { //access granted } else { - echo "access denied"; - exit; + if (permission_exists('conference_room_view')) { + //redirect to the conference rooms + header( 'Location: conference_rooms.php') ; + } + else { + echo "access denied"; + exit; + } } require_once "includes/header.php"; require_once "includes/paging.php"; @@ -50,7 +56,7 @@ require_once "includes/paging.php"; echo "\n"; echo " \n"; echo "\n"; - echo "\n"; + echo "\n"; echo " \n"; echo " \n"; echo "
Conference Centers
\n"; diff --git a/app/conference_centers/conference_rooms.php b/app/conference_centers/conference_rooms.php index b10899cdea..9d20bf7e8e 100644 --- a/app/conference_centers/conference_rooms.php +++ b/app/conference_centers/conference_rooms.php @@ -68,9 +68,6 @@ require_once "includes/paging.php"; } } } - //echo "
\n";
-	//print_r($conference);
-	//echo "
\n"; //get variables used to control the order $order_by = $_GET["order_by"]; @@ -96,7 +93,7 @@ require_once "includes/paging.php"; if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } $prep_statement = $db->prepare($sql); if ($prep_statement) { - $prep_statement->execute(); + $prep_statement->execute(); $row = $prep_statement->fetch(PDO::FETCH_ASSOC); if ($row['num_rows'] > 0) { $num_rows = $row['num_rows'];