Commit d2b7549cc96edc7232c525496491814c6ee62e7c
1 parent
bbc5c96c
Merged in from DEV trunk...
KTS-3100 "Various <a href> links don't work when kt installed in subfolder off root url" Fixed. Fixed all broken href links I could find. Committed By: Jonathan Byrne Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8277 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
5 changed files
with
18 additions
and
7 deletions
config/dmsDefaults.php
| @@ -393,7 +393,11 @@ function catchFatalErrors($p_OnOff='On'){ | @@ -393,7 +393,11 @@ function catchFatalErrors($p_OnOff='On'){ | ||
| 393 | $phperror='><div id="phperror" style="display:none">'; | 393 | $phperror='><div id="phperror" style="display:none">'; |
| 394 | ini_set('error_prepend_string',$phperror); | 394 | ini_set('error_prepend_string',$phperror); |
| 395 | 395 | ||
| 396 | - $phperror='</div>><form name="catcher" action="/customerrorpage.php" method="post" ><input type="hidden" name="fatal" value=""></form> | 396 | + $sUrl = KTInit::guessRootUrl(); |
| 397 | + global $default; | ||
| 398 | + $sRootUrl = ($default->sslEnabled ? 'https' : 'http') .'://'.$_SERVER['HTTP_HOST'].$sUrl; | ||
| 399 | + | ||
| 400 | + $phperror='</div>><form name="catcher" action="'.$sRootUrl.'/customerrorpage.php" method="post" ><input type="hidden" name="fatal" value=""></form> | ||
| 397 | <script> document.catcher.fatal.value = document.getElementById("phperror").innerHTML; document.catcher.submit();</script>'; | 401 | <script> document.catcher.fatal.value = document.getElementById("phperror").innerHTML; document.catcher.submit();</script>'; |
| 398 | ini_set('error_append_string',$phperror); | 402 | ini_set('error_append_string',$phperror); |
| 399 | } | 403 | } |
customerrorpage.php
| @@ -13,19 +13,23 @@ if (array_key_exists('Error_MessageOne', $_POST) && array_key_exists('Error_Mess | @@ -13,19 +13,23 @@ if (array_key_exists('Error_MessageOne', $_POST) && array_key_exists('Error_Mess | ||
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | session_start(); | 15 | session_start(); |
| 16 | +require_once("config/dmsDefaults.php"); | ||
| 17 | + | ||
| 16 | if (array_key_exists('sErrorMessage', $_SESSION)) | 18 | if (array_key_exists('sErrorMessage', $_SESSION)) |
| 17 | { | 19 | { |
| 18 | $phperror = $_SESSION['sErrorMessage']; | 20 | $phperror = $_SESSION['sErrorMessage']; |
| 19 | } | 21 | } |
| 20 | 22 | ||
| 23 | +global $default; | ||
| 21 | 24 | ||
| 25 | +$sUrl = $default->rootUrl; | ||
| 22 | 26 | ||
| 23 | ?> | 27 | ?> |
| 24 | 28 | ||
| 25 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> | 29 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> |
| 26 | <head> | 30 | <head> |
| 27 | <title>Knowledgetree - Desklet</title> | 31 | <title>Knowledgetree - Desklet</title> |
| 28 | - <link rel="stylesheet" type="text/css" href="/resources/css/errors.css" /> | 32 | + <link rel="stylesheet" type="text/css" href="<?php echo $sUrl ?>/resources/css/errors.css" /> |
| 29 | 33 | ||
| 30 | <script type="text/javascript"> | 34 | <script type="text/javascript"> |
| 31 | 35 | ||
| @@ -49,7 +53,7 @@ border.style.height = '250px'; | @@ -49,7 +53,7 @@ border.style.height = '250px'; | ||
| 49 | 53 | ||
| 50 | <h1>Error!! - You have encountered a problem starting your document management system.</h1> | 54 | <h1>Error!! - You have encountered a problem starting your document management system.</h1> |
| 51 | <p><h2>Please contact your systems administrator</h2></p> | 55 | <p><h2>Please contact your systems administrator</h2></p> |
| 52 | - <p>For more details, click here <img src="/resources/graphics/info.gif" style="cursor: pointer;" onclick="Click()" /><div id ="exp" style="display: none; "> <?php if(isset($sErrorMessage)){ echo $sErrorMessage; }else if(isset($posted)){ echo $posted; } else if($phperror){ echo $phperror; } ?></div></p> | 56 | + <p>For more details, click here <img src="<?php echo $sUrl ?>/resources/graphics/info.gif" style="cursor: pointer;" onclick="Click()" /><div id ="exp" style="display: none; "> <?php if(isset($sErrorMessage)){ echo $sErrorMessage; }else if(isset($posted)){ echo $posted; } else if($phperror){ echo $phperror; } ?></div></p> |
| 53 | 57 | ||
| 54 | </div> | 58 | </div> |
| 55 | </div> | 59 | </div> |
plugins/search2/ExternalDashlet.php
| @@ -129,9 +129,12 @@ class ExternalResourceStatusDashlet extends KTBaseDashlet | @@ -129,9 +129,12 @@ class ExternalResourceStatusDashlet extends KTBaseDashlet | ||
| 129 | $oTemplating =& KTTemplating::getSingleton(); | 129 | $oTemplating =& KTTemplating::getSingleton(); |
| 130 | $oTemplate = $oTemplating->loadTemplate('ktcore/search2/external_resources'); | 130 | $oTemplate = $oTemplating->loadTemplate('ktcore/search2/external_resources'); |
| 131 | 131 | ||
| 132 | + $sUrl = KTUtil::kt_url(); | ||
| 133 | + | ||
| 132 | $aTemplateData = array( | 134 | $aTemplateData = array( |
| 133 | 'context' => $this, | 135 | 'context' => $this, |
| 134 | - 'resources' => $this->resources | 136 | + 'resources' => $this->resources, |
| 137 | + 'url' => $sUrl | ||
| 135 | ); | 138 | ); |
| 136 | 139 | ||
| 137 | return $oTemplate->render($aTemplateData); | 140 | return $oTemplate->render($aTemplateData); |
search2.php
| @@ -70,14 +70,14 @@ class SearchDispatcher extends KTStandardDispatcher { | @@ -70,14 +70,14 @@ class SearchDispatcher extends KTStandardDispatcher { | ||
| 70 | function do_refreshLuceneStats() | 70 | function do_refreshLuceneStats() |
| 71 | { | 71 | { |
| 72 | session_unregister('LuceneStats'); | 72 | session_unregister('LuceneStats'); |
| 73 | - redirect('/dashboard.php'); | 73 | + redirect(KTUtil::kt_url().'/dashboard.php'); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | function do_refreshDashboardStatus() | 76 | function do_refreshDashboardStatus() |
| 77 | { | 77 | { |
| 78 | session_unregister('ExternalResourceStatus'); | 78 | session_unregister('ExternalResourceStatus'); |
| 79 | session_unregister('IndexingStatus'); | 79 | session_unregister('IndexingStatus'); |
| 80 | - redirect('/dashboard.php'); | 80 | + redirect(KTUtil::kt_url().'/dashboard.php'); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | /** | 83 | /** |
templates/ktcore/search2/external_resources.smarty
| @@ -7,5 +7,5 @@ | @@ -7,5 +7,5 @@ | ||
| 7 | <tr><td valign=top><I>{$resource.name}</td><td>{$resource.status}</td> | 7 | <tr><td valign=top><I>{$resource.name}</td><td>{$resource.status}</td> |
| 8 | <tr ><td colspan=2><hr></tr> | 8 | <tr ><td colspan=2><hr></tr> |
| 9 | {/foreach} | 9 | {/foreach} |
| 10 | -<tr><td colspan=2 align=right><a href="/search2.php?action=refreshDashboardStatus" align=right>{i18n}Refresh{/i18n}</a></tr> | 10 | +<tr><td colspan=2 align=right><a href="{$url}/search2.php?action=refreshDashboardStatus" align=right>{i18n}Refresh{/i18n}</a></tr> |
| 11 | </table> | 11 | </table> |