Commit c1fafba0d87a9b3408975627e7ef330fed494253
1 parent
9612915c
fixed redirection
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@475 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
7 additions
and
1 deletions
control.php
| ... | ... | @@ -46,15 +46,21 @@ if (!$page) { |
| 46 | 46 | // redirect to no permission page |
| 47 | 47 | redirect("$default->owl_ui_url/noAccess.php"); |
| 48 | 48 | } else { |
| 49 | + $default->log->debug("control.php redirect=$redirect"); | |
| 49 | 50 | $page = $default->owl_root_url . $page; |
| 50 | 51 | // set authorised flag and redirect |
| 51 | 52 | // strip querystring form $page before setting page authorisation flag |
| 52 | 53 | if (strstr($page, "?")) { |
| 53 | 54 | $accessPage = substr($page, 0, strpos($page, "?")); |
| 54 | - $default->log->debug("control.php: page without querystring=$accessPage"); | |
| 55 | + $default->log->debug("control.php: page without querystring=$accessPage; with=$page"); | |
| 55 | 56 | } else { |
| 56 | 57 | $accessPage = $page; |
| 57 | 58 | } |
| 59 | + | |
| 60 | + if (strlen($redirect) > 0) { | |
| 61 | + $page = $page . (strstr($page, "?") ? "&redirect=$redirect" : "?redirect=$redirect"); | |
| 62 | + } | |
| 63 | + | |
| 58 | 64 | $_SESSION["pageAccess"][$accessPage] = true; |
| 59 | 65 | $default->log->debug("control.php: just set SESSION[\"pageAccess\"][$accessPage]=" . $_SESSION["pageAccess"][$accessPage]); |
| 60 | 66 | redirect($page); | ... | ... |