From adb2d76e9894babef313c6a86b0ff06caed39ba2 Mon Sep 17 00:00:00 2001 From: nbm Date: Thu, 1 Dec 2005 19:46:09 +0000 Subject: [PATCH] If sending an absolute path, make sure to prefix it with the rootUrl of the installation. --- presentation/lookAndFeel/knowledgeTree/documentmanagement/view.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/view.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/view.php index d261d7c..6365957 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/view.php +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/view.php @@ -47,8 +47,9 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { $document_data = array(); $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); + $oKTConfig = KTConfig::getSingleton(); if ($document_id === null) { - $this->oPage->addError('No document was requested. Please browse for one.'); + $this->oPage->addError('No document was requested. Please browse for one.'); return $this->do_error(); } $document_data["document_id"] = $document_id; @@ -56,7 +57,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { // try get the document. $oDocument =& Document::get($document_id); if (PEAR::isError($oDocument)) { - $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); + $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); return $this->do_error(); } if (!Permission::userHasDocumentReadPermission($oDocument)) { @@ -135,7 +136,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { $document_data = array(); $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); if ($document_id === null) { - $this->oPage->addError('No document was requested. Please browse for one.'); + $this->oPage->addError('No document was requested. Please browse for one.'); return $this->do_error(); } $document_data["document_id"] = $document_id; @@ -143,7 +144,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { // try get the document. $oDocument =& Document::get($document_id); if (PEAR::isError($oDocument)) { - $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); + $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); return $this->do_error(); } // fixme check perms @@ -190,7 +191,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { $document_data = array(); $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); if ($document_id === null) { - $this->oPage->addError('No document was requested. Please browse for one.'); + $this->oPage->addError('No document was requested. Please browse for one.'); return $this->do_error(); } $document_data["document_id"] = $document_id; @@ -198,7 +199,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { // try get the document. $oDocument =& Document::get($document_id); if (PEAR::isError($oDocument)) { - $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); + $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); return $this->do_error(); } // fixme check perms @@ -232,7 +233,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { $document_data = array(); $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); if ($document_id === null) { - $this->oPage->addError('No document was requested. Please browse for one.'); + $this->oPage->addError('No document was requested. Please browse for one.'); return $this->do_error(); } $document_data["document_id"] = $document_id; @@ -240,7 +241,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { // try get the document. $oDocument =& Document::get($document_id); if (PEAR::isError($oDocument)) { - $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); + $this->oPage->addError('The document you attempted to retrieve is invalid. Please browse for one.'); return $this->do_error(); } if (!Permission::userHasDocumentReadPermission($oDocument)) { -- libgit2 0.21.4