Commit 8154ec35dccf13f89cac3d7ae02aeba5ad730e8c

Authored by michael
1 parent 6ba0bda3

updated comments

more debug logging


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@235 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 8 additions and 13 deletions
control.php
1 1 <?php
2 2  
3 3 /**
4   - * control.php -- Controller page
  4 + * $Id$
5 5 *
6   - * This page controls the web application by responding to a set of
  6 + * Controller page -- controls the web application by responding to a set of
7 7 * defined actions. The controller performs session handling, page-level
8 8 * authentication and forwards the request to the appropriate handling
9 9 * page.
10 10 *
11   - *
  11 + *
12 12 * Licensed under the GNU GPL. For full terms see the file COPYING.
13 13 *
14   - * @version $Id$
15   - * @Copyright (c) 1999-2002 The Owl Project Team
  14 + * @version $Revision$
16 15 * @author <a href="mailto:michael@jamwarehouse.com">Michael Joseph</a>, Jam Warehouse (Pty) Ltd, South Africa
17   - * @package dms
  16 + * @package dmslib
18 17 */
19 18  
20 19 // main library routines and defaults
... ... @@ -22,7 +21,6 @@ require_once(&quot;./config/dmsDefaults.php&quot;);
22 21 require_once("$default->owl_fs_root/lib/db.inc");
23 22 require_once("$default->owl_fs_root/lib/dms.inc");
24 23 require_once("$default->owl_fs_root/lib/lookup.inc");
25   -//require_once("$default->owl_fs_root/config/html.php");
26 24 require_once("$default->owl_fs_root/lib/control.inc");
27 25 require_once("$default->owl_fs_root/lib/Session.inc");
28 26 require_once("$default->owl_fs_root/lib/SiteMap.inc");
... ... @@ -32,14 +30,12 @@ require_once(&quot;$default-&gt;owl_fs_root/lib/SiteMap.inc&quot;);
32 30 // -------------------------------
33 31  
34 32 if (checkSession()) {
35   - // session check succeeds, so default action should be the dashboard
36   - // (if no action specified
  33 + // session check succeeds, so default action should be the dashboard if no action was specified
37 34 if (!isset($action)) {
38 35 $action = "dashboard";
39 36 }
40 37 } else {
41   - // session check fails, so default action should be the login form
42   - // (if no action specified)
  38 + // session check fails, so default action should be the login form if no action was specified
43 39 if (!isset($action)) {
44 40 $action = "loginForm";
45 41 }
... ... @@ -48,11 +44,10 @@ if (checkSession()) {
48 44 // reset authorisation flag before checking access
49 45 $_SESSION["authorised"] = false;
50 46  
51   -$default->log->debug("control.php about to retrieve page from sitemap");
52 47 // check whether the users group has access to the requested page
53 48 $page = $default->siteMap->getPage($action, $_SESSION["groupID"]);
54 49  
55   -$default->log->debug("control.php retrieved page=$page");
  50 +$default->log->debug("control.php retrieved page=$page from SiteMap");
56 51 if (!$page) {
57 52 // this group doesn't have permission to access the page
58 53 // or there is no page mapping for the requested action
... ...