Commit 4dbc9140dcc512f0f2fa7e61c3749289bd42652c

Authored by Michael Joseph
1 parent a1ece70e

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 <?php 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 * defined actions. The controller performs session handling, page-level 7 * defined actions. The controller performs session handling, page-level
8 * authentication and forwards the request to the appropriate handling 8 * authentication and forwards the request to the appropriate handling
9 * page. 9 * page.
10 * 10 *
11 - * 11 + *
12 * Licensed under the GNU GPL. For full terms see the file COPYING. 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 * @author <a href="mailto:michael@jamwarehouse.com">Michael Joseph</a>, Jam Warehouse (Pty) Ltd, South Africa 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 // main library routines and defaults 19 // main library routines and defaults
@@ -22,7 +21,6 @@ require_once(&quot;./config/dmsDefaults.php&quot;); @@ -22,7 +21,6 @@ require_once(&quot;./config/dmsDefaults.php&quot;);
22 require_once("$default->owl_fs_root/lib/db.inc"); 21 require_once("$default->owl_fs_root/lib/db.inc");
23 require_once("$default->owl_fs_root/lib/dms.inc"); 22 require_once("$default->owl_fs_root/lib/dms.inc");
24 require_once("$default->owl_fs_root/lib/lookup.inc"); 23 require_once("$default->owl_fs_root/lib/lookup.inc");
25 -//require_once("$default->owl_fs_root/config/html.php");  
26 require_once("$default->owl_fs_root/lib/control.inc"); 24 require_once("$default->owl_fs_root/lib/control.inc");
27 require_once("$default->owl_fs_root/lib/Session.inc"); 25 require_once("$default->owl_fs_root/lib/Session.inc");
28 require_once("$default->owl_fs_root/lib/SiteMap.inc"); 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,14 +30,12 @@ require_once(&quot;$default-&gt;owl_fs_root/lib/SiteMap.inc&quot;);
32 // ------------------------------- 30 // -------------------------------
33 31
34 if (checkSession()) { 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 if (!isset($action)) { 34 if (!isset($action)) {
38 $action = "dashboard"; 35 $action = "dashboard";
39 } 36 }
40 } else { 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 if (!isset($action)) { 39 if (!isset($action)) {
44 $action = "loginForm"; 40 $action = "loginForm";
45 } 41 }
@@ -48,11 +44,10 @@ if (checkSession()) { @@ -48,11 +44,10 @@ if (checkSession()) {
48 // reset authorisation flag before checking access 44 // reset authorisation flag before checking access
49 $_SESSION["authorised"] = false; 45 $_SESSION["authorised"] = false;
50 46
51 -$default->log->debug("control.php about to retrieve page from sitemap");  
52 // check whether the users group has access to the requested page 47 // check whether the users group has access to the requested page
53 $page = $default->siteMap->getPage($action, $_SESSION["groupID"]); 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 if (!$page) { 51 if (!$page) {
57 // this group doesn't have permission to access the page 52 // this group doesn't have permission to access the page
58 // or there is no page mapping for the requested action 53 // or there is no page mapping for the requested action