Commit c9f36b3bf1001e4ace5153a605a9527e386055c7

Authored by michaeljoseph
1 parent 6b8980e4

Corrected style convention violations.

Added some variable initialisation and instantiation checking (to remove spurious E_NOTICEs)


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2895 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 3 additions and 6 deletions
lib/session/SiteMap.inc
... ... @@ -149,13 +149,10 @@ class SiteMap {
149 149 // if you're a system administrator, you've got access to everything
150 150  
151 151 // check whether global var intialised
152   - if ($this->isSysAdmin)
153   - {
  152 + if ($this->isSysAdmin) {
154 153 $default->log->debug("-- SiteMap - checking whether a sys admin - GLOBAL VAR SET ");
155 154 return true;
156   - }
157   - else if ($this->isSysAdmin = Permission::userIsSystemAdministrator())
158   - {
  155 + } else if ($this->isSysAdmin = Permission::userIsSystemAdministrator()) {
159 156 $default->log->debug("-- SiteMap - checking whether a sys admin ...");
160 157 return true;
161 158 } else {
... ... @@ -390,7 +387,7 @@ class SiteMap {
390 387 function getPageArray($action) {
391 388 global $default;
392 389  
393   - $default->log->info("SiteMap::getPage: checking ($action, " . $_SESSION["userID"] . ")");
  390 + $default->log->info("SiteMap::getPage: checking ($action, " . (isset($_SESSION["userID"]) ? $_SESSION["userID"] : "") . ")");
394 391 $groupIDs = array();
395 392  
396 393 // for each section
... ...