diff --git a/lib/documentmanagement/DocumentBrowser.inc b/lib/documentmanagement/DocumentBrowser.inc index 0b8db23..8b2b9ea 100644 --- a/lib/documentmanagement/DocumentBrowser.inc +++ b/lib/documentmanagement/DocumentBrowser.inc @@ -6,7 +6,7 @@ * Contains document browsing business logic. * * @version $Revision$ - * @author Michael Joseph, Jam Warehouse (Pty) Ltd, South Africa * @package dmslib */ class DocumentBrowser { @@ -29,7 +29,12 @@ class DocumentBrowser { // TODO: organisationID (and name) should be on session // TODO: use the organisation to find the root folder - // eg. $rootFolderName = $_SESSION["organisationName"] . " Document Root"; + if (!isset($_SESSION["organisationName"])) { + $_SESSION["organisationName"] = "MRC"; + } + $rootFolderName = $_SESSION["organisationName"] . " Document Root"; + // lookup the id of the root folder + $folderID = lookupID($default->owl_folders_table, "name", "'$rootFolderName'"); // if this is a system administrator, start her at the ROOT // TODO: add to default->sysadmin_group @@ -38,9 +43,6 @@ class DocumentBrowser { } else { // otherwise start everyone relative to their unit - // lookup the id of the root folder - //$folderID = lookupID($default->owl_folders_table, "name", "'$rootFolderName'"); - // FIXME: actually need to lookup the unit root folder- which should map to the unitname // and descend directly from the organisation document root $unitRootFolder = $_SESSION["unitName"] . " Document Root";