From 6bffa1f68e7e170e5eff7802b0d9a275b7b111e1 Mon Sep 17 00:00:00 2001 From: Steffen Gebert <steffen.gebert@typo3.org> Date: Mon, 23 Aug 2010 22:34:35 +0000 Subject: [PATCH] Added feature #15454: Provide a reason for logDeprecatedTypoScript() git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8658 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 4 ++++ typo3/sysext/cms/tslib/class.tslib_fe.php | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 227fb0c9b975..de53d234f585 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-08-24 Steffen Gebert <steffen@steffen-gebert.de> + + * Added feature #15454: Provide a reason for logDeprecatedTypoScript() + 2010-08-23 Steffen Gebert <steffen@steffen-gebert.de> * Added feature #15534: t3lib_div::view_array: Improve rendering of objects (Thanks to Stefan Galinski) diff --git a/typo3/sysext/cms/tslib/class.tslib_fe.php b/typo3/sysext/cms/tslib/class.tslib_fe.php index e93effe10e09..ffff9b7f5e5d 100644 --- a/typo3/sysext/cms/tslib/class.tslib_fe.php +++ b/typo3/sysext/cms/tslib/class.tslib_fe.php @@ -1689,7 +1689,7 @@ } else { $message = 'You logged out from Workspace preview mode. Click this link to <a href="%1$s">go back to the website</a>'; } - + $returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GET('returnUrl')); die(sprintf($message, htmlspecialchars(preg_replace('/\&?ADMCMD_prev=[[:alnum:]]+/', '', $returnUrl)) @@ -3634,7 +3634,7 @@ if (version == "n3") { $microtime_end = (isset($GLOBALS['TYPO3_MISC']['microtime_end'])) ? $GLOBALS['TYPO3_MISC']['microtime_end'] : NULL; $microtime_BE_USER_start = (isset($GLOBALS['TYPO3_MISC']['microtime_BE_USER_start'])) ? $GLOBALS['TYPO3_MISC']['microtime_BE_USER_start'] : NULL; $microtime_BE_USER_end = (isset($GLOBALS['TYPO3_MISC']['microtime_BE_USER_end'])) ? $GLOBALS['TYPO3_MISC']['microtime_BE_USER_end'] : NULL; - + $this->scriptParseTime = $GLOBALS['TT']->getMilliseconds($microtime_end) - $GLOBALS['TT']->getMilliseconds($microtime_start) - ($GLOBALS['TT']->getMilliseconds($microtime_BE_USER_end) - $GLOBALS['TT']->getMilliseconds($microtime_BE_USER_start)); } @@ -4262,15 +4262,19 @@ if (version == "n3") { /** * Logs access to deprecated TypoScript objects and properties. + * * Dumps message to the TypoScript message log (admin panel) and the TYPO3 deprecation log. + * Note: The second parameter was introduced in TYPO3 4.5 and is not available in older versions * - * @param string Message string + * @param string Deprecated object or property + * @param string Message or additional infomration * @return void * @see t3lib_div::deprecationLog(), t3lib_timeTrack::setTSlogMessage() */ - function logDeprecatedTyposcript($msg) { - $GLOBALS['TT']->setTSlogMessage($msg . ' is deprecated.', 2); - t3lib_div::deprecationLog('TypoScript ' . $msg); + function logDeprecatedTyposcript($typoScriptProperty, $explanation = '') { + $explanationText = (strlen($explanation) ? ' - ' . $explanation : ''); + $GLOBALS['TT']->setTSlogMessage($typoScriptProperty . ' is deprecated.' . $explanationText, 2); + t3lib_div::deprecationLog('TypoScript ' . $typoScriptProperty . ' is deprecated' . $explanationText); } /** -- GitLab