Commit c4cf5bf9a9c162f4e1977a0c8892b6e4f539e4de

Authored by nbm
1 parent 5189e954

Use KTUtil::addQueryString to build URLs for the result URL


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4760 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 4 additions and 4 deletions
browse.php
... ... @@ -126,7 +126,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
126 126 $aActions = KTFolderActionUtil::getFolderActionsForFolder($oFolder, $this->oUser);
127 127 $portlet->setActions($aActions,null);
128 128 $this->oPage->addPortlet($portlet);
129   - $this->resultURL = "?fFolderId=" . $oFolder->getId();
  129 + $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fFolderId=%d", $oFolder->getId()));
130 130 } else if ($this->browse_mode == 'lookup_value') {
131 131 $this->editable = false;
132 132 $field = KTUtil::arrayGet($_REQUEST, 'fField', null);
... ... @@ -157,7 +157,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
157 157 // FIXME probably want to redirect to self + action=selectType
158 158 $this->aBreadcrumbs[] = array('name' => _('Document Types'));
159 159  
160   - $this->resultURL = "?fType=" . $doctype . "&fBrowseMode=document_type";
  160 + $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fType=%s&fBrowseMode=document_type", $doctype));;
161 161 } else {
162 162 // FIXME what should we do if we can't initiate the browse? we "pretend" to have no perms.
163 163 return false;
... ... @@ -325,7 +325,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
325 325 $batchPage = (int) KTUtil::arrayGet($_REQUEST, "page", 0);
326 326 $batchSize = 20;
327 327  
328   - $resultURL = sprintf("?fMoveCode=%s&fFolderId=%d&action=startMove", $sMoveCode, $oFolder->getId());
  328 + $resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fMoveCode=%s&fFolderId=%d&action=startMove", $sMoveCode, $oFolder->getId()));
329 329 $collection->setBatching($resultURL, $batchPage, $batchSize);
330 330  
331 331 // ordering. (direction and column)
... ... @@ -347,7 +347,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
347 347  
348 348 foreach (range(0, count($folder_path_ids) - 1) as $index) {
349 349 $id = $folder_path_ids[$index];
350   - $url = sprintf("?fMoveCode=%s&fFolderId=%d&action=startMove", $sMoveCode, $id);
  350 + $url = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fMoveCode=%s&fFolderId=%d&action=startMove", $sMoveCode, $id));
351 351 $aBreadcrumbs[] = array("url" => $url, "name" => $folder_path_names[$index]);
352 352 }
353 353  
... ...