Fixed bug #15313: Link to deprecation logfile doesn't work in installations inside...
authorSusanne Moog <typo3@susannemoog.de>
Tue, 3 Aug 2010 19:43:12 +0000 (19:43 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Tue, 3 Aug 2010 19:43:12 +0000 (19:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8479 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php

index a8893c9..467f790 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-08-03  Susanne Moog  <typo3@susanne-moog.de>
 
        * Fixed bug #15304: csv export is limiting exported fields to 100 chars (thanks to Bj√∂rn Pedersen)
+       * Fixed bug #15313: Link to deprecation logfile doesn't work in installations inside a subdirectory (thanks to Stefan Galinski)
 
 2010-08-03  Oliver Hader  <oliver@typo3.org>
 
index abed632..39df349 100644 (file)
@@ -39,6 +39,12 @@ class tx_reports_reports_status_ConfigurationStatus implements tx_reports_Status
                // 100 MB
        protected $deprecationLogFileSizeErrorThreshold   = 104857600;
 
+       /**
+        * Backpath to the typo3 main directory
+        * 
+        * @var string
+        */
+       protected $backPath = '../';
 
        /**
         * Determines the Install Tool's status, mainly concerning its protection.
@@ -243,15 +249,14 @@ class tx_reports_reports_status_ConfigurationStatus implements tx_reports_Status
         * @return      string  Link to the deprecation log file
         */
        protected function getDeprecationLogFileLink() {
-               $logFile      = t3lib_div::getDeprecationLogFileName();
-               $documentRoot = t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT');
-
-               $relativePath = substr($logFile, strlen($documentRoot));
-               $link = '<a href="..' . $relativePath . '">' . $logFile . '</a>';
+               $logFile = t3lib_div::getDeprecationLogFileName();
+               $relativePath = t3lib_div::resolveBackPath(
+                       $this->backPath . substr($logFile, strlen(PATH_site))
+               );
+               $link = '<a href="' . $relativePath . '">' . $logFile . '</a>';
 
                return $link;
        }
-
 }