Commit c4cf5bf9a9c162f4e1977a0c8892b6e4f539e4de
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,7 +126,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 126 | $aActions = KTFolderActionUtil::getFolderActionsForFolder($oFolder, $this->oUser); | 126 | $aActions = KTFolderActionUtil::getFolderActionsForFolder($oFolder, $this->oUser); |
| 127 | $portlet->setActions($aActions,null); | 127 | $portlet->setActions($aActions,null); |
| 128 | $this->oPage->addPortlet($portlet); | 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 | } else if ($this->browse_mode == 'lookup_value') { | 130 | } else if ($this->browse_mode == 'lookup_value') { |
| 131 | $this->editable = false; | 131 | $this->editable = false; |
| 132 | $field = KTUtil::arrayGet($_REQUEST, 'fField', null); | 132 | $field = KTUtil::arrayGet($_REQUEST, 'fField', null); |
| @@ -157,7 +157,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -157,7 +157,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 157 | // FIXME probably want to redirect to self + action=selectType | 157 | // FIXME probably want to redirect to self + action=selectType |
| 158 | $this->aBreadcrumbs[] = array('name' => _('Document Types')); | 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 | } else { | 161 | } else { |
| 162 | // FIXME what should we do if we can't initiate the browse? we "pretend" to have no perms. | 162 | // FIXME what should we do if we can't initiate the browse? we "pretend" to have no perms. |
| 163 | return false; | 163 | return false; |
| @@ -325,7 +325,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -325,7 +325,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 325 | $batchPage = (int) KTUtil::arrayGet($_REQUEST, "page", 0); | 325 | $batchPage = (int) KTUtil::arrayGet($_REQUEST, "page", 0); |
| 326 | $batchSize = 20; | 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 | $collection->setBatching($resultURL, $batchPage, $batchSize); | 329 | $collection->setBatching($resultURL, $batchPage, $batchSize); |
| 330 | 330 | ||
| 331 | // ordering. (direction and column) | 331 | // ordering. (direction and column) |
| @@ -347,7 +347,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -347,7 +347,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 347 | 347 | ||
| 348 | foreach (range(0, count($folder_path_ids) - 1) as $index) { | 348 | foreach (range(0, count($folder_path_ids) - 1) as $index) { |
| 349 | $id = $folder_path_ids[$index]; | 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 | $aBreadcrumbs[] = array("url" => $url, "name" => $folder_path_names[$index]); | 351 | $aBreadcrumbs[] = array("url" => $url, "name" => $folder_path_names[$index]); |
| 352 | } | 352 | } |
| 353 | 353 |