Commit e1ca2a1bd40d676918da6c423cbd51bde9cd87ab

Authored by Michael Joseph
1 parent 229389bd

updated to fix querystring appending bugs


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@739 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 7 additions and 2 deletions
control.php
@@ -41,10 +41,15 @@ if (checkSessionAndRedirect(false)) { @@ -41,10 +41,15 @@ if (checkSessionAndRedirect(false)) {
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"]); 42 $default->log->info("control.php qs=" . $_SERVER["QUERY_STRING"]);
43 if (strstr($_SERVER["QUERY_STRING"], "&")) { 43 if (strstr($_SERVER["QUERY_STRING"], "&")) {
44 - // save the querystring 44 + // strip and save the querystring
45 $queryString = substr($_SERVER["QUERY_STRING"], strpos($_SERVER["QUERY_STRING"], "&")+1, strlen($_SERVER["QUERY_STRING"])); 45 $queryString = substr($_SERVER["QUERY_STRING"], strpos($_SERVER["QUERY_STRING"], "&")+1, strlen($_SERVER["QUERY_STRING"]));
46 - $default->log->info("control.php qs=$queryString; action=$action"); 46 +} else if (strstr($_SERVER["QUERY_STRING"], "?")) {
  47 + // strip and save the querystring
  48 + $queryString = substr($_SERVER["QUERY_STRING"], strpos($_SERVER["QUERY_STRING"], "?")+1, strlen($_SERVER["QUERY_STRING"]));
  49 + // update
  50 + $action = substr($_SERVER["QUERY_STRING"], 0, strpos($_SERVER["QUERY_STRING"], "?"));
47 } 51 }
  52 +$default->log->info("control.php qs=$queryString; action=$action");
48 53
49 // retrieve the page from the sitemap (checks whether this user has access to the requested page) 54 // retrieve the page from the sitemap (checks whether this user has access to the requested page)
50 $page = $default->siteMap->getPage($action, $_SESSION["userID"]); 55 $page = $default->siteMap->getPage($action, $_SESSION["userID"]);