From 2bc0a647d0093c6c693ea27abe1c5f0fb946c8b1 Mon Sep 17 00:00:00 2001 From: Daniel Schwen Date: Thu, 11 Feb 2016 23:06:46 -0700 Subject: [PATCH] Remove remaining loads of sRootPath from session (#309) --- churchinfo/Include/Header-function.php | 25 ++++++++++++------------- churchinfo/Include/Header.php | 2 -- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/churchinfo/Include/Header-function.php b/churchinfo/Include/Header-function.php index 365231b19a..a3ab492d37 100644 --- a/churchinfo/Include/Header-function.php +++ b/churchinfo/Include/Header-function.php @@ -157,7 +157,7 @@ function GetSecuritySettings() $sSecurityCond = " AND (security_grp = 'bALL'"; for ($i = 0; $i < count($aSecurityList); $i++) { - if (array_key_exists ($aSecurityList[$i], $_SESSION) && $_SESSION[$aSecurityList[$i]]) { + if (array_key_exists ($aSecurityList[$i], $_SESSION) && $_SESSION[$aSecurityList[$i]]) { $sSecurityCond .= " OR security_grp = '" . $aSecurityList[$i] . "'"; } } @@ -186,9 +186,9 @@ function addMenu($menu) { } } -function addMenuItem($aMenu,$mIdx) { -global $security_matrix, $sRootPath; - $sRootPath = $_SESSION['sRootPath']; +function addMenuItem($aMenu,$mIdx) +{ + global $security_matrix, $sRootPath; $link = ($aMenu['uri'] == "") ? "" : $sRootPath."/".$aMenu['uri']; $text = $aMenu['statustext']; @@ -252,8 +252,8 @@ function addMenuItem($aMenu,$mIdx) { addMenu($aMenu['name']); echo "\n\n"; } else { - echo "\n"; - } + echo "\n"; + } return true; } else { @@ -261,12 +261,11 @@ function addMenuItem($aMenu,$mIdx) { } } -function Header_body_menu() { +function Header_body_menu() +{ global $sLanguage, $bExportCSV, $sMetaRefresh, $bToolTipsOn, $bRegistered, $sHeader, $sGlobalMessage; global $MenuFirst, $sPageTitle, $sPageTitleSub, $sRootPath; - $sRootPath = $_SESSION['sRootPath']; - $loggedInUserPhoto = (new PersonService())->getPhoto($_SESSION['iUserID']); $MenuFirst = 1; @@ -276,7 +275,7 @@ function Header_body_menu() { // Must first set a table with a background color, or content scrolls across // the background of the custom code when using a non-defective browser echo "
"; - echo html_entity_decode($sHeader,ENT_QUOTES); + echo html_entity_decode($sHeader, ENT_QUOTES); echo "
"; } ?> @@ -470,9 +469,9 @@ function addSection($menu) { } } -function addEntry($aMenu) { - -$sRootPath = $_SESSION['sRootPath']; +function addEntry($aMenu) +{ + global $sRootPath; $link = ($aMenu['uri'] == "") ? "" : $sRootPath."/".$aMenu['uri']; $text = $aMenu['statustext']; diff --git a/churchinfo/Include/Header.php b/churchinfo/Include/Header.php index 02042d67d5..15525655fc 100644 --- a/churchinfo/Include/Header.php +++ b/churchinfo/Include/Header.php @@ -34,8 +34,6 @@ // Top level menu index counter $MenuFirst = 1; - -$sRootPath = $_SESSION['sRootPath']; ?>