diff --git a/ChangeLog b/ChangeLog index 24c314eb96e83e0662fb0ce7996d062bbc95292c..eb7db80f7afb2c83d41f4c08581fc315de44436b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2010-04-30 Tobias Liebig <mail_typo3@etobi.de> * Fixed bug #11587: set proper default timezone (fixes PHP 5.3 warnings concerning missing timezone settings) + * Fixed bug #3800: Improve warning about empty reference index table (thanks to Michael Knabe) 2010-04-30 Jeff Segars <jeff@webempoweredchurch.org> diff --git a/t3lib/class.t3lib_befunc.php b/t3lib/class.t3lib_befunc.php index e4a8021f68ffe24414c3bb280c1e6f80ce062cb9..9f5979ea5e0825b7d4dcaa4720270452152d9eaf 100644 --- a/t3lib/class.t3lib_befunc.php +++ b/t3lib/class.t3lib_befunc.php @@ -4231,12 +4231,15 @@ final class t3lib_BEfunc { // Check if sys_refindex is empty $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', 'sys_refindex'); - if (!$count) { + $registry = t3lib_div::makeInstance('t3lib_Registry'); + $lastRefIndexUpdate = $registry->get('core', 'sys_refindex_lastUpdate'); + if (!$count && $lastRefIndexUpdate) { $url = 'sysext/lowlevel/dbint/index.php?&id=0&SET[function]=refindex'; $warnings["backend_reference"] = sprintf( $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_reference'), '<a href="'.$url.'">', - '</a>'); + '</a>', + t3lib_BEfunc::dateTime($lastRefIndexUpdate)); } // Check for memcached if configured diff --git a/t3lib/class.t3lib_refindex.php b/t3lib/class.t3lib_refindex.php index ade48c08169c4d46cf4ae280faefdb395fb348c9..15ed193c9601ed279c00d682e6c2c3e7622ae0e5 100644 --- a/t3lib/class.t3lib_refindex.php +++ b/t3lib/class.t3lib_refindex.php @@ -1059,6 +1059,11 @@ class t3lib_refindex { $bodyContent = $testedHowMuch.(count($errors)?implode(LF,$errors):'Index Integrity was perfect!'); if ($cli_echo) echo $testedHowMuch.(count($errors)?'Updates: '.count($errors):'Index Integrity was perfect!').LF; + if(!$testOnly) { + $registry = t3lib_div::makeInstance('t3lib_Registry'); + $registry->set('core', 'sys_refindex_lastUpdate', $GLOBALS['EXEC_TIME']); + } + return array($headerContent,$bodyContent,count($errors)); } } diff --git a/typo3/sysext/lang/locallang_core.xml b/typo3/sysext/lang/locallang_core.xml index 9ebe04fac32efb523375f725dc8530b165b127ba..6f4eac0e2edd5d7b4ced28dad5771376b7a516ce 100755 --- a/typo3/sysext/lang/locallang_core.xml +++ b/typo3/sysext/lang/locallang_core.xml @@ -252,7 +252,7 @@ Would you like to save now in order to refresh the display?</label> <label index="warning.install_encryption">The encryption key is not set. Set it in the %sBasic Configuration section%s of the Install Tool.</label> <label index="warning.install_update">This installation is not configured for the TYPO3 version it is running. If you did so intentionally, this message can be safely ignored. If you are unsure, visit the %sUpdate Wizard%s section of the Install Tool to see how TYPO3 would change.</label> <label index="warning.header">Important Notice!</label> - <label index="warning.backend_reference">The Reference Index table is empty which is likely the result of a recent TYPO3 upgrade. Please go to %sTools>DB Check%s and update the reference index.</label> + <label index="warning.backend_reference">The Reference Index table is empty which is likely the result of a recent TYPO3 upgrade. The Reference Index was last updated on %3$s. Please go to %sTools>DB Check%s and update the reference index.</label> <label index="warning.memcache_not_usable">Memcache is configured, but connection to memcached failed with these configuration(s):</label> <label index="warning.file_missing">File is missing!</label> <label index="warning.file_missing_text">This content element references a file which seems to not exist:</label> diff --git a/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php b/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php index d32e2c887e1118c3815cf791ee57fe1b5c5fdf9b..0754886c25e26c4702262d6519b3cf0ed217c9ac 100644 --- a/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php +++ b/typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php @@ -63,8 +63,10 @@ class tx_reports_reports_status_ConfigurationStatus implements tx_reports_Status $severity = tx_reports_reports_status_Status::OK; $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', 'sys_refindex'); + $registry = t3lib_div::makeInstance('t3lib_Registry'); + $lastRefIndexUpdate = $registry->get('core', 'sys_refindex_lastUpdate'); - if (!$count) { + if (!$count && $lastRefIndexUpdate) { $value = $GLOBALS['LANG']->getLL('status_empty'); $severity = tx_reports_reports_status_Status::WARNING; @@ -72,10 +74,10 @@ class tx_reports_reports_status_ConfigurationStatus implements tx_reports_Status $message = sprintf( $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_reference'), '<a href="' . $url . '">', - '</a>' + '</a>', + t3lib_BeFunc::dateTime($lastRefIndexUpdate) ); } - return t3lib_div::makeInstance('tx_reports_reports_status_Status', $GLOBALS['LANG']->getLL('status_referenceIndex'), $value, $message, $severity ); @@ -184,4 +186,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/reports include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/reports/reports/status/class.tx_reports_reports_status_installtoolstatus.php']); } -?> \ No newline at end of file +?>