Commit 0d7c6f7b7e2ca3db03e7bb9f97c5f640706ec06d
1 parent
7c1f3f66
KTS-1849
"CLONE -Document link should send full url. (SUP-183). " Fixed. Reviewed By: Kevin git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6497 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
7 additions
and
5 deletions
lib/session/control.inc
| @@ -63,7 +63,7 @@ function controllerRedirect($sAction, $sQueryString = "") { | @@ -63,7 +63,7 @@ function controllerRedirect($sAction, $sQueryString = "") { | ||
| 63 | * @param string the link text (optional) | 63 | * @param string the link text (optional) |
| 64 | * @return string the html link if the link text is specified, otherwise just the url | 64 | * @return string the html link if the link text is specified, otherwise just the url |
| 65 | */ | 65 | */ |
| 66 | -function generateLink($sTargetPage, $sQueryString = "", $sLinkText = "") { | 66 | +function generateLink($sTargetPage, $sQueryString = "", $sLinkText = "", $bLinkUrl = false) { |
| 67 | global $default; | 67 | global $default; |
| 68 | 68 | ||
| 69 | $sLink = "http" . ($default->sslEnabled ? "s" : "") . "://" . $default->serverName . | 69 | $sLink = "http" . ($default->sslEnabled ? "s" : "") . "://" . $default->serverName . |
| @@ -72,7 +72,9 @@ function generateLink($sTargetPage, $sQueryString = "", $sLinkText = "") { | @@ -72,7 +72,9 @@ function generateLink($sTargetPage, $sQueryString = "", $sLinkText = "") { | ||
| 72 | $sTargetPage; | 72 | $sTargetPage; |
| 73 | 73 | ||
| 74 | $sLink = KTUtil::addQueryString($sLink, $sQueryString); | 74 | $sLink = KTUtil::addQueryString($sLink, $sQueryString); |
| 75 | - | 75 | + if($bLinkUrl == true){ |
| 76 | + $sLinkText = $sLink; | ||
| 77 | + } | ||
| 76 | return (strlen($sLinkText) > 0) ? "<a href=\"$sLink\">$sLinkText</a>" : $sLink; | 78 | return (strlen($sLinkText) > 0) ? "<a href=\"$sLink\">$sLinkText</a>" : $sLink; |
| 77 | } | 79 | } |
| 78 | 80 | ||
| @@ -112,12 +114,12 @@ function generateControllerUrl($sAction, $sQueryString = "", $bReturnLink = true | @@ -112,12 +114,12 @@ function generateControllerUrl($sAction, $sQueryString = "", $bReturnLink = true | ||
| 112 | * @param string the querystring (optional) | 114 | * @param string the querystring (optional) |
| 113 | * @return string the generated href | 115 | * @return string the generated href |
| 114 | */ | 116 | */ |
| 115 | -function generateControllerLink($sAction, $sQueryString = "", $sLinkText = "") { | 117 | +function generateControllerLink($sAction, $sQueryString = "", $sLinkText = "", $bLinkUrl = false) { |
| 116 | $qs = ""; | 118 | $qs = ""; |
| 117 | if (!empty($sQueryString)) { | 119 | if (!empty($sQueryString)) { |
| 118 | $qs = 'qs=' . urlencode($sQueryString); | 120 | $qs = 'qs=' . urlencode($sQueryString); |
| 119 | } | 121 | } |
| 120 | - return generateLink("/control.php?action=$sAction", $qs, $sLinkText); | 122 | + return generateLink("/control.php?action=$sAction", $qs, $sLinkText, $bLinkUrl); |
| 121 | } | 123 | } |
| 122 | 124 | ||
| 123 | /** | 125 | /** |
plugins/ktstandard/KTEmail.php
| @@ -184,7 +184,7 @@ function sendEmailHyperlink($sDestEmailAddress, $sDestUserName, $iDocumentID, $s | @@ -184,7 +184,7 @@ function sendEmailHyperlink($sDestEmailAddress, $sDestUserName, $iDocumentID, $s | ||
| 184 | $sMessage .= " \n"; | 184 | $sMessage .= " \n"; |
| 185 | $sMessage .= _kt("Click on the hyperlink below to view it."); | 185 | $sMessage .= _kt("Click on the hyperlink below to view it."); |
| 186 | // add the link to the document to the mail | 186 | // add the link to the document to the mail |
| 187 | - $sMessage .= "<br>" . generateControllerLink("viewDocument", "fDocumentID=$iDocumentID", $sDocumentName); | 187 | + $sMessage .= "<br>" . generateControllerLink("viewDocument", "fDocumentID=$iDocumentID", $sDocumentName, true); |
| 188 | // add optional comment | 188 | // add optional comment |
| 189 | if (strlen($sComment) > 0) { | 189 | if (strlen($sComment) > 0) { |
| 190 | $sMessage .= "<br><br>" . _kt("Comments:") . "<br>" . $sComment; | 190 | $sMessage .= "<br><br>" . _kt("Comments:") . "<br>" . $sComment; |