Commit 181672830801b9cecd270625cdde3d494b631fb3

Authored by michael
1 parent bf5f4ff3

remove page level access check and reformatted


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@408 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 60 additions and 64 deletions
presentation/browseBL.php
... ... @@ -39,73 +39,69 @@ require_once("$default->owl_fs_root/lib/visualpatterns/PatternCustom.inc");
39 39  
40 40 // only if we have a valid session
41 41 if (checkSession()) {
42   -
43   - // check if this page is authorised, ie. has come from control.php
44   - if ($_SESSION["authorised"]) {
45   - // retrieve variables
46   - if (!$fBrowseType) {
47   - // required param not set- internal error or user querystring hacking
48   - // TODO: something intelligent
49   - $_SESSION["errorMessage"] = "Required parameter missing, cannot proceed";
50   - } else {
51   - // fire up the document browser
52   - $oDocBrowser = new DocumentBrowser();
53   -
54   - // TODO: instantiate the visual components
55   -
56   - // instantiate data arrays
57   - $folders = NULL;
58   - $categories = NULL;
59   - $documentTypes = NULL;
60   -
61   - switch ($fBrowseType) {
62   - case "folder" : // retrieve folderID if present
63   - if (!$fFolderID) {
64   - $folders = $oDocBrowser->browseByFolder();
65   - } else {
66   - $folders = $oDocBrowser->browseByFolder($fFolderID);
67   - }
68   - break;
69   - case "category" :
70   - if (!$fCategoryName) {
71   - $categories = $oDocBrowser->browseByCategory();
72   - } else {
73   - $documents = $oDocBrowser->browseByCategory($fCategoryName);
74   - }
75   - break;
76   - case "documentType" :
77   - if (!$fDocumentTypeID) {
78   - $documentTypes = $oDocBrowser->browseByDocumentType();
79   - } else {
80   - $documents = $oDocBrowser->browseByDocumentType($fDocumentTypeID);
81   - }
82   - break;
83   - }
  42 + // retrieve variables
  43 + if (!$fBrowseType) {
  44 + // required param not set- internal error or user querystring hacking
  45 + // TODO: something intelligent
  46 + $_SESSION["errorMessage"] = "Required parameter missing, cannot proceed";
  47 + } else {
  48 + // fire up the document browser
  49 + $oDocBrowser = new DocumentBrowser();
  50 +
  51 + // TODO: instantiate the visual components
  52 +
  53 + // instantiate data arrays
  54 + $folders = NULL;
  55 + $categories = NULL;
  56 + $documentTypes = NULL;
  57 +
  58 + switch ($fBrowseType) {
  59 + case "folder" : // retrieve folderID if present
  60 + if (!$fFolderID) {
  61 + $folders = $oDocBrowser->browseByFolder();
  62 + } else {
  63 + $folders = $oDocBrowser->browseByFolder($fFolderID);
  64 + }
  65 + break;
  66 + case "category" :
  67 + if (!$fCategoryName) {
  68 + $categories = $oDocBrowser->browseByCategory();
  69 + } else {
  70 + $documents = $oDocBrowser->browseByCategory($fCategoryName);
  71 + }
  72 + break;
  73 + case "documentType" :
  74 + if (!$fDocumentTypeID) {
  75 + $documentTypes = $oDocBrowser->browseByDocumentType();
  76 + } else {
  77 + $documents = $oDocBrowser->browseByDocumentType($fDocumentTypeID);
  78 + }
  79 + break;
84 80 }
85   -
86   - /*
  81 + }
  82 +
  83 + /*
87 84  
88   - - loop through things, displaying appropriately
89   - - documentmanagement/browseUI.inc
90   - - displayDocumentLink
91   - - displayFolderLink
92   - - display
93   - - displayFileActions($permissionArray)
  85 + - loop through things, displaying appropriately
  86 + - documentmanagement/browseUI.inc
  87 + - displayDocumentLink
  88 + - displayFolderLink
  89 + - display
  90 + - displayFileActions($permissionArray)
94 91  
95   - - docManagement
96   - - getFileFolderPerms
97   - - folder modification links (if perms)
  92 + - docManagement
  93 + - getFileFolderPerms
  94 + - folder modification links (if perms)
98 95  
99   - - link to files / folders
100   - - displayLinkWithPath; displayLink
101   - - expand table?
102   - */
103   -
104   - } else {
105   - // FIXME: redirect to no permission page
106   - print "you do not have access to view this page! please go away, and come back when you do.<br>";
107   - echo generateLink("logout") . "logout</a>";
108   - // controllerRedirect("permissionDenied", "accessDeniedMsg=$lang_noPermission");
109   - }
  96 + - link to files / folders
  97 + - displayLinkWithPath; displayLink
  98 + - expand table?
  99 + */
  100 +
  101 +} else {
  102 + // FIXME: redirect to no permission page
  103 + print "you do not have access to view this page! please go away, and come back when you do.<br>";
  104 + echo generateLink("logout") . "logout</a>";
  105 + // controllerRedirect("permissionDenied", "accessDeniedMsg=$lang_noPermission");
110 106 }
111 107 ?>
... ...