Commit 93739af632cacef8377938307b4eab4eb6554dca

Authored by Neil Blakey-Milner
1 parent 8828aebe

Use KTBrowseUtil::getBrowseBaseUrl for browse URLs and

KTBrowseUtil::getUrlForDocument for document view URL.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4519 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 4 deletions
edit.php
... ... @@ -6,7 +6,7 @@
6 6 * @author Brad Shuttleworth, Jam Warehouse (Pty) Ltd, South Africa
7 7 */
8 8  
9   -require_once("../../../../config/dmsDefaults.php");
  9 +require_once("config/dmsDefaults.php");
10 10 require_once(KT_LIB_DIR . '/dispatcher.inc.php');
11 11  
12 12 require_once(KT_LIB_DIR . '/documentmanagement/Document.inc');
... ... @@ -27,6 +27,7 @@ require_once(KT_LIB_DIR . "/widgets/portlet.inc.php");
27 27 require_once(KT_LIB_DIR . "/widgets/fieldsetDisplay.inc.php");
28 28 require_once(KT_LIB_DIR . "/widgets/FieldsetDisplayRegistry.inc.php");
29 29 require_once(KT_LIB_DIR . "/actions/documentaction.inc.php");
  30 +require_once(KT_LIB_DIR . "/browse/browseutil.inc.php");
30 31  
31 32  
32 33 class KTEditDocumentDispatcher extends KTStandardDispatcher {
... ... @@ -73,13 +74,13 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher {
73 74  
74 75 if ($parents != 0) {
75 76 foreach (range(0,$parents) as $index) {
76   - $this->aBreadcrumbs[] = array("url" => $GLOBALS['KTRootUrl'] . "/browse.php?fFolderId=" . $folder_path_ids[$index], "name" => $folder_path_names[$index]);
  77 + $this->aBreadcrumbs[] = array("url" => KTBrowseUtil::getUrlForFolder($folder_path_ids[$index]), "name" => $folder_path_names[$index]);
77 78 }
78 79 }
79 80  
80 81 // now add this folder, _if we aren't in 1_.
81 82 if ($folder_id != 1) {
82   - $this->aBreadcrumbs[] = array("url" => $GLOBALS['KTRootUrl'] . "/browse.php?fFolderId=" . $folder_id, "name" => $oFolder->getName());
  83 + $this->aBreadcrumbs[] = array("url" => KTBrowseUtil::getUrlForFolder($folder_id), "name" => $oFolder->getName());
83 84 }
84 85  
85 86 // now add the document
... ... @@ -330,7 +331,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher {
330 331 // this involves a redirect to view, with a message.
331 332 // FIXME do not hard-code URLs
332 333  
333   - redirect('view.php?fDocumentId=' . $document_id);
  334 + redirect(KTBrowseUtil::getUrlForDocument($document_id));
334 335 }
335 336  
336 337  
... ...