Commit 4c0a474c0eaa7fb8131307bb207b88f30847d13e
1 parent
b0799976
removed some debug logging
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1028 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
0 additions
and
6 deletions
control.php
| @@ -39,7 +39,6 @@ if (checkSessionAndRedirect(false)) { | @@ -39,7 +39,6 @@ if (checkSessionAndRedirect(false)) { | ||
| 39 | // need to strip query string params from action before attempting to retrieve from sitemap | 39 | // need to strip query string params from action before attempting to retrieve from sitemap |
| 40 | 40 | ||
| 41 | // check for the presence of additional params | 41 | // check for the presence of additional params |
| 42 | -$default->log->info("control.php qs=" . $_SERVER["QUERY_STRING"]); | ||
| 43 | if (strstr($_SERVER["QUERY_STRING"], "&")) { | 42 | if (strstr($_SERVER["QUERY_STRING"], "&")) { |
| 44 | // strip and save the querystring | 43 | // strip and save the querystring |
| 45 | $queryString = substr($_SERVER["QUERY_STRING"], strpos($_SERVER["QUERY_STRING"], "&")+1, strlen($_SERVER["QUERY_STRING"])); | 44 | $queryString = substr($_SERVER["QUERY_STRING"], strpos($_SERVER["QUERY_STRING"], "&")+1, strlen($_SERVER["QUERY_STRING"])); |
| @@ -49,19 +48,16 @@ if (strstr($_SERVER["QUERY_STRING"], "&")) { | @@ -49,19 +48,16 @@ if (strstr($_SERVER["QUERY_STRING"], "&")) { | ||
| 49 | // update | 48 | // update |
| 50 | $action = substr($_SERVER["QUERY_STRING"], 0, strpos($_SERVER["QUERY_STRING"], "?")); | 49 | $action = substr($_SERVER["QUERY_STRING"], 0, strpos($_SERVER["QUERY_STRING"], "?")); |
| 51 | } | 50 | } |
| 52 | -$default->log->info("control.php qs=$queryString; action=$action"); | ||
| 53 | 51 | ||
| 54 | // retrieve the page from the sitemap (checks whether this user has access to the requested page) | 52 | // retrieve the page from the sitemap (checks whether this user has access to the requested page) |
| 55 | $page = $default->siteMap->getPage($action, $_SESSION["userID"]); | 53 | $page = $default->siteMap->getPage($action, $_SESSION["userID"]); |
| 56 | 54 | ||
| 57 | -$default->log->debug("retrieved page=$page from SiteMap"); | ||
| 58 | if (!$page) { | 55 | if (!$page) { |
| 59 | // this user doesn't have permission to access the page | 56 | // this user doesn't have permission to access the page |
| 60 | // or there is no page mapping for the requested action | 57 | // or there is no page mapping for the requested action |
| 61 | // redirect to no permission page | 58 | // redirect to no permission page |
| 62 | redirect("$default->owl_ui_url/noAccess.php"); | 59 | redirect("$default->owl_ui_url/noAccess.php"); |
| 63 | } else { | 60 | } else { |
| 64 | - $default->log->debug("control.php redirect=$redirect"); | ||
| 65 | $page = $default->owl_root_url . $page; | 61 | $page = $default->owl_root_url . $page; |
| 66 | // set authorised flag and redirect | 62 | // set authorised flag and redirect |
| 67 | // strip querystring from the page returned from the sitemap | 63 | // strip querystring from the page returned from the sitemap |
| @@ -69,7 +65,6 @@ if (!$page) { | @@ -69,7 +65,6 @@ if (!$page) { | ||
| 69 | // access by checking $_SESSION["pageAccess"][$_SERVER["PHP_SELF"] ie. without querystring(?) | 65 | // access by checking $_SESSION["pageAccess"][$_SERVER["PHP_SELF"] ie. without querystring(?) |
| 70 | if (strstr($page, "?")) { | 66 | if (strstr($page, "?")) { |
| 71 | $accessPage = substr($page, 0, strpos($page, "?")); | 67 | $accessPage = substr($page, 0, strpos($page, "?")); |
| 72 | - $default->log->debug("control.php: page without querystring=$accessPage; with=$page"); | ||
| 73 | } else { | 68 | } else { |
| 74 | $accessPage = $page; | 69 | $accessPage = $page; |
| 75 | } | 70 | } |
| @@ -80,7 +75,6 @@ if (!$page) { | @@ -80,7 +75,6 @@ if (!$page) { | ||
| 80 | } | 75 | } |
| 81 | 76 | ||
| 82 | $_SESSION["pageAccess"][$accessPage] = true; | 77 | $_SESSION["pageAccess"][$accessPage] = true; |
| 83 | - $default->log->debug("control.php: just set SESSION[\"pageAccess\"][$accessPage]=" . $_SESSION["pageAccess"][$accessPage]); | ||
| 84 | // if we have a querystring add it on | 78 | // if we have a querystring add it on |
| 85 | if (strlen($queryString) > 0) { | 79 | if (strlen($queryString) > 0) { |
| 86 | $page = $page . (strstr($page, "?") ? "&$queryString" : "?$queryString"); | 80 | $page = $page . (strstr($page, "?") ? "&$queryString" : "?$queryString"); |