Commit c6132059e4b525d3be88c01ecb76abf12fec4dac
1 parent
66810dfe
Merged in from DEV trunk...
KTS-3141 "Error in template syntax for search2 portlets" Fixed. Fixed all hyperlink urls mentioned in the ticket. Committed By: Jonathan Byrne Reviewed By: Megan Watson KTS-3200 "Error during database upgrade: 3.4.6 to 3.5.2a" Fixed. Apache user (nobody) was attempting to backup the config.ini in the ktdms folder where it has no write rights. The config.ini is now only backed up or even updated if the file is writeable. There should be defaults for all config.ini values in dmsDefaults.php anyway and config.ini only provides a way to override those defaults. Committed By: Kevin Fourie Reviewed By: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8303 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
13 additions
and
4 deletions
lib/upgrades/Ini.inc.php
| @@ -68,7 +68,9 @@ class Ini { | @@ -68,7 +68,9 @@ class Ini { | ||
| 68 | $date = date('YmdHis'); | 68 | $date = date('YmdHis'); |
| 69 | 69 | ||
| 70 | $backupFile = $iniFile . '.' .$date; | 70 | $backupFile = $iniFile . '.' .$date; |
| 71 | - return file_put_contents($backupFile, $content) !== false; | 71 | + if (is_writeable($backupFile)) { |
| 72 | + file_put_contents($backupFile, $content); | ||
| 73 | + } | ||
| 72 | } | 74 | } |
| 73 | 75 | ||
| 74 | function read($iniFile) { | 76 | function read($iniFile) { |
| @@ -121,6 +123,10 @@ class Ini { | @@ -121,6 +123,10 @@ class Ini { | ||
| 121 | if(empty($iniFile)) { | 123 | if(empty($iniFile)) { |
| 122 | $iniFile = $this->iniFile; | 124 | $iniFile = $this->iniFile; |
| 123 | } | 125 | } |
| 126 | + if (!is_writeable($iniFile)) { | ||
| 127 | + return; | ||
| 128 | + } | ||
| 129 | + | ||
| 124 | $fileHandle = fopen($iniFile, 'wb'); | 130 | $fileHandle = fopen($iniFile, 'wb'); |
| 125 | foreach ($this->cleanArray as $section => $items) { | 131 | foreach ($this->cleanArray as $section => $items) { |
| 126 | if (substr($section, 0, strlen('_blankline_')) === '_blankline_' ) { | 132 | if (substr($section, 0, strlen('_blankline_')) === '_blankline_' ) { |
plugins/search2/IndexingStatusDashlet.php
| @@ -105,11 +105,14 @@ class IndexingStatusDashlet extends KTBaseDashlet | @@ -105,11 +105,14 @@ class IndexingStatusDashlet extends KTBaseDashlet | ||
| 105 | $oTemplating =& KTTemplating::getSingleton(); | 105 | $oTemplating =& KTTemplating::getSingleton(); |
| 106 | $oTemplate = $oTemplating->loadTemplate('ktcore/search2/indexing_status'); | 106 | $oTemplate = $oTemplating->loadTemplate('ktcore/search2/indexing_status'); |
| 107 | 107 | ||
| 108 | + $url = KTUtil::kt_url(); | ||
| 109 | + | ||
| 108 | $aTemplateData = array( | 110 | $aTemplateData = array( |
| 109 | 'context' => $this, | 111 | 'context' => $this, |
| 110 | 'indexerName' => $this->indexerName, | 112 | 'indexerName' => $this->indexerName, |
| 111 | 'indexerDiagnosis' => $this->indexerDiagnosis, | 113 | 'indexerDiagnosis' => $this->indexerDiagnosis, |
| 112 | - 'extractorDiagnosis' => $this->extractorDiagnosis | 114 | + 'extractorDiagnosis' => $this->extractorDiagnosis, |
| 115 | + 'rootUrl' => $url | ||
| 113 | ); | 116 | ); |
| 114 | 117 | ||
| 115 | return $oTemplate->render($aTemplateData); | 118 | return $oTemplate->render($aTemplateData); |
templates/ktcore/search2/indexing_status.smarty
| @@ -36,5 +36,5 @@ | @@ -36,5 +36,5 @@ | ||
| 36 | <B>{i18n}Note:{/i18n}</b> {i18n}Indexing will not continue until all issues have been resolved.{/i18n} | 36 | <B>{i18n}Note:{/i18n}</b> {i18n}Indexing will not continue until all issues have been resolved.{/i18n} |
| 37 | <table width="100%"> | 37 | <table width="100%"> |
| 38 | <tr> | 38 | <tr> |
| 39 | -<td align=right><a href="/search2.php?action=refreshDashboardStatus">Refresh</a> | 39 | +<td align=right><a href="{$rootUrl}/search2.php?action=refreshDashboardStatus">Refresh</a> |
| 40 | </table> | 40 | </table> |
templates/ktcore/search2/lucene_statistics.smarty
| @@ -79,7 +79,7 @@ toggle.style.display = 'none'; | @@ -79,7 +79,7 @@ toggle.style.display = 'none'; | ||
| 79 | {/if} | 79 | {/if} |
| 80 | </table> | 80 | </table> |
| 81 | <table width="100%"> | 81 | <table width="100%"> |
| 82 | -<tr><td colspan=2 align=right><a href="/search2.php?action=refreshLuceneStats" align=right>{i18n}Refresh{/i18n}</a></tr> | 82 | +<tr><td colspan=2 align=right><a href="{$rootUrl}/search2.php?action=refreshLuceneStats" align=right>{i18n}Refresh{/i18n}</a></tr> |
| 83 | </table> | 83 | </table> |
| 84 | 84 | ||
| 85 | 85 |