Commit e0b473f8a4ef3760edff4b3e5d9f65611dca59b9
1 parent
720d19cc
updated to use document status checking methods
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1955 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
23 additions
and
24 deletions
lib/browse/CategoryBrowser.inc
| @@ -91,7 +91,7 @@ class CategoryBrowser extends Browser { | @@ -91,7 +91,7 @@ class CategoryBrowser extends Browser { | ||
| 91 | // check permissions | 91 | // check permissions |
| 92 | if (Permission::userHasDocumentReadPermission($sql->f("document_id"))) { | 92 | if (Permission::userHasDocumentReadPermission($sql->f("document_id"))) { |
| 93 | $oDocument = & Document::get($sql->f("document_id")); | 93 | $oDocument = & Document::get($sql->f("document_id")); |
| 94 | - if ($oDocument->getStatusID() == lookupStatusID("Live")) { | 94 | + if ($oDocument->isLive()) { |
| 95 | $results["documents"][] = $oDocument; | 95 | $results["documents"][] = $oDocument; |
| 96 | } | 96 | } |
| 97 | } else { | 97 | } else { |
lib/browse/DocumentTypeBrowser.inc
| @@ -81,7 +81,7 @@ class DocumentTypeBrowser extends Browser { | @@ -81,7 +81,7 @@ class DocumentTypeBrowser extends Browser { | ||
| 81 | // check permission | 81 | // check permission |
| 82 | if (Permission::userHasDocumentReadPermission($sql->f("id"))) { | 82 | if (Permission::userHasDocumentReadPermission($sql->f("id"))) { |
| 83 | $oDocument = & Document::get($sql->f("id")); | 83 | $oDocument = & Document::get($sql->f("id")); |
| 84 | - if ($oDocument->getStatusID() == lookupStatusID("Live")) { | 84 | + if ($oDocument->isLive()) { |
| 85 | $results["documents"][] = $oDocument; | 85 | $results["documents"][] = $oDocument; |
| 86 | } | 86 | } |
| 87 | } else { | 87 | } else { |
lib/browse/FolderBrowser.inc
| @@ -121,7 +121,7 @@ class FolderBrowser extends Browser { | @@ -121,7 +121,7 @@ class FolderBrowser extends Browser { | ||
| 121 | // add documents to array | 121 | // add documents to array |
| 122 | // set file attributes | 122 | // set file attributes |
| 123 | $oDocument = & Document::get($sql->f("id")); | 123 | $oDocument = & Document::get($sql->f("id")); |
| 124 | - if ($oDocument->getStatusID() == lookupStatusID("Live")) { | 124 | + if ($oDocument->isLive()) { |
| 125 | $results["documents"][] = $oDocument; | 125 | $results["documents"][] = $oDocument; |
| 126 | } | 126 | } |
| 127 | } else { | 127 | } else { |
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
| 1 | <?php | 1 | <?php |
| 2 | /** | 2 | /** |
| 3 | -* documentViewUI.php | ||
| 4 | -* Contains the business logic required to build the document view page. | ||
| 5 | -* Will use documentViewUI.php for HTML | ||
| 6 | -* | ||
| 7 | -* Expected form varaibles: | ||
| 8 | -* o $fDocumentID - Primary key of document to view | ||
| 9 | -* | ||
| 10 | -* Optional form variables: | ||
| 11 | -* o fCollaborationEdit - the user attempted to edit a collaboration step that is currently active | ||
| 12 | -* o fForDownload - the user is attempting to download the document | ||
| 13 | -* o fBeginCollaboration - the user selected the 'Begin Collaboration' button | ||
| 14 | -* o fFireSubscription - the document has been modified, and a subscription alert must be fired | ||
| 15 | -* | ||
| 16 | -* | ||
| 17 | -* @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa | ||
| 18 | -* @date 21 January 2003 | ||
| 19 | -* @package presentation.lookAndFeel.knowledgeTree.documentManager | ||
| 20 | -*/ | ||
| 21 | - | 3 | + * $Id$ |
| 4 | + * Contains the business logic required to build the document view page. | ||
| 5 | + * Will use documentViewUI.php for HTML | ||
| 6 | + * | ||
| 7 | + * Expected form varaibles: | ||
| 8 | + * o $fDocumentID - Primary key of document to view | ||
| 9 | + * | ||
| 10 | + * Optional form variables: | ||
| 11 | + * o fCollaborationEdit - the user attempted to edit a collaboration step that is currently active | ||
| 12 | + * o fForDownload - the user is attempting to download the document | ||
| 13 | + * o fBeginCollaboration - the user selected the 'Begin Collaboration' button | ||
| 14 | + * o fFireSubscription - the document has been modified, and a subscription alert must be fired | ||
| 15 | + * | ||
| 16 | + * | ||
| 17 | + * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa | ||
| 18 | + * @date 21 January 2003 | ||
| 19 | + * @package presentation.lookAndFeel.knowledgeTree.documentManager | ||
| 20 | + */ | ||
| 22 | 21 | ||
| 23 | require_once("../../../../config/dmsDefaults.php"); | 22 | require_once("../../../../config/dmsDefaults.php"); |
| 24 | 23 | ||
| @@ -225,13 +224,13 @@ if (checkSession()) { | @@ -225,13 +224,13 @@ if (checkSession()) { | ||
| 225 | } | 224 | } |
| 226 | 225 | ||
| 227 | $oPatternCustom = & new PatternCustom(); | 226 | $oPatternCustom = & new PatternCustom(); |
| 228 | - if ($oDocument->getStatusID() == lookupStatusID("Live")) { | 227 | + if ($oDocument->isLive()) { |
| 229 | if (Permission::userHasDocumentWritePermission($fDocumentID)) { | 228 | if (Permission::userHasDocumentWritePermission($fDocumentID)) { |
| 230 | $oPatternCustom->setHtml(getEditPage($oDocument)); | 229 | $oPatternCustom->setHtml(getEditPage($oDocument)); |
| 231 | } else if (Permission::userHasDocumentReadPermission($fDocumentID)) { | 230 | } else if (Permission::userHasDocumentReadPermission($fDocumentID)) { |
| 232 | $oPatternCustom->setHtml(getViewPage($oDocument)); | 231 | $oPatternCustom->setHtml(getViewPage($oDocument)); |
| 233 | } | 232 | } |
| 234 | - } else if ($oDocument->getStatusID() == lookupStatusID("Archived")) { | 233 | + } else if ($oDocument->isArchived()) { |
| 235 | // cancel | 234 | // cancel |
| 236 | $oPatternCustom->setHtml("<a href=\"" . generateControllerLink("browse", "fFolderID=" . $oDocument->getFolderID()) . "\"><img src=\"$default->graphicsUrl/widgets/back.gif\" border=\"0\" /></a>\n"); | 235 | $oPatternCustom->setHtml("<a href=\"" . generateControllerLink("browse", "fFolderID=" . $oDocument->getFolderID()) . "\"><img src=\"$default->graphicsUrl/widgets/back.gif\" border=\"0\" /></a>\n"); |
| 237 | $main->setErrorMessage("This document has been archived."); | 236 | $main->setErrorMessage("This document has been archived."); |