Commit 07a07ffe402d1f64c370199c080b82e9c0ce125a

Authored by nbm
1 parent 04129d89

Use KTBrowseUtil::getBrowseBaseUrl for browse URLs.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4520 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 9 additions and 8 deletions
view.php
... ... @@ -20,6 +20,7 @@ require_once(KT_LIB_DIR . "/widgets/portlet.inc.php");
20 20 require_once(KT_LIB_DIR . "/widgets/fieldsetDisplay.inc.php");
21 21 require_once(KT_LIB_DIR . "/widgets/FieldsetDisplayRegistry.inc.php");
22 22 require_once(KT_LIB_DIR . "/actions/documentaction.inc.php");
  23 +require_once(KT_LIB_DIR . "/browse/browseutil.inc.php");
23 24  
24 25  
25 26 class ViewDocumentDispatcher extends KTStandardDispatcher {
... ... @@ -52,7 +53,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
52 53 $document_data = array();
53 54 $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId');
54 55 if ($document_id === null) {
55   - $this->oPage->addError('No document was requested. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  56 + $this->oPage->addError('No document was requested. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
56 57 return $this->do_error();
57 58 }
58 59 $document_data["document_id"] = $document_id;
... ... @@ -60,7 +61,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
60 61 // try get the document.
61 62 $oDocument =& Document::get($document_id);
62 63 if (PEAR::isError($oDocument)) {
63   - $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  64 + $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
64 65 return $this->do_error();
65 66 }
66 67 if (!Permission::userHasDocumentReadPermission($oDocument)) {
... ... @@ -138,7 +139,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
138 139 $document_data = array();
139 140 $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId');
140 141 if ($document_id === null) {
141   - $this->oPage->addError('No document was requested. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  142 + $this->oPage->addError('No document was requested. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
142 143 return $this->do_error();
143 144 }
144 145 $document_data["document_id"] = $document_id;
... ... @@ -146,7 +147,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
146 147 // try get the document.
147 148 $oDocument =& Document::get($document_id);
148 149 if (PEAR::isError($oDocument)) {
149   - $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  150 + $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
150 151 return $this->do_error();
151 152 }
152 153 // fixme check perms
... ... @@ -194,7 +195,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
194 195 $document_data = array();
195 196 $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId');
196 197 if ($document_id === null) {
197   - $this->oPage->addError('No document was requested. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  198 + $this->oPage->addError('No document was requested. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
198 199 return $this->do_error();
199 200 }
200 201 $document_data["document_id"] = $document_id;
... ... @@ -202,7 +203,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
202 203 // try get the document.
203 204 $oDocument =& Document::get($document_id);
204 205 if (PEAR::isError($oDocument)) {
205   - $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  206 + $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
206 207 return $this->do_error();
207 208 }
208 209 // fixme check perms
... ... @@ -242,7 +243,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
242 243 $document_data = array();
243 244 $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId');
244 245 if ($document_id === null) {
245   - $this->oPage->addError('No document was requested. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  246 + $this->oPage->addError('No document was requested. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
246 247 return $this->do_error();
247 248 }
248 249 $document_data["document_id"] = $document_id;
... ... @@ -250,7 +251,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
250 251 // try get the document.
251 252 $oDocument =& Document::get($document_id);
252 253 if (PEAR::isError($oDocument)) {
253   - $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . $GLOBALS['KTRootUrl'] . '/browse.php">browse</a> for one.');
  254 + $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
254 255 return $this->do_error();
255 256 }
256 257 if (!Permission::userHasDocumentReadPermission($oDocument)) {
... ...