Commit 3975944b29e14b9eb454bde5eb819ee0be4f243c

Authored by michael
1 parent c4bcbf54

(#2837) added option to just return constructed controller querystring


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2547 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 6 additions and 2 deletions
lib/session/control.inc
@@ -88,9 +88,13 @@ function generateLinkForTemplateDocumentBrowse($sTargetPage, $sQueryString, $sLi @@ -88,9 +88,13 @@ function generateLinkForTemplateDocumentBrowse($sTargetPage, $sQueryString, $sLi
88 * @param string additional querystring parameters (optional) 88 * @param string additional querystring parameters (optional)
89 * @return string the controller url, empty string if no action is supplied 89 * @return string the controller url, empty string if no action is supplied
90 */ 90 */
91 -function generateControllerUrl($sAction, $sQueryString = "") { 91 +function generateControllerUrl($sAction, $sQueryString = "", $bReturnLink = true) {
92 if (strlen($sAction) > 0) { 92 if (strlen($sAction) > 0) {
93 - return generateLink("/control.php?action=$sAction", $sQueryString); 93 + if ($bReturnLink) {
  94 + return generateLink("/control.php?action=$sAction", $sQueryString);
  95 + } else {
  96 + return "/control.php?action=$sAction&$sQueryString";
  97 + }
94 } else { 98 } else {
95 return ""; 99 return "";
96 } 100 }