[TASK] Use t3lib_BEfunc instead of date()
authorGeorg Ringer <mail@ringerge.org>
Fri, 13 Jan 2012 11:48:03 +0000 (12:48 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 17 Jan 2012 08:43:28 +0000 (09:43 +0100)
use t3lib_BEfunc::date and ::datetime() instead
of native date().

Change-Id: Ie8679c345efabd5415f2f9bde1e6f9f4f31239ce
Resolves: #23055
Releases: 4.7
Reviewed-on: http://review.typo3.org/7780
Reviewed-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Dominik Mathern
Tested-by: Dominik Mathern
typo3/class.file_list.inc
typo3/sysext/beuser/mod/index.php
typo3/sysext/em/classes/index.php
typo3/sysext/recycler/classes/view/class.tx_recycler_view_deletedRecords.php

index 97a3ff4..3c1b7b1 100644 (file)
@@ -317,13 +317,13 @@ class fileList extends t3lib_recordList {
                                                                $theData[$field] = (($theFile['readable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', TRUE) . '</strong></span>') . (($theFile['writable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', TRUE) . '</strong></span>');
                                                        break;
                                                        case 'fileext':
-                                                               $theData[$field]=strtoupper($theFile['fileext']);
+                                                               $theData[$field] = strtoupper($theFile['fileext']);
                                                        break;
                                                        case 'tstamp':
-                                                               $theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile['tstamp']);
+                                                               $theData[$field] = t3lib_BEfunc::date($theFile['tstamp']);
                                                        break;
                                                        case 'file':
-                                                               $theData[$field]= $this->linkWrapDir($title,$path);
+                                                               $theData[$field] = $this->linkWrapDir($title,$path);
                                                        break;
                                                        case '_CLIPBOARD_':
                                                                $temp = '';
@@ -460,10 +460,10 @@ class fileList extends t3lib_recordList {
                                                                $theData[$field] = (($theFile['readable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', TRUE) . '</strong></span>') . (($theFile['writable']) ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', TRUE) . '</strong></span>');
                                                        break;
                                                        case 'fileext':
-                                                               $theData[$field]=strtoupper($theFile[$field]);
+                                                               $theData[$field] = strtoupper($theFile[$field]);
                                                        break;
                                                        case 'tstamp':
-                                                               $theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile[$field]);
+                                                               $theData[$field] = t3lib_BEfunc::date($theFile[$field]);
                                                        break;
                                                        case '_CLIPBOARD_':
                                                                $temp = '';
index 0e02878..2cdf635 100755 (executable)
@@ -1561,7 +1561,7 @@ class SC_mod_tools_be_user_index {
                                $outTable .= '
                                        <tr class="bgColor4" height="17" valign="top">' .
                                                '<td nowrap="nowrap">' .
-                                                       date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $session['ses_tstamp']) .
+                                                       t3lib_BEfunc::datetime($session['ses_tstamp']) .
                                                '</td>' .
                                                '<td nowrap="nowrap">' .
                                                        '<span'.$hostName.'>'.$ip.'</span>' .
index 92fc52f..7f4029f 100644 (file)
@@ -818,13 +818,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                        <input type="submit" value="' . $GLOBALS['LANG']->getLL('retrieve_update') .
                                                '" onclick="' . htmlspecialchars($onCLick) . '" />';
                                if (is_file(PATH_site . 'typo3temp/extensions.xml.gz')) {
-                                       $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
-                                       $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
                                        $content .= ' ' . sprintf($GLOBALS['LANG']->getLL('ext_list_last_updated') . ' ',
-                                               date(
-                                                       $dateFormat . ', ' . $timeFormat,
-                                                       filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
-                                               ),
+                                               t3lib_BEfunc::datetime(filemtime(PATH_site . 'typo3temp/extensions.xml.gz')),
                                                tx_em_Database::getExtensionCountFromRepository()
                                        );
                                }
@@ -2464,13 +2459,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                        . '&nbsp;<label for="checkDisplayFiles">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_files') . '</label>';
                        $this->content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_upd_ext'), $content, 0, 1);
 
-                       $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
-                       $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
                        $content = sprintf($GLOBALS['LANG']->getLL('note_last_update_new'),
-                               date(
-                                       $dateFormat . ', ' . $timeFormat,
-                                       filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
-                               )
+                               t3lib_BEfunc::datetime(filemtime(PATH_site . 'typo3temp/extensions.xml.gz'))
                        ) . '<br />';
                }
 
@@ -2507,16 +2497,10 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                        <input type="button" value="' . $GLOBALS['LANG']->getLL('retrieve_update') .
                                '" onclick="' . htmlspecialchars($onCLick) . '" />';
                if (is_file($repoUtility->getLocalExtListFile())) {
-                       $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
-                       $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
-
                        $count = tx_em_Database::getExtensionCountFromRepository($repoUtility->getRepositoryUID());
                        $content .= '<span style="margin-left:10px;padding-right: 50px;" class="typo3-message message-notice">' .
                                        sprintf($GLOBALS['LANG']->getLL('ext_list_last_updated'),
-                                               date(
-                                                       $dateFormat . ', ' . $timeFormat,
-                                                       filemtime($repoUtility->getLocalExtListFile())
-                                               ), $count) . '</span>';
+                                               t3lib_BEfunc::datetime(filemtime($repoUtility->getLocalExtListFile())), $count) . '</span>';
                } else {
                        $content .= '<span style="margin-left:10px;padding-right: 50px;" class="typo3-message message-error">There are no extensions available, please update!</span>';
                }
index 52dc165..cd193cd 100644 (file)
@@ -59,8 +59,8 @@ class tx_recycler_view_deletedRecords {
                                                'uid'   => $row['uid'],
                                                'pid'   => $row['pid'],
                                                'table' => $table,
-                                               'crdate' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
-                                               'tstamp' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
+                                               'crdate' => t3lib_BEfunc::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
+                                               'tstamp' => t3lib_BEfunc::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
                                                'owner' => htmlspecialchars($backendUser['username']),
                                                'owner_uid' => $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']],
                                                'tableTitle' => tx_recycler_helper::getUtf8String(