From 65c819c2a7df26b7d41e9759d9bad7e966804b23 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Thu, 13 Mar 2003 12:33:58 +0000 Subject: [PATCH] remove constraint that originators are the only ones allow to request web publishing --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php index 5f1a0d2..b186727 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php @@ -160,42 +160,30 @@ if (checkSession()) { if (isset($fWebSiteID)) { // user wishes to publish document $oDocument = Document::get($fDocumentID); - if ($_SESSION["userID"] == $oDocument->getCreatorID()) { - //only the creator can send the document for publishing - $aWebDocument = WebDocument::getList("document_id = $fDocumentID"); - $oWebDocument = $aWebDocument[0]; - $oWebDocument->setStatusID(PENDING); - $oWebDocument->setWebSiteID($fWebSiteID); - if ($oWebDocument->update()) { - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); - $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Document sent for web publishing", UPDATE); - $oDocumentTransaction->create(); - $oDocument = Document::get($fDocumentID); - Document::notifyWebMaster($fDocumentID, $fComment); - $oPatternCustom = & new PatternCustom(); - $oPatternCustom->setHtml(getEditPage($oDocument)); - $main->setCentralPayload($oPatternCustom); - $main->setErrorMessage("The document has been marked as pending publishing and the web publisher has been notified"); - $main->render(); - - } else { - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); - $oDocument = Document::get($fDocumentID); - $oPatternCustom = & new PatternCustom(); - $oPatternCustom->setHtml(getEditPage($oDocument)); - $main->setCentralPayload($oPatternCustom); - $main->setErrorMessage("An error occured while attempting to update the document for publishing"); - $main->render(); - } + $aWebDocument = WebDocument::getList("document_id = $fDocumentID"); + $oWebDocument = $aWebDocument[0]; + $oWebDocument->setStatusID(PENDING); + $oWebDocument->setWebSiteID($fWebSiteID); + if ($oWebDocument->update()) { + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); + $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Document sent for web publishing", UPDATE); + $oDocumentTransaction->create(); + $oDocument = Document::get($fDocumentID); + Document::notifyWebMaster($fDocumentID, $fComment); + $oPatternCustom = & new PatternCustom(); + $oPatternCustom->setHtml(getEditPage($oDocument)); + $main->setCentralPayload($oPatternCustom); + $main->setErrorMessage("The document has been marked as pending publishing and the web publisher has been notified"); + $main->render(); + } else { - // you're can't publish if you're not the originator require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); $oDocument = Document::get($fDocumentID); $oPatternCustom = & new PatternCustom(); $oPatternCustom->setHtml(getEditPage($oDocument)); $main->setCentralPayload($oPatternCustom); - $main->setErrorMessage("You can't publish this document because you're not the document originator"); - $main->render(); + $main->setErrorMessage("An error occured while attempting to update the document for publishing"); + $main->render(); } } else { // prompt for the website to publish to -- libgit2 0.21.4