Fixed #11430: Performance improvement: use $GLOBALS['EXEC_TIME'] instead of time...
authorRupert Germann <rupi@gmx.li>
Wed, 5 Aug 2009 10:05:29 +0000 (10:05 +0000)
committerRupert Germann <rupi@gmx.li>
Wed, 5 Aug 2009 10:05:29 +0000 (10:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5761 709f56b5-9817-0410-a4d7-c38de5d9e867

41 files changed:
ChangeLog
t3lib/cache/backend/class.t3lib_cache_backend_dbbackend.php
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_beuserauth.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_iconworks.php
t3lib/class.t3lib_modsettings.php
t3lib/class.t3lib_stdgraphic.php
t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_userauth.php
t3lib/class.t3lib_userauthgroup.php
typo3/alt_doc.php
typo3/alt_shortcut.php
typo3/class.show_rechis.inc
typo3/classes/class.shortcutmenu.php
typo3/logomenu.php
typo3/mod/tools/em/class.em_unzip.php
typo3/sysext/belog/class.tx_belog_webinfo.php
typo3/sysext/belog/mod/index.php
typo3/sysext/beuser/mod/index.php
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_fetce.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php
typo3/sysext/cms/tslib/hooks/class.tx_cms_treelistcacheupdate.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo_lang.php
typo3/sysext/feedit/view/class.tx_feedit_editpanel.php
typo3/sysext/impexp/class.tx_impexp.php
typo3/sysext/indexed_search/class.crawler.php
typo3/sysext/indexed_search/class.indexer.php
typo3/sysext/indexed_search/modfunc2/class.tx_indexedsearch_modfunc2.php
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/lowlevel/clmods/class.syslog.php
typo3/sysext/rsaauth/sv1/storage/class.tx_rsaauth_split_storage.php
typo3/sysext/simulatestatic/class.tx_simulatestatic.php
typo3/wizard_rte.php

index abef50a..0f9b253 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-31  Rupert Germann  <rupi@gmx.li>
+
+       * Fixed #11430: Performance improvement: use $GLOBALS['EXEC_TIME'] instead of time() where it makes sense (Thanks to Niels Pardon)
+
 2009-08-04  Michael Stucki  <michael@typo3.org>
 
        * Follow-up to bug #11410: Non-functional code cleanup
 2009-08-04  Michael Stucki  <michael@typo3.org>
 
        * Follow-up to bug #11410: Non-functional code cleanup
index 2cc2674..7d79195 100644 (file)
@@ -71,7 +71,7 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
                        $this->cacheTable,
                        array(
                                'identifier' => $entryIdentifier,
                        $this->cacheTable,
                        array(
                                'identifier' => $entryIdentifier,
-                               'crdate'     => time(),
+                               'crdate'     => $GLOBALS['EXEC_TIME'],
                                'content'    => $data,
                                'tags'       => implode(',', $tags),
                                'lifetime'   => $lifetime
                                'content'    => $data,
                                'tags'       => implode(',', $tags),
                                'lifetime'   => $lifetime
@@ -93,7 +93,7 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
                        'content',
                        $this->cacheTable,
                        'identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable) . ' '
                        'content',
                        $this->cacheTable,
                        'identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable) . ' '
-                               . 'AND (crdate + lifetime >= ' . time() . ' OR lifetime = 0)'
+                               . 'AND (crdate + lifetime >= ' . $GLOBALS['EXEC_TIME'] . ' OR lifetime = 0)'
                );
 
                if (count($cacheEntries) == 1) {
                );
 
                if (count($cacheEntries) == 1) {
@@ -117,7 +117,7 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
                        'content',
                        $this->cacheTable,
                        'identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable) . ' '
                        'content',
                        $this->cacheTable,
                        'identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable) . ' '
-                               . 'AND crdate + lifetime >= ' . time()
+                               . 'AND crdate + lifetime >= ' . $GLOBALS['EXEC_TIME']
                );
 
                if (count($cacheEntries) == 1) {
                );
 
                if (count($cacheEntries) == 1) {
@@ -163,7 +163,7 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
                $cacheEntryIdentifierRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        'identifier',
                        $this->cacheTable,
                $cacheEntryIdentifierRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        'identifier',
                        $this->cacheTable,
-                       $this->getListQueryForTag($tag) . ' AND (crdate + lifetime >= ' . time() . ' OR lifetime = 0)'
+                       $this->getListQueryForTag($tag) . ' AND (crdate + lifetime >= ' . $GLOBALS['EXEC_TIME'] . ' OR lifetime = 0)'
                );
 
                foreach ($cacheEntryIdentifierRows as $cacheEntryIdentifierRow) {
                );
 
                foreach ($cacheEntryIdentifierRows as $cacheEntryIdentifierRow) {
@@ -188,7 +188,7 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
                foreach ($tags as $tag) {
                        $whereClause[] = $this->getListQueryForTag($tag);
                }
                foreach ($tags as $tag) {
                        $whereClause[] = $this->getListQueryForTag($tag);
                }
-               $whereClause[] = '(crdate + lifetime >= ' . time() . ' OR lifetime = 0)';
+               $whereClause[] = '(crdate + lifetime >= ' . $GLOBALS['EXEC_TIME'] . ' OR lifetime = 0)';
 
                $cacheEntryIdentifierRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        'identifier',
 
                $cacheEntryIdentifierRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        'identifier',
@@ -253,7 +253,7 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
        public function collectGarbage() {
                $GLOBALS['TYPO3_DB']->exec_DELETEquery(
                        $this->cacheTable,
        public function collectGarbage() {
                $GLOBALS['TYPO3_DB']->exec_DELETEquery(
                        $this->cacheTable,
-                       'crdate + lifetime < ' . time() . ' AND lifetime > 0'
+                       'crdate + lifetime < ' . $GLOBALS['EXEC_TIME'] . ' AND lifetime > 0'
                );
        }
 
                );
        }
 
index 8efb583..a5905f9 100644 (file)
@@ -1659,8 +1659,9 @@ final class t3lib_BEfunc {
         */
        public static function dateTimeAge($tstamp, $prefix = 1, $date = '') {
                return $tstamp ?
         */
        public static function dateTimeAge($tstamp, $prefix = 1, $date = '') {
                return $tstamp ?
-                               ($date=='date' ? t3lib_BEfunc::date($tstamp) : t3lib_BEfunc::datetime($tstamp)).
-                               ' ('.t3lib_BEfunc::calcAge($prefix*(time()-$tstamp), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')).')' : '';
+                               ($date=='date' ? t3lib_BEfunc::date($tstamp) : t3lib_BEfunc::datetime($tstamp)) .
+                               ' (' . t3lib_BEfunc::calcAge($prefix * ($GLOBALS['EXEC_TIME'] - $tstamp), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')'
+                               : '';
        }
 
        /**
        }
 
        /**
@@ -2209,7 +2210,11 @@ final class t3lib_BEfunc {
                                case 'input':
                                        if ($value) {
                                                if (t3lib_div::inList($theColConf['eval'], 'date')) {
                                case 'input':
                                        if ($value) {
                                                if (t3lib_div::inList($theColConf['eval'], 'date')) {
-                                                       $l = t3lib_BEfunc::date($value).' ('.(time()-$value>0?'-':'').t3lib_BEfunc::calcAge(abs(time()-$value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')).')';
+                                                       $l = t3lib_BEfunc::date($value) .
+                                                               ' (' .
+                                                               ($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') .
+                                                               t3lib_BEfunc::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) .
+                                                               ')';
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'time')) {
                                                        $l = t3lib_BEfunc::time($value, FALSE);
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'timesec')) {
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'time')) {
                                                        $l = t3lib_BEfunc::time($value, FALSE);
                                                } elseif (t3lib_div::inList($theColConf['eval'], 'timesec')) {
@@ -2943,8 +2948,8 @@ final class t3lib_BEfunc {
        public static function compilePreviewKeyword($getVarsStr, $beUserUid, $ttl = 172800, $fullWorkspace = NULL) {
                $field_array = array(
                        'keyword' => md5(uniqid(microtime())),
        public static function compilePreviewKeyword($getVarsStr, $beUserUid, $ttl = 172800, $fullWorkspace = NULL) {
                $field_array = array(
                        'keyword' => md5(uniqid(microtime())),
-                       'tstamp' => time(),
-                       'endtime' => time()+$ttl,
+                       'tstamp' => $GLOBALS['EXEC_TIME'],
+                       'endtime' => $GLOBALS['EXEC_TIME'] + $ttl,
                        'config' => serialize(array(
                                'fullWorkspace' => $fullWorkspace,
                                'getVars' => $getVarsStr,
                        'config' => serialize(array(
                                'fullWorkspace' => $fullWorkspace,
                                'getVars' => $getVarsStr,
@@ -4196,10 +4201,10 @@ final class t3lib_BEfunc {
                if ($pageinfo['fe_group']>0) {
                        $simUser = '&ADMCMD_simUser='.$pageinfo['fe_group'];
                }
                if ($pageinfo['fe_group']>0) {
                        $simUser = '&ADMCMD_simUser='.$pageinfo['fe_group'];
                }
-               if ($pageinfo['starttime']>time()) {
+               if ($pageinfo['starttime'] > $GLOBALS['EXEC_TIME']) {
                        $simTime = '&ADMCMD_simTime='.$pageinfo['starttime'];
                }
                        $simTime = '&ADMCMD_simTime='.$pageinfo['starttime'];
                }
-               if ($pageinfo['endtime']<time() && $pageinfo['endtime']!=0) {
+               if ($pageinfo['endtime'] < $GLOBALS['EXEC_TIME'] && $pageinfo['endtime'] != 0) {
                        $simTime = '&ADMCMD_simTime='.($pageinfo['endtime']-1);
                }
                return $simUser.$simTime;
                        $simTime = '&ADMCMD_simTime='.($pageinfo['endtime']-1);
                }
                return $simUser.$simTime;
index a15ee0f..b54d1d4 100644 (file)
@@ -163,7 +163,7 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
                if ($flag && t3lib_extMgm::isLoaded('beuser_tracking')) {
                        $insertFields = array(
                                'userid' => intval($this->user['uid']),
                if ($flag && t3lib_extMgm::isLoaded('beuser_tracking')) {
                        $insertFields = array(
                                'userid' => intval($this->user['uid']),
-                               'tstamp' => time(),
+                               'tstamp' => $GLOBALS['EXEC_TIME'],
                                'script' => t3lib_div::getIndpEnv('REQUEST_URI')
                        );
 
                                'script' => t3lib_div::getIndpEnv('REQUEST_URI')
                        );
 
index bea4dec..3733769 100644 (file)
@@ -5218,7 +5218,7 @@ final class t3lib_div {
                        if (!$count) {
                                $insertFields = array(
                                        'md5hash' => $md5,
                        if (!$count) {
                                $insertFields = array(
                                        'md5hash' => $md5,
-                                       'tstamp' => time(),
+                                       'tstamp' => $GLOBALS['EXEC_TIME'],
                                        'type' => 2,
                                        'params' => $inUrl
                                );
                                        'type' => 2,
                                        'params' => $inUrl
                                );
index c921520..4417db1 100644 (file)
@@ -187,11 +187,15 @@ final class t3lib_iconWorks       {
                                // If "hidden" is enabled:
                        if ($enCols['disabled'])        { if ($row[$enCols['disabled']]) { $hidden = TRUE; }}
                                // If a "starttime" is set and higher than current time:
                                // If "hidden" is enabled:
                        if ($enCols['disabled'])        { if ($row[$enCols['disabled']]) { $hidden = TRUE; }}
                                // If a "starttime" is set and higher than current time:
-                       if ($enCols['starttime'])       { if (time() < intval($row[$enCols['starttime']]))      { $timing = TRUE; }}
+                       if ($enCols['starttime']) {
+                               if ($GLOBALS['EXEC_TIME'] < intval($row[$enCols['starttime']])) {
+                                       $timing = TRUE;
+                               }
+                       }
                                // If an "endtime" is set:
                        if ($enCols['endtime']) {
                                if (intval($row[$enCols['endtime']]) > 0) {
                                // If an "endtime" is set:
                        if ($enCols['endtime']) {
                                if (intval($row[$enCols['endtime']]) > 0) {
-                                       if (intval($row[$enCols['endtime']]) < time()) {
+                                       if (intval($row[$enCols['endtime']]) < $GLOBALS['EXEC_TIME']) {
                                                $timing = TRUE; // End-timing applies at this point.
                                        } else {
                                                $futuretiming = TRUE;           // End-timing WILL apply in the future for this element.
                                                $timing = TRUE; // End-timing applies at this point.
                                        } else {
                                                $futuretiming = TRUE;           // End-timing WILL apply in the future for this element.
index 1ab2e15..028aff8 100644 (file)
  *                                     'desc' => 'descritpion text, not mandatory',
  *                                     'data' => array(),      // data from MOD_SETTINGS
  *                                     'user' => NULL, // can be used for extra data used by the application to identify this entry
  *                                     'desc' => 'descritpion text, not mandatory',
  *                                     'data' => array(),      // data from MOD_SETTINGS
  *                                     'user' => NULL, // can be used for extra data used by the application to identify this entry
- *                                     'tstamp' => 12345, // time()
+ *                                     'tstamp' => 12345, // $GLOBALS['EXEC_TIME']
  *                             ),
  *                     'another id' => ...
  *
  *                             ),
  *                     'another id' => ...
  *
@@ -325,7 +325,7 @@ class t3lib_modSettings {
                                                'desc' => (string)$data['desc'],
                                                'data' => $storageData,
                                                'user' => NULL,
                                                'desc' => (string)$data['desc'],
                                                'data' => $storageData,
                                                'user' => NULL,
-                                               'tstamp' => time(),
+                                               'tstamp' => $GLOBALS['EXEC_TIME'],
                                        );
                $storageArr = $this->processEntry($storageArr);
 
                                        );
                $storageArr = $this->processEntry($storageArr);
 
index eb1c7ef..dc4472f 100644 (file)
@@ -2403,7 +2403,7 @@ class t3lib_stdGraphic    {
                        $fieldArr = array (
                                'md5hash' => $md5Hash,
                                'md5filename' => md5($identifyResult[3]),
                        $fieldArr = array (
                                'md5hash' => $md5Hash,
                                'md5filename' => md5($identifyResult[3]),
-                               'tstamp' => time(),
+                               'tstamp' => $GLOBALS['EXEC_TIME'],
                                'filename' => $identifyResult[3],
                                'imagewidth' => $identifyResult[0],
                                'imageheight' => $identifyResult[1],
                                'filename' => $identifyResult[3],
                                'imagewidth' => $identifyResult[0],
                                'imageheight' => $identifyResult[1],
@@ -2565,7 +2565,11 @@ class t3lib_stdGraphic   {
                                return 1;
                        } else {        // If not, we look up in the cache_typo3temp_log table to see if there is a image being rendered right now.
                                $md5Hash=md5($output);
                                return 1;
                        } else {        // If not, we look up in the cache_typo3temp_log table to see if there is a image being rendered right now.
                                $md5Hash=md5($output);
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('md5hash', 'cache_typo3temp_log', 'md5hash='.$GLOBALS['TYPO3_DB']->fullQuoteStr($md5Hash, 'cache_typo3temp_log').' AND tstamp>'.(time()-30));
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                                       'md5hash',
+                                       'cache_typo3temp_log',
+                                       'md5hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($md5Hash, 'cache_typo3temp_log') . ' AND tstamp>' . ($GLOBALS['EXEC_TIME'] - 30)
+                               );
                                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {       // If there was a record, the image is being generated by another proces (we assume)
                                        if (is_object($GLOBALS['TSFE']))        $GLOBALS['TSFE']->set_no_cache();       // ...so we set no_cache, because we dont want this page (which will NOT display an image...!) to be cached! (Only a page with the correct image on...)
                                        if (is_object($GLOBALS['TT']))  $GLOBALS['TT']->setTSlogMessage('typo3temp_log: Assume this file is being rendered now: '.$output);
                                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {       // If there was a record, the image is being generated by another proces (we assume)
                                        if (is_object($GLOBALS['TSFE']))        $GLOBALS['TSFE']->set_no_cache();       // ...so we set no_cache, because we dont want this page (which will NOT display an image...!) to be cached! (Only a page with the correct image on...)
                                        if (is_object($GLOBALS['TT']))  $GLOBALS['TT']->setTSlogMessage('typo3temp_log: Assume this file is being rendered now: '.$output);
@@ -2574,7 +2578,7 @@ class t3lib_stdGraphic    {
 
                                        $insertFields = array(
                                                'md5hash' => $md5Hash,
 
                                        $insertFields = array(
                                                'md5hash' => $md5Hash,
-                                               'tstamp' => time(),
+                                               'tstamp' => $GLOBALS['EXEC_TIME'],
                                                'filename' => $output,
                                                'orig_filename' => $orig
                                        );
                                                'filename' => $output,
                                                'orig_filename' => $orig
                                        );
index 4509573..54e0dec 100644 (file)
@@ -1067,7 +1067,7 @@ class t3lib_superadmin {
                $query = $GLOBALS['TYPO3_DB']->SELECTquery(
                                                'sys_log.*, be_users.username  AS username, be_users.admin AS admin',
                                                'sys_log,be_users',
                $query = $GLOBALS['TYPO3_DB']->SELECTquery(
                                                'sys_log.*, be_users.username  AS username, be_users.admin AS admin',
                                                'sys_log,be_users',
-                                               'be_users.uid=sys_log.userid AND sys_log.type=255 AND sys_log.tstamp > '.(time()-(60*60*24*30)),
+                                               'be_users.uid=sys_log.userid AND sys_log.type=255 AND sys_log.tstamp > ' . ($GLOBALS['EXEC_TIME'] - (60 * 60 * 24 * 30)),
                                                '',
                                                'sys_log.tstamp DESC'
                                        );
                                                '',
                                                'sys_log.tstamp DESC'
                                        );
@@ -1173,7 +1173,7 @@ class t3lib_superadmin {
                                                        <b>'.htmlspecialchars($label).'</b> ('.htmlspecialchars(substr($all['siteInfo']['SA_PATH'],strlen($all['siteInfo']['MAIN_DIR'])+1)).')<br />';
 
                                                                // To avoid "visited links" display on next hit:
                                                        <b>'.htmlspecialchars($label).'</b> ('.htmlspecialchars(substr($all['siteInfo']['SA_PATH'],strlen($all['siteInfo']['MAIN_DIR'])+1)).')<br />';
 
                                                                // To avoid "visited links" display on next hit:
-                                                       $tempVal='&_someUniqueValue='.time();
+                                                       $tempVal='&_someUniqueValue=' . $GLOBALS['EXEC_TIME'];
 
                                                                // Add links for update:
                                                        $url = $this->scriptName.'?type=page&show=rmTempCached&exp='.$k.$tempVal;
 
                                                                // Add links for update:
                                                        $url = $this->scriptName.'?type=page&show=rmTempCached&exp='.$k.$tempVal;
index 575cc39..4a8d22e 100644 (file)
@@ -1109,7 +1109,7 @@ class t3lib_TCEforms      {
                        if (in_array('date',$evalList)) {
                                $checkSetValue = $thisMidnight;
                        } elseif (in_array('datetime',$evalList))       {
                        if (in_array('date',$evalList)) {
                                $checkSetValue = $thisMidnight;
                        } elseif (in_array('datetime',$evalList))       {
-                               $checkSetValue = time();
+                               $checkSetValue = $GLOBALS['EXEC_TIME'];
                        } elseif (in_array('year',$evalList))   {
                                $checkSetValue = gmdate('Y');
                        }
                        } elseif (in_array('year',$evalList))   {
                                $checkSetValue = gmdate('Y');
                        }
@@ -2864,7 +2864,9 @@ class t3lib_TCEforms      {
                                        $value = '';
                                }
                                if ($config['format.']['appendAge'])    {
                                        $value = '';
                                }
                                if ($config['format.']['appendAge'])    {
-                                       $value .= ' ('.t3lib_BEfunc::calcAge((time()-$itemValue), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')).')';
+                                       $value .= ' (' .
+                                               t3lib_BEfunc::calcAge(($GLOBALS['EXEC_TIME'] - $itemValue), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) .
+                                               ')';
                                }
                                $itemValue = $value;
                                break;
                                }
                                $itemValue = $value;
                                break;
@@ -5093,7 +5095,7 @@ class t3lib_TCEforms      {
         *
         *              Example use:
         *
         *
         *              Example use:
         *
-        *              $msg.='Distribution time (hh:mm dd-mm-yy):<br /><input type="text" name="send_mail_datetime_hr" onchange="typo3form.fieldGet(\'send_mail_datetime\', \'datetime\', \'\', 0,0);"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' /><input type="hidden" value="'.time().'" name="send_mail_datetime" /><br />';
+        *              $msg .= 'Distribution time (hh:mm dd-mm-yy):<br /><input type="text" name="send_mail_datetime_hr" onchange="typo3form.fieldGet(\'send_mail_datetime\', \'datetime\', \'\', 0,0);"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' /><input type="hidden" value="' . $GLOBALS['EXEC_TIME'] . '" name="send_mail_datetime" /><br />';
         *              $this->extJSCODE.='typo3form.fieldSet("send_mail_datetime", "datetime", "", 0,0);';
         *
         *              ... and then include the result of this function after the form
         *              $this->extJSCODE.='typo3form.fieldSet("send_mail_datetime", "datetime", "", 0,0);';
         *
         *              ... and then include the result of this function after the form
index 27ccf9c..3e16fc5 100644 (file)
@@ -836,8 +836,10 @@ class t3lib_TCEmain        {
                                                                // Setting system fields
                                                        if ($status=='new')     {
                                                                if ($TCA[$table]['ctrl']['crdate'])     {
                                                                // Setting system fields
                                                        if ($status=='new')     {
                                                                if ($TCA[$table]['ctrl']['crdate'])     {
-                                                                       $fieldArray[$TCA[$table]['ctrl']['crdate']]=time();
-                                                                       if ($createNewVersion)  $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['crdate']]=time();
+                                                                       $fieldArray[$TCA[$table]['ctrl']['crdate']] = $GLOBALS['EXEC_TIME'];
+                                                                       if ($createNewVersion) {
+                                                                               $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['crdate']] = $GLOBALS['EXEC_TIME'];
+                                                                       }
                                                                }
                                                                if ($TCA[$table]['ctrl']['cruser_id'])  {
                                                                        $fieldArray[$TCA[$table]['ctrl']['cruser_id']]=$this->userid;
                                                                }
                                                                if ($TCA[$table]['ctrl']['cruser_id'])  {
                                                                        $fieldArray[$TCA[$table]['ctrl']['cruser_id']]=$this->userid;
@@ -847,8 +849,10 @@ class t3lib_TCEmain        {
                                                                $fieldArray = $this->compareFieldArrayWithCurrentAndUnset($table,$id,$fieldArray);
                                                        }
                                                        if ($TCA[$table]['ctrl']['tstamp'] && count($fieldArray))       {
                                                                $fieldArray = $this->compareFieldArrayWithCurrentAndUnset($table,$id,$fieldArray);
                                                        }
                                                        if ($TCA[$table]['ctrl']['tstamp'] && count($fieldArray))       {
-                                                               $fieldArray[$TCA[$table]['ctrl']['tstamp']]=time();
-                                                               if ($createNewVersion)  $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['tstamp']]=time();
+                                                               $fieldArray[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
+                                                               if ($createNewVersion) {
+                                                                       $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
+                                                               }
                                                        }
                                                        if ($resetRejected)     {
                                                                $fieldArray['t3ver_stage'] = 0;
                                                        }
                                                        if ($resetRejected)     {
                                                                $fieldArray['t3ver_stage'] = 0;
@@ -3023,13 +3027,13 @@ class t3lib_TCEmain     {
 
                        // System fields being set:
                if ($TCA[$table]['ctrl']['crdate'])     {
 
                        // System fields being set:
                if ($TCA[$table]['ctrl']['crdate'])     {
-                       $fieldArray[$TCA[$table]['ctrl']['crdate']]=time();
+                       $fieldArray[$TCA[$table]['ctrl']['crdate']] = $GLOBALS['EXEC_TIME'];
                }
                if ($TCA[$table]['ctrl']['cruser_id'])  {
                        $fieldArray[$TCA[$table]['ctrl']['cruser_id']]=$this->userid;
                }
                if ($TCA[$table]['ctrl']['tstamp'])     {
                }
                if ($TCA[$table]['ctrl']['cruser_id'])  {
                        $fieldArray[$TCA[$table]['ctrl']['cruser_id']]=$this->userid;
                }
                if ($TCA[$table]['ctrl']['tstamp'])     {
-                       $fieldArray[$TCA[$table]['ctrl']['tstamp']]=time();
+                       $fieldArray[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                }
 
                        // Finally, insert record:
                }
 
                        // Finally, insert record:
@@ -3488,13 +3492,13 @@ class t3lib_TCEmain     {
                                // First, we create a placeholder record in the Live workspace that represents the position to where the record is eventually moved to.
                        $newVersion_placeholderFieldArray = array();
                        if ($TCA[$table]['ctrl']['crdate'])     {
                                // First, we create a placeholder record in the Live workspace that represents the position to where the record is eventually moved to.
                        $newVersion_placeholderFieldArray = array();
                        if ($TCA[$table]['ctrl']['crdate'])     {
-                               $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['crdate']] = time();
+                               $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['crdate']] = $GLOBALS['EXEC_TIME'];
                        }
                        if ($TCA[$table]['ctrl']['cruser_id'])  {
                                $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['cruser_id']] = $this->userid;
                        }
                        if ($TCA[$table]['ctrl']['tstamp'] && count($fieldArray))       {
                        }
                        if ($TCA[$table]['ctrl']['cruser_id'])  {
                                $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['cruser_id']] = $this->userid;
                        }
                        if ($TCA[$table]['ctrl']['tstamp'] && count($fieldArray))       {
-                               $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['tstamp']] = time();
+                               $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                        }
 
                        if ($table == 'pages') {
                        }
 
                        if ($table == 'pages') {
@@ -3565,7 +3569,7 @@ class t3lib_TCEmain       {
                        // Timestamp field:
                $updateFields = array();
                if ($TCA[$table]['ctrl']['tstamp'])     {
                        // Timestamp field:
                $updateFields = array();
                if ($TCA[$table]['ctrl']['tstamp'])     {
-                       $updateFields[$TCA[$table]['ctrl']['tstamp']] = time();
+                       $updateFields[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                }
 
                if ($destPid>=0)        {       // insert as first element on page (where uid = $destPid)
                }
 
                if ($destPid>=0)        {       // insert as first element on page (where uid = $destPid)
@@ -4083,7 +4087,7 @@ class t3lib_TCEmain       {
                                                );
 
                                                if ($TCA[$table]['ctrl']['tstamp']) {
                                                );
 
                                                if ($TCA[$table]['ctrl']['tstamp']) {
-                                                       $updateFields[$TCA[$table]['ctrl']['tstamp']] = time();
+                                                       $updateFields[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                                                }
 
                                                        // If the table is sorted, then the sorting number is set very high
                                                }
 
                                                        // If the table is sorted, then the sorting number is set very high
@@ -4585,7 +4589,7 @@ class t3lib_TCEmain       {
 
                                                                                        // Write lock-file:
                                                                                t3lib_div::writeFileToTypo3tempDir($lockFileName,serialize(array(
 
                                                                                        // Write lock-file:
                                                                                t3lib_div::writeFileToTypo3tempDir($lockFileName,serialize(array(
-                                                                                       'tstamp'=>time(),
+                                                                                       'tstamp' => $GLOBALS['EXEC_TIME'],
                                                                                        'user'=>$GLOBALS['BE_USER']->user['username'],
                                                                                        'curVersion'=>$curVersion,
                                                                                        'swapVersion'=>$swapVersion
                                                                                        'user'=>$GLOBALS['BE_USER']->user['username'],
                                                                                        'curVersion'=>$curVersion,
                                                                                        'swapVersion'=>$swapVersion
@@ -4614,7 +4618,7 @@ class t3lib_TCEmain       {
                                                                                $swapVersion['pid'] = intval($curVersion['pid']);       // Set pid for ONLINE
                                                                                $swapVersion['t3ver_oid'] = 0;  // We clear this because t3ver_oid only make sense for offline versions and we want to prevent unintentional misuse of this value for online records.
                                                                                $swapVersion['t3ver_wsid'] = $swapIntoWS ? ($t3ver_state['swapVersion']>0 ? $this->BE_USER->workspace : intval($curVersion['t3ver_wsid'])) : 0; // In case of swapping and the offline record has a state (like 2 or 4 for deleting or move-pointer) we set the current workspace ID so the record is not deselected in the interface by t3lib_BEfunc::versioningPlaceholderClause()
                                                                                $swapVersion['pid'] = intval($curVersion['pid']);       // Set pid for ONLINE
                                                                                $swapVersion['t3ver_oid'] = 0;  // We clear this because t3ver_oid only make sense for offline versions and we want to prevent unintentional misuse of this value for online records.
                                                                                $swapVersion['t3ver_wsid'] = $swapIntoWS ? ($t3ver_state['swapVersion']>0 ? $this->BE_USER->workspace : intval($curVersion['t3ver_wsid'])) : 0; // In case of swapping and the offline record has a state (like 2 or 4 for deleting or move-pointer) we set the current workspace ID so the record is not deselected in the interface by t3lib_BEfunc::versioningPlaceholderClause()
-                                                                               $swapVersion['t3ver_tstamp'] = time();
+                                                                               $swapVersion['t3ver_tstamp'] = $GLOBALS['EXEC_TIME'];
                                                                                $swapVersion['t3ver_stage'] = 0;
                                                                                if (!$swapIntoWS)       $swapVersion['t3ver_state'] = 0;
 
                                                                                $swapVersion['t3ver_stage'] = 0;
                                                                                if (!$swapIntoWS)       $swapVersion['t3ver_state'] = 0;
 
@@ -4650,7 +4654,7 @@ class t3lib_TCEmain       {
                                                                                $curVersion['pid'] = -1;        // Set pid for OFFLINE
                                                                                $curVersion['t3ver_oid'] = intval($id);
                                                                                $curVersion['t3ver_wsid'] = $swapIntoWS ? intval($tmp_wsid) : 0;
                                                                                $curVersion['pid'] = -1;        // Set pid for OFFLINE
                                                                                $curVersion['t3ver_oid'] = intval($id);
                                                                                $curVersion['t3ver_wsid'] = $swapIntoWS ? intval($tmp_wsid) : 0;
-                                                                               $curVersion['t3ver_tstamp'] = time();
+                                                                               $curVersion['t3ver_tstamp'] = $GLOBALS['EXEC_TIME'];
                                                                                $curVersion['t3ver_count'] = $curVersion['t3ver_count']+1;      // Increment lifecycle counter
                                                                                $curVersion['t3ver_stage'] = 0;
                                                                                if (!$swapIntoWS)       $curVersion['t3ver_state'] = 0;
                                                                                $curVersion['t3ver_count'] = $curVersion['t3ver_count']+1;      // Increment lifecycle counter
                                                                                $curVersion['t3ver_stage'] = 0;
                                                                                if (!$swapIntoWS)       $curVersion['t3ver_state'] = 0;
@@ -6015,7 +6019,7 @@ $this->log($table,$id,6,0,0,'Stage raised...',30,array('comment'=>$comment,'stag
                        $fields_values = array();
                        $fields_values['history_data'] = serialize($this->historyRecords[$table.':'.$id]);
                        $fields_values['fieldlist'] = implode(',',array_keys($this->historyRecords[$table.':'.$id]['newRecord']));
                        $fields_values = array();
                        $fields_values['history_data'] = serialize($this->historyRecords[$table.':'.$id]);
                        $fields_values['fieldlist'] = implode(',',array_keys($this->historyRecords[$table.':'.$id]['newRecord']));
-                       $fields_values['tstamp'] = time();
+                       $fields_values['tstamp'] = $GLOBALS['EXEC_TIME'];
                        $fields_values['tablename'] = $table;
                        $fields_values['recuid'] = $id;
                        $fields_values['sys_log_uid'] = $logId;
                        $fields_values['tablename'] = $table;
                        $fields_values['recuid'] = $id;
                        $fields_values['sys_log_uid'] = $logId;
@@ -6032,7 +6036,7 @@ $this->log($table,$id,6,0,0,'Stage raised...',30,array('comment'=>$comment,'stag
         * @return      void
         */
        function clearHistory($maxAgeSeconds=604800,$table)     {
         * @return      void
         */
        function clearHistory($maxAgeSeconds=604800,$table)     {
-               $tstampLimit = $maxAgeSeconds ? time()-$maxAgeSeconds : 0;
+               $tstampLimit = $maxAgeSeconds ? $GLOBALS['EXEC_TIME'] - $maxAgeSeconds : 0;
 
                $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_history', 'tstamp<'.intval($tstampLimit).' AND tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_history'));
                }
 
                $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_history', 'tstamp<'.intval($tstampLimit).' AND tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_history'));
                }
index 0ce0616..12a7ae8 100644 (file)
@@ -303,9 +303,9 @@ class t3lib_userAuth {
                if ($this->isRefreshTimeBasedCookie())  {
                        if (!$this->dontSetCookie)      {
                                if ($cookieDomain)      {
                if ($this->isRefreshTimeBasedCookie())  {
                        if (!$this->dontSetCookie)      {
                                if ($cookieDomain)      {
-                                       SetCookie($this->name, $id, time()+$this->lifetime, '/', $cookieDomain);
+                                       SetCookie($this->name, $id, $GLOBALS['EXEC_TIME'] + $this->lifetime, '/', $cookieDomain);
                                } else {
                                } else {
-                                       SetCookie($this->name, $id, time()+$this->lifetime, t3lib_div::getIndpEnv('TYPO3_SITE_PATH'));
+                                       SetCookie($this->name, $id, $GLOBALS['EXEC_TIME'] + $this->lifetime, t3lib_div::getIndpEnv('TYPO3_SITE_PATH'));
                                }
                                if ($this->writeDevLog)         t3lib_div::devLog('Update Cookie: '.$id.($cookieDomain ? ', '.$cookieDomain : ''), 't3lib_userAuth');
                        }
                                }
                                if ($this->writeDevLog)         t3lib_div::devLog('Update Cookie: '.$id.($cookieDomain ? ', '.$cookieDomain : ''), 't3lib_userAuth');
                        }
@@ -829,8 +829,8 @@ class t3lib_userAuth {
                return  (($this->enablecolumns['rootLevel']) ? 'AND '.$this->user_table.'.pid=0 ' : '').
                                (($this->enablecolumns['disabled']) ? ' AND '.$this->user_table.'.'.$this->enablecolumns['disabled'].'=0' : '').
                                (($this->enablecolumns['deleted']) ? ' AND '.$this->user_table.'.'.$this->enablecolumns['deleted'].'=0' : '').
                return  (($this->enablecolumns['rootLevel']) ? 'AND '.$this->user_table.'.pid=0 ' : '').
                                (($this->enablecolumns['disabled']) ? ' AND '.$this->user_table.'.'.$this->enablecolumns['disabled'].'=0' : '').
                                (($this->enablecolumns['deleted']) ? ' AND '.$this->user_table.'.'.$this->enablecolumns['deleted'].'=0' : '').
-                               (($this->enablecolumns['starttime']) ? ' AND ('.$this->user_table.'.'.$this->enablecolumns['starttime'].'<='.time().')' : '').
-                               (($this->enablecolumns['endtime']) ? ' AND ('.$this->user_table.'.'.$this->enablecolumns['endtime'].'=0 OR '.$this->user_table.'.'.$this->enablecolumns['endtime'].'>'.time().')' : '');
+                               (($this->enablecolumns['starttime']) ? ' AND (' . $this->user_table . '.' . $this->enablecolumns['starttime'] . '<=' . $GLOBALS['EXEC_TIME'] . ')' : '') .
+                               (($this->enablecolumns['endtime']) ? ' AND (' . $this->user_table . '.' . $this->enablecolumns['endtime'] . '=0 OR ' . $this->user_table . '.' . $this->enablecolumns['endtime'] . '>' . $GLOBALS['EXEC_TIME'] . ')' : '');
        }
 
        /**
        }
 
        /**
@@ -1165,8 +1165,8 @@ class t3lib_userAuth {
        function gc() {
                $GLOBALS['TYPO3_DB']->exec_DELETEquery(
                                        $this->session_table,
        function gc() {
                $GLOBALS['TYPO3_DB']->exec_DELETEquery(
                                        $this->session_table,
-                                       'ses_tstamp < '.intval(time()-($this->gc_time)).'
-                                               AND ses_name = '.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table)
+                                       'ses_tstamp < ' . intval($GLOBALS['EXEC_TIME'] - ($this->gc_time)) .
+                                               ' AND ses_name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table)
                                );
        }
 
                                );
        }
 
index 18f4a0a..87b9419 100644 (file)
@@ -1699,7 +1699,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                if ($email)     {
 
                                // get last flag set in the log for sending
                if ($email)     {
 
                                // get last flag set in the log for sending
-                       $theTimeBack = time()-$secondsBack;
+                       $theTimeBack = $GLOBALS['EXEC_TIME'] - $secondsBack;
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                                        'tstamp',
                                                        'sys_log',
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                                        'tstamp',
                                                        'sys_log',
index 86a34a3..3f4d327 100644 (file)
@@ -862,8 +862,12 @@ class SC_alt_doc {
                                if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes))     {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
                                        $buttons['undo'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes))     {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
                                        $buttons['undo'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/undo.gif','width="21" height="16"').' class="c-inputButton" title="'.htmlspecialchars(sprintf($LANG->getLL('undoLastChange'),t3lib_BEfunc::calcAge(time()-$undoButtonR['tstamp'],$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))).'" alt="" />'.
-                                                       '</a>';
+                                               '<img' .
+                                                       t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/undo.gif', 'width="21" height="16"') .
+                                                       ' class="c-inputButton"' .
+                                                       ' title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) .
+                                                       '" alt="" />' .
+                                               '</a>';
                                }
                                if ($this->getNewIconMode($this->firstEl['table'],'showHistory'))       {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
                                }
                                if ($this->getNewIconMode($this->firstEl['table'],'showHistory'))       {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
index 19f81c2..d982deb 100644 (file)
@@ -194,7 +194,7 @@ class SC_alt_shortcut {
                                'module_name' => $this->modName.'|'.$this->M_modName,
                                'url' => $this->URL,
                                'description' => $description,
                                'module_name' => $this->modName.'|'.$this->M_modName,
                                'url' => $this->URL,
                                'description' => $description,
-                               'sorting' => time(),
+                               'sorting' => $GLOBALS['EXEC_TIME'],
                        );
                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_be_shortcuts', $fields_values);
                }
                        );
                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_be_shortcuts', $fields_values);
                }
index eafa03a..390f6a8 100644 (file)
@@ -368,7 +368,7 @@ class recordHistory {
                $tmpTsConfig = $GLOBALS['BE_USER']->getTSConfig('TCEMAIN',t3lib_BEfunc::getPagesTSconfig($pid));
                $expirationTime = isset($tmpTsConfig['properties']['default.']['history.']['maxAgeDays']) ? $tmpTsConfig['properties']['default.']['history.']['maxAgeDays'] : 30;
 
                $tmpTsConfig = $GLOBALS['BE_USER']->getTSConfig('TCEMAIN',t3lib_BEfunc::getPagesTSconfig($pid));
                $expirationTime = isset($tmpTsConfig['properties']['default.']['history.']['maxAgeDays']) ? $tmpTsConfig['properties']['default.']['history.']['maxAgeDays'] : 30;
 
-               $expirationTimestamp = $expirationTime ? (time() - 60*60*24*$expirationTime) : 0;
+               $expirationTimestamp = $expirationTime ? ($GLOBALS['EXEC_TIME'] - 60 * 60 * 24 * $expirationTime) : 0;
                $expirationWarning = 0;
 
                $be_user_array = t3lib_BEfunc::getUserNames();
                $expirationWarning = 0;
 
                $be_user_array = t3lib_BEfunc::getUserNames();
@@ -410,7 +410,7 @@ class recordHistory {
                        $singleLine[] = '<span>'.$this->linkPage($image,array('diff' => $sysLogUid)).'</span>'; // remove first link
 
                        $singleLine[] = htmlspecialchars(t3lib_BEfunc::datetime($entry['tstamp']));     // add time
                        $singleLine[] = '<span>'.$this->linkPage($image,array('diff' => $sysLogUid)).'</span>'; // remove first link
 
                        $singleLine[] = htmlspecialchars(t3lib_BEfunc::datetime($entry['tstamp']));     // add time
-                       $singleLine[] = htmlspecialchars(t3lib_BEfunc::calcAge(time()-$entry['tstamp'],$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')));  // add age
+                       $singleLine[] = htmlspecialchars(t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $entry['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')));        // add age
                        $singleLine[] = htmlspecialchars($userName);    // add user name
                        $singleLine[] = $this->linkPage($this->generateTitle($entry['tablename'],$entry['recuid']),array('element' => $entry['tablename'].':'.$entry['recuid']),'',$LANG->getLL('linkRecordHistory',1));        // add record UID
 
                        $singleLine[] = htmlspecialchars($userName);    // add user name
                        $singleLine[] = $this->linkPage($this->generateTitle($entry['tablename'],$entry['recuid']),array('element' => $entry['tablename'].':'.$entry['recuid']),'',$LANG->getLL('linkRecordHistory',1));        // add record UID
 
index 79aca31..ab0dd44 100644 (file)
@@ -547,7 +547,7 @@ class ShortcutMenu implements backend_toolbarItem {
                                'module_name' => $module.'|'.$motherModule,
                                'url'         => $url,
                                'description' => $shortcutName,
                                'module_name' => $module.'|'.$motherModule,
                                'url'         => $url,
                                'description' => $shortcutName,
-                               'sorting'     => time(),
+                               'sorting'     => $GLOBALS['EXEC_TIME'],
                        );
                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_be_shortcuts', $fieldValues);
 
                        );
                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_be_shortcuts', $fieldValues);
 
index c73224f..00f36ad 100644 (file)
@@ -160,7 +160,7 @@ class SC_logomenu extends t3lib_topmenubase {
                                        $elRow = t3lib_BEfunc::getRecord($row['tablename'],$row['recuid']);
                                        if (is_array($elRow))   {
                                                $items[] = array(
                                        $elRow = t3lib_BEfunc::getRecord($row['tablename'],$row['recuid']);
                                        if (is_array($elRow))   {
                                                $items[] = array(
-                                                       'title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'],$elRow),$GLOBALS['BE_USER']->uc['titleLen']).' - '.t3lib_BEfunc::calcAge(time()-$row['tstamp_MAX']),
+                                                       'title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']),
                                                        'icon' => array(t3lib_iconworks::getIcon($row['tablename'],$elRow),'width="18" height="16"'),
                                                        'onclick' => 'content.'.t3lib_BEfunc::editOnClick('&edit['.$row['tablename'].']['.$row['recuid'].']=edit','','dummy.php')
                                                );
                                                        'icon' => array(t3lib_iconworks::getIcon($row['tablename'],$elRow),'width="18" height="16"'),
                                                        'onclick' => 'content.'.t3lib_BEfunc::editOnClick('&edit['.$row['tablename'].']['.$row['recuid'].']=edit','','dummy.php')
                                                );
index 7ffa7af..48eb0f3 100644 (file)
@@ -799,7 +799,7 @@ class em_unzip {
                        $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
 
                } else {
                        $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
 
                } else {
-                       $p_header['mtime'] = time();
+                       $p_header['mtime'] = $GLOBALS['EXEC_TIME'];
                }
 
                // Other informations
                }
 
                // Other informations
@@ -895,7 +895,7 @@ class em_unzip {
                        $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
 
                } else {
                        $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
 
                } else {
-                       $p_header['mtime'] = time();
+                       $p_header['mtime'] = $GLOBALS['EXEC_TIME'];
                }
 
                // Set the stored filename
                }
 
                // Set the stored filename
index 36ad723..99a4d30 100755 (executable)
@@ -169,7 +169,7 @@ class tx_belog_webinfo extends t3lib_extobjbase {
 
                        // Time:
                $starttime=0;
 
                        // Time:
                $starttime=0;
-               $endtime=time();
+               $endtime = $GLOBALS['EXEC_TIME'];
                switch($this->pObj->MOD_SETTINGS['log_time'])           {
                        case 0:
                                // This week
                switch($this->pObj->MOD_SETTINGS['log_time'])           {
                        case 0:
                                // This week
index 2c38efe..61100ae 100755 (executable)
@@ -260,14 +260,16 @@ class SC_mod_tools_log_index {
 
 
                $starttime=0;
 
 
                $starttime=0;
-               $endtime=time();
+               $endtime = $GLOBALS['EXEC_TIME'];
 
                // Time:
                if ($this->theTime)     {
                        $starttime = $this->theTime;
                        if ($this->theTime_end) {
                                $endtime = $this->theTime_end;
 
                // Time:
                if ($this->theTime)     {
                        $starttime = $this->theTime;
                        if ($this->theTime_end) {
                                $endtime = $this->theTime_end;
-                       } else $endtime = time();
+                       } else {
+                               $endtime = $GLOBALS['EXEC_TIME'];
+                       }
                } else {
                        switch($this->MOD_SETTINGS['time'])             {
                                case 0:
                } else {
                        switch($this->MOD_SETTINGS['time'])             {
                                case 0:
index b5c6209..cf84e6f 100755 (executable)
@@ -1396,7 +1396,9 @@ class SC_mod_tools_be_user_index {
 
                                foreach ($dat['users'] as $uDat) {
                                        $uItem = '<tr><td width="130">' . t3lib_iconWorks::getIconImage('be_users',$uDat,$GLOBALS['BACK_PATH'],'align="top" title="' . $uDat['uid'] . '"') . $this->linkUser($uDat['username'],$uDat) . '&nbsp;&nbsp;</td><td nowrap="nowrap">' . $this->elementLinks('be_users',$uDat);
 
                                foreach ($dat['users'] as $uDat) {
                                        $uItem = '<tr><td width="130">' . t3lib_iconWorks::getIconImage('be_users',$uDat,$GLOBALS['BACK_PATH'],'align="top" title="' . $uDat['uid'] . '"') . $this->linkUser($uDat['username'],$uDat) . '&nbsp;&nbsp;</td><td nowrap="nowrap">' . $this->elementLinks('be_users',$uDat);
-                                       if ($curUid != $uDat['uid'] && !$uDat['disable'] && ($uDat['starttime'] == 0 || $uDat['starttime'] < time()) && ($uDat['endtime'] == 0 || $uDat['endtime'] > time()))   {
+                                       if ($curUid != $uDat['uid'] && !$uDat['disable'] && ($uDat['starttime'] == 0 ||
+                                               $uDat['starttime'] < $GLOBALS['EXEC_TIME']) && ($uDat['endtime'] == 0 ||
+                                               $uDat['endtime'] > $GLOBALS['EXEC_TIME'])) {
                                                $uItem .= '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'])) . '" target="_top"><img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/su.gif') . ' border="0" align="top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('changeToMode', true) . '" alt="" /></a>'.
                                                        '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'], 'switchBackUser' => 1)) . '" target="_top"><img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/su_back.gif') . ' border="0" align="top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('switchBackMode', true) . '" alt="" /></a>';
                                        }
                                                $uItem .= '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'])) . '" target="_top"><img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/su.gif') . ' border="0" align="top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('changeToMode', true) . '" alt="" /></a>'.
                                                        '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'], 'switchBackUser' => 1)) . '" target="_top"><img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/su_back.gif') . ' border="0" align="top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('switchBackMode', true) . '" alt="" /></a>';
                                        }
index beae2bc..f06e267 100755 (executable)
@@ -2164,7 +2164,7 @@ class tx_cms_layout extends recordList {
                $theData['subject'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['subject']),25).'&nbsp; &nbsp;';
                $theData['author'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['author']),15).'&nbsp; &nbsp;';
                $theData['date'] = t3lib_div::fixed_lgd_cs(t3lib_BEfunc::datetime($row['crdate']),20).'&nbsp; &nbsp;';
                $theData['subject'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['subject']),25).'&nbsp; &nbsp;';
                $theData['author'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['author']),15).'&nbsp; &nbsp;';
                $theData['date'] = t3lib_div::fixed_lgd_cs(t3lib_BEfunc::datetime($row['crdate']),20).'&nbsp; &nbsp;';
-               $theData['age'] = t3lib_BEfunc::calcAge(time()-$row['crdate'], $this->agePrefixes).'&nbsp; &nbsp;';
+               $theData['age'] = t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['crdate'], $this->agePrefixes) . '&nbsp; &nbsp;';
                if ($re)        {
                        $theData['replys'] = $re;
                }
                if ($re)        {
                        $theData['replys'] = $re;
                }
@@ -2284,8 +2284,8 @@ class tx_cms_layout extends recordList {
                global $TCA;
                if (
                        ($TCA[$table]['ctrl']['enablecolumns']['disabled'] && $row[$TCA[$table]['ctrl']['enablecolumns']['disabled']]) ||
                global $TCA;
                if (
                        ($TCA[$table]['ctrl']['enablecolumns']['disabled'] && $row[$TCA[$table]['ctrl']['enablecolumns']['disabled']]) ||
-                       ($TCA[$table]['ctrl']['enablecolumns']['starttime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['starttime']]>time() ) ||
-                       ($TCA[$table]['ctrl']['enablecolumns']['endtime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']]<time())
+                       ($TCA[$table]['ctrl']['enablecolumns']['starttime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['starttime']] > $GLOBALS['EXEC_TIME']) ||
+                       ($TCA[$table]['ctrl']['enablecolumns']['endtime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME'])
                )       return true;
        }
 
                )       return true;
        }
 
@@ -2460,14 +2460,23 @@ class tx_cms_layout extends recordList {
                }
 
                        // Created:
                }
 
                        // Created:
-               $lines[]=array($LANG->getLL('pI_crDate').':', t3lib_BEfunc::datetime($rec['crdate']).' ('.t3lib_BEfunc::calcAge(time()-$rec['crdate'],$this->agePrefixes).')');
+               $lines[] = array(
+                       $LANG->getLL('pI_crDate') . ':',
+                       t3lib_BEfunc::datetime($rec['crdate']) . ' (' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $rec['crdate'], $this->agePrefixes) . ')',
+               );
 
                        // Last change:
 
                        // Last change:
-               $lines[]=array($LANG->getLL('pI_lastChange').':', t3lib_BEfunc::datetime($rec['tstamp']).' ('.t3lib_BEfunc::calcAge(time()-$rec['tstamp'],$this->agePrefixes).')');
+               $lines[] = array(
+                       $LANG->getLL('pI_lastChange') . ':',
+                       t3lib_BEfunc::datetime($rec['tstamp']) . ' (' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $rec['tstamp'],$this->agePrefixes) . ')',
+               );
 
                        // Last change of content:
                if ($rec['SYS_LASTCHANGED'])    {
 
                        // Last change of content:
                if ($rec['SYS_LASTCHANGED'])    {
-                       $lines[]=array($LANG->getLL('pI_lastChangeContent').':', t3lib_BEfunc::datetime($rec['SYS_LASTCHANGED']).' ('.t3lib_BEfunc::calcAge(time()-$rec['SYS_LASTCHANGED'],$this->agePrefixes).')');
+                       $lines[] = array(
+                               $LANG->getLL('pI_lastChangeContent') . ':',
+                               t3lib_BEfunc::datetime($rec['SYS_LASTCHANGED']) . ' (' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $rec['SYS_LASTCHANGED'], $this->agePrefixes) . ')',
+                       );
                }
 
                        // Spacer:
                }
 
                        // Spacer:
index d15c289..d91a33c 100755 (executable)
@@ -1226,7 +1226,11 @@ class SC_db_layout {
                                if($this->undoButton) {
                                                // Undo button
                                        $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode($this->eRParts[0] . ':' . $this->eRParts[1]) . '&revert=ALL_FIELDS&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;') . '">' .
                                if($this->undoButton) {
                                                // Undo button
                                        $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode($this->eRParts[0] . ':' . $this->eRParts[1]) . '&revert=ALL_FIELDS&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;') . '">' .
-                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/undo.gif', 'width="21" height="16"') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_BEfunc::calcAge(time() - $this->undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' .
+                                               '<img' .
+                                                       t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/undo.gif', 'width="21" height="16"') .
+                                                       ' class="c-inputButton"' .
+                                                       ' title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $this->undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) .
+                                                       '" alt="" />' .
                                                '</a>';
 
                                                // History button
                                                '</a>';
 
                                                // History button
index 9428382..217247d 100644 (file)
@@ -3399,8 +3399,9 @@ class tslib_cObj {
                                                $content = $GLOBALS['TSFE']->csConv($content,$tmp_charset);
                                        }
                                }
                                                $content = $GLOBALS['TSFE']->csConv($content,$tmp_charset);
                                        }
                                }
-                               if ($conf['age']){$content=$this->calcAge(time()-$content,$conf['age']);}
-
+                               if ($conf['age']) {
+                                       $content = $this->calcAge($GLOBALS['EXEC_TIME'] - $content, $conf['age']);
+                               }
                                if ($conf['case']){$content=$this->HTMLcaseshift($content, $conf['case']);}
                                if ($conf['bytes']){$content=t3lib_div::formatSize($content, $conf['bytes.']['labels']);}
                                if ($conf['substring']){$content=$this->substring($content,$conf['substring']);}
                                if ($conf['case']){$content=$this->HTMLcaseshift($content, $conf['case']);}
                                if ($conf['bytes']){$content=t3lib_div::formatSize($content, $conf['bytes.']['labels']);}
                                if ($conf['substring']){$content=$this->substring($content,$conf['substring']);}
@@ -5095,7 +5096,7 @@ class tslib_cObj {
                                        break;
                                        case 'date':
                                                if (!$key) {$key = 'd/m Y';}
                                        break;
                                        case 'date':
                                                if (!$key) {$key = 'd/m Y';}
-                                               $retVal = date($key, time());
+                                               $retVal = date($key, $GLOBALS['EXEC_TIME']);
                                        break;
                                        case 'page':
                                                $retVal = $GLOBALS['TSFE']->page[$key];
                                        break;
                                        case 'page':
                                                $retVal = $GLOBALS['TSFE']->page[$key];
@@ -6604,7 +6605,7 @@ class tslib_cObj {
                        }
 
                        if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'])  {
                        }
 
                        if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'])  {
-                               $updateFields[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = time();
+                               $updateFields[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                        }
 
                        if (count($updateFields))       {
                        }
 
                        if (count($updateFields))       {
@@ -6633,8 +6634,16 @@ class tslib_cObj {
         */
        function DBgetInsert($table, $pid, $dataArr, $fieldList, $doExec=FALSE) {
                $extraList='pid';
         */
        function DBgetInsert($table, $pid, $dataArr, $fieldList, $doExec=FALSE) {
                $extraList='pid';
-               if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'])  {$field=$GLOBALS['TCA'][$table]['ctrl']['tstamp']; $dataArr[$field]=time(); $extraList.=','.$field;}
-               if ($GLOBALS['TCA'][$table]['ctrl']['crdate'])  {$field=$GLOBALS['TCA'][$table]['ctrl']['crdate']; $dataArr[$field]=time(); $extraList.=','.$field;}
+               if ($GLOBALS['TCA'][$table]['ctrl']['tstamp']) {
+                       $field = $GLOBALS['TCA'][$table]['ctrl']['tstamp'];
+                       $dataArr[$field] = $GLOBALS['EXEC_TIME'];
+                       $extraList .= ',' . $field;
+               }
+               if ($GLOBALS['TCA'][$table]['ctrl']['crdate']) {
+                       $field=$GLOBALS['TCA'][$table]['ctrl']['crdate'];
+                       $dataArr[$field] = $GLOBALS['EXEC_TIME'];
+                       $extraList .= ',' . $field;
+               }
                if ($GLOBALS['TCA'][$table]['ctrl']['cruser_id'])       {$field=$GLOBALS['TCA'][$table]['ctrl']['cruser_id']; $dataArr[$field]=0; $extraList.=','.$field;}
                if ($GLOBALS['TCA'][$table]['ctrl']['fe_cruser_id'])    {$field=$GLOBALS['TCA'][$table]['ctrl']['fe_cruser_id']; $dataArr[$field]=intval($GLOBALS['TSFE']->fe_user->user['uid']); $extraList.=','.$field;}
                if ($GLOBALS['TCA'][$table]['ctrl']['fe_crgroup_id'])   {$field=$GLOBALS['TCA'][$table]['ctrl']['fe_crgroup_id']; list($dataArr[$field])=explode(',',$GLOBALS['TSFE']->fe_user->user['usergroup']); $dataArr[$field]=intval($dataArr[$field]); $extraList.=','.$field;}
                if ($GLOBALS['TCA'][$table]['ctrl']['cruser_id'])       {$field=$GLOBALS['TCA'][$table]['ctrl']['cruser_id']; $dataArr[$field]=0; $extraList.=','.$field;}
                if ($GLOBALS['TCA'][$table]['ctrl']['fe_cruser_id'])    {$field=$GLOBALS['TCA'][$table]['ctrl']['fe_cruser_id']; $dataArr[$field]=intval($GLOBALS['TSFE']->fe_user->user['uid']); $extraList.=','.$field;}
                if ($GLOBALS['TCA'][$table]['ctrl']['fe_crgroup_id'])   {$field=$GLOBALS['TCA'][$table]['ctrl']['fe_crgroup_id']; list($dataArr[$field])=explode(',',$GLOBALS['TSFE']->fe_user->user['usergroup']); $dataArr[$field]=intval($dataArr[$field]); $extraList.=','.$field;}
@@ -6811,7 +6820,7 @@ class tslib_cObj {
                                $cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                        'treelist',
                                        'cache_treelist',
                                $cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                        'treelist',
                                        'cache_treelist',
-                                       'md5hash = \'' . $requestHash . '\' AND ( expires > ' . time() . ' OR expires = 0 )'
+                                       'md5hash = \'' . $requestHash . '\' AND ( expires > ' . $GLOBALS['EXEC_TIME'] . ' OR expires = 0 )'
                                );
 
                                if (!empty($cacheEntry[0]['treelist'])) {
                                );
 
                                if (!empty($cacheEntry[0]['treelist'])) {
@@ -6938,7 +6947,7 @@ class tslib_cObj {
                                        'md5hash'  => $requestHash,
                                        'pid'      => $id,
                                        'treelist' => $theList,
                                        'md5hash'  => $requestHash,
                                        'pid'      => $id,
                                        'treelist' => $theList,
-                                       'tstamp'   => time()
+                                       'tstamp'   => $GLOBALS['EXEC_TIME'],
                                )
                        );
                }
                                )
                        );
                }
@@ -7415,8 +7424,8 @@ class tslib_cObj {
                if (
                        ($TCA[$table]['ctrl']['enablecolumns']['disabled'] && $row[$TCA[$table]['ctrl']['enablecolumns']['disabled']]) ||
                        ($TCA[$table]['ctrl']['enablecolumns']['fe_group'] && $GLOBALS['TSFE']->simUserGroup && $row[$TCA[$table]['ctrl']['enablecolumns']['fe_group']]==$GLOBALS['TSFE']->simUserGroup) ||
                if (
                        ($TCA[$table]['ctrl']['enablecolumns']['disabled'] && $row[$TCA[$table]['ctrl']['enablecolumns']['disabled']]) ||
                        ($TCA[$table]['ctrl']['enablecolumns']['fe_group'] && $GLOBALS['TSFE']->simUserGroup && $row[$TCA[$table]['ctrl']['enablecolumns']['fe_group']]==$GLOBALS['TSFE']->simUserGroup) ||
-                       ($TCA[$table]['ctrl']['enablecolumns']['starttime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['starttime']]>time() ) ||
-                       ($TCA[$table]['ctrl']['enablecolumns']['endtime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']]<time())
+                       ($TCA[$table]['ctrl']['enablecolumns']['starttime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['starttime']] > $GLOBALS['EXEC_TIME']) ||
+                       ($TCA[$table]['ctrl']['enablecolumns']['endtime'] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']] && $row[$TCA[$table]['ctrl']['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME'])
                )       return true;
        }
 }
                )       return true;
        }
 }
index ccdbaa3..64a65ff 100644 (file)
                                '*',
                                'sys_preview',
                                'keyword='.$GLOBALS['TYPO3_DB']->fullQuoteStr($inputCode, 'sys_preview').
                                '*',
                                'sys_preview',
                                'keyword='.$GLOBALS['TYPO3_DB']->fullQuoteStr($inputCode, 'sys_preview').
-                                       ' AND endtime>'.time()
+                                       ' AND endtime>' . $GLOBALS['EXEC_TIME']
                        );
 
                                // Get: Backend login status, Frontend login status
                        );
 
                                // Get: Backend login status, Frontend login status
@@ -4095,7 +4095,10 @@ if (version == "n3") {
         * @access private
         */
        function updateMD5paramsRecord($hash)   {
         * @access private
         */
        function updateMD5paramsRecord($hash)   {
-               $GLOBALS['TYPO3_DB']->exec_UPDATEquery('cache_md5params', 'md5hash='.$GLOBALS['TYPO3_DB']->fullQuoteStr($hash, 'cache_md5params'), array('tstamp' => time()));
+               $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
+                       'cache_md5params',
+                       'md5hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($hash, 'cache_md5params'), array('tstamp' => $GLOBALS['EXEC_TIME'])
+               );
        }
 
        /**
        }
 
        /**
index e27cbea..3744dc4 100644 (file)
@@ -233,8 +233,16 @@ class tslib_feTCE  {
         */
        function execNEWinsert($table, $dataArr)        {
                $extraList=$this->extraList;
         */
        function execNEWinsert($table, $dataArr)        {
                $extraList=$this->extraList;
-               if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'])  {$field=$GLOBALS['TCA'][$table]['ctrl']['tstamp']; $dataArr[$field]=time(); $extraList.=','.$field;}
-               if ($GLOBALS['TCA'][$table]['ctrl']['crdate'])  {$field=$GLOBALS['TCA'][$table]['ctrl']['crdate']; $dataArr[$field]=time(); $extraList.=','.$field;}
+               if ($GLOBALS['TCA'][$table]['ctrl']['tstamp']) {
+                       $field = $GLOBALS['TCA'][$table]['ctrl']['tstamp'];
+                       $dataArr[$field] = $GLOBALS['EXEC_TIME'];
+                       $extraList .= ',' . $field;
+               }
+               if ($GLOBALS['TCA'][$table]['ctrl']['crdate']) {
+                       $field = $GLOBALS['TCA'][$table]['ctrl']['crdate'];
+                       $dataArr[$field] = $GLOBALS['EXEC_TIME'];
+                       $extraList .= ',' . $field;
+               }
                if ($GLOBALS['TCA'][$table]['ctrl']['cruser_id'])       {$field=$GLOBALS['TCA'][$table]['ctrl']['cruser_id']; $dataArr[$field]=0; $extraList.=','.$field;}
 
                unset($dataArr['uid']); // uid can never be set
                if ($GLOBALS['TCA'][$table]['ctrl']['cruser_id'])       {$field=$GLOBALS['TCA'][$table]['ctrl']['cruser_id']; $dataArr[$field]=0; $extraList.=','.$field;}
 
                unset($dataArr['uid']); // uid can never be set
index 29c59ae..bd1b6b6 100644 (file)
@@ -397,7 +397,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                                $insertFields = array (
                                        'hash' => $this->id,
                                        'content' => serialize($this->sesData),
                                $insertFields = array (
                                        'hash' => $this->id,
                                        'content' => serialize($this->sesData),
-                                       'tstamp' => time()
+                                       'tstamp' => $GLOBALS['EXEC_TIME'],
                                );
                                $this->removeSessionData();
                                $GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_session_data', $insertFields);
                                );
                                $this->removeSessionData();
                                $GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_session_data', $insertFields);
index 34cf73c..1876ede 100644 (file)
@@ -370,7 +370,7 @@ class tx_cms_treelistCacheUpdate {
        protected function removeExpiredCacheEntries() {
                $GLOBALS['TYPO3_DB']->exec_DELETEquery(
                        'cache_treelist',
        protected function removeExpiredCacheEntries() {
                $GLOBALS['TYPO3_DB']->exec_DELETEquery(
                        'cache_treelist',
-                       'expires <= ' . time()
+                       'expires <= ' . $GLOBALS['EXEC_TIME']
                );
        }
 
                );
        }
 
index 9aae031..c41cd9a 100644 (file)
@@ -386,8 +386,8 @@ class tx_cms_webinfo_lang extends t3lib_extobjbase {
                if (is_array($row))     {
                        $row['_COUNT'] = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                        $row['_HIDDEN'] = $row['hidden'] ||
                if (is_array($row))     {
                        $row['_COUNT'] = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                        $row['_HIDDEN'] = $row['hidden'] ||
-                                                       (intval($row['endtime']) > 0 && intval($row['endtime']) < time()) ||
-                                                       (time() < intval($row['starttime']));
+                                                       (intval($row['endtime']) > 0 && intval($row['endtime']) < $GLOBALS['EXEC_TIME']) ||
+                                                       ($GLOBALS['EXEC_TIME'] < intval($row['starttime']));
                }
 
                return $row;
                }
 
                return $row;
index 5fbf2f8..c292a6c 100644 (file)
@@ -333,8 +333,8 @@ class tx_feedit_editpanel {
        protected function isDisabled($table, $row) {
                if (($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']]) ||
                        ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group'] && $GLOBALS['TSFE']->simUserGroup && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group']] == $GLOBALS['TSFE']->simUserGroup) ||
        protected function isDisabled($table, $row) {
                if (($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']]) ||
                        ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group'] && $GLOBALS['TSFE']->simUserGroup && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group']] == $GLOBALS['TSFE']->simUserGroup) ||
-                       ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime']] > time() ) ||
-                       ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] < time())) {
+                       ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime']] > $GLOBALS['EXEC_TIME']) ||
+                       ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME'])) {
                        return true;
                }
        }
                        return true;
                }
        }
index 389a0f1..cdca673 100755 (executable)
@@ -335,8 +335,7 @@ class tx_impexp {
                        'packager_name' => $packager_name,
                        'packager_email' => $packager_email,
                        'TYPO3_version' => TYPO3_version,
                        'packager_name' => $packager_name,
                        'packager_email' => $packager_email,
                        'TYPO3_version' => TYPO3_version,
-#                      'loaded_extensions' => $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'],
-                       'created' => strftime('%A %e. %B %Y', time())
+                       'created' => strftime('%A %e. %B %Y', $GLOBALS['EXEC_TIME']),
                );
        }
 
                );
        }
 
@@ -835,7 +834,7 @@ class tx_impexp {
                                                // This is only done with files grabbed by a softreference parser since it is deemed improbable that hard-referenced files should undergo this treatment.
                                        $html_fI = pathinfo(basename($fI['ID_absFile']));
                                        if ($this->includeExtFileResources && t3lib_div::inList($this->extFileResourceExtensions,strtolower($html_fI['extension'])))    {
                                                // This is only done with files grabbed by a softreference parser since it is deemed improbable that hard-referenced files should undergo this treatment.
                                        $html_fI = pathinfo(basename($fI['ID_absFile']));
                                        if ($this->includeExtFileResources && t3lib_div::inList($this->extFileResourceExtensions,strtolower($html_fI['extension'])))    {
-                                               $uniquePrefix = '###'.md5(time()).'###';
+                                               $uniquePrefix = '###' . md5($GLOBALS['EXEC_TIME']) . '###';
 
                                                if (strtolower($html_fI['extension'])==='css')  {
                                                        $prefixedMedias = explode($uniquePrefix, preg_replace('/(url[[:space:]]*\([[:space:]]*["\']?)([^"\')]*)(["\']?[[:space:]]*\))/i', '\1'.$uniquePrefix.'\2'.$uniquePrefix.'\3', $fileRec['content']));
 
                                                if (strtolower($html_fI['extension'])==='css')  {
                                                        $prefixedMedias = explode($uniquePrefix, preg_replace('/(url[[:space:]]*\([[:space:]]*["\']?)([^"\')]*)(["\']?[[:space:]]*\))/i', '\1'.$uniquePrefix.'\2'.$uniquePrefix.'\3', $fileRec['content']));
index 0b4d29c..8db73bf 100755 (executable)
@@ -109,8 +109,8 @@ class tx_indexedsearch_crawler {
                        '*',
                        'index_config',
                        'hidden=0
                        '*',
                        'index_config',
                        'hidden=0
-                               AND (starttime=0 OR starttime<='.time().')
-                               AND timer_next_indexing<'.time().'
+                               AND (starttime=0 OR starttime<=' . $GLOBALS['EXEC_TIME'] . ')
+                               AND timer_next_indexing<' . $GLOBALS['EXEC_TIME'] . '
                                AND set_id=0
                                '.t3lib_BEfunc::deleteClause('index_config')
                );
                                AND set_id=0
                                '.t3lib_BEfunc::deleteClause('index_config')
                );
@@ -395,7 +395,13 @@ class tx_indexedsearch_crawler {
                                                        'procInstructions' => array('[Index Cfg UID#'.$cfgRec['uid'].']'),
                                                        'depth' => $params['depth']+1
                                                );
                                                        'procInstructions' => array('[Index Cfg UID#'.$cfgRec['uid'].']'),
                                                        'depth' => $params['depth']+1
                                                );
-                                               $pObj->addQueueEntry_callBack($cfgRec['set_id'],$nparams,$this->callBack,$cfgRec['pid'],time()+$this->instanceCounter*$this->secondsPerExternalUrl);
+                                               $pObj->addQueueEntry_callBack(
+                                                       $cfgRec['set_id'],
+                                                       $nparams,
+                                                       $this->callBack,
+                                                       $cfgRec['pid'],
+                                                       $GLOBALS['EXEC_TIME'] + $this->instanceCounter * $this->secondsPerExternalUrl
+                                               );
                                        }
                                }
                        }
                                        }
                                }
                        }
@@ -439,7 +445,13 @@ class tx_indexedsearch_crawler {
                                                        'procInstructions' => array('[Index Cfg UID#'.$cfgRec['uid'].']'),
                                                        'depth' => $params['depth']+1
                                                );
                                                        'procInstructions' => array('[Index Cfg UID#'.$cfgRec['uid'].']'),
                                                        'depth' => $params['depth']+1
                                                );
-                                               $pObj->addQueueEntry_callBack($cfgRec['set_id'],$nparams,$this->callBack,$cfgRec['pid'],time()+$this->instanceCounter*$this->secondsPerExternalUrl);
+                                               $pObj->addQueueEntry_callBack(
+                                                       $cfgRec['set_id'],
+                                                       $nparams,
+                                                       $this->callBack,
+                                                       $cfgRec['pid'],
+                                                       $GLOBALS['EXEC_TIME'] + $this->instanceCounter * $this->secondsPerExternalUrl
+                                               );
                                        }
                                }
                        }
                                        }
                                }
                        }
@@ -470,7 +482,17 @@ class tx_indexedsearch_crawler {
                        // Submit URLs:
                if (count($res))        {
                        foreach($res as $paramSetKey => $vv)    {
                        // Submit URLs:
                if (count($res))        {
                        foreach($res as $paramSetKey => $vv)    {
-                               $urlList = $pObj->urlListFromUrlArray($vv,$pageRow,time(),30,1,0,$duplicateTrack,$downloadUrls,array('tx_indexedsearch_reindex'));
+                               $urlList = $pObj->urlListFromUrlArray(
+                                       $vv,
+                                       $pageRow,
+                                       $GLOBALS['EXEC_TIME'],
+                                       30,
+                                       1,
+                                       0,
+                                       $duplicateTrack,
+                                       $downloadUrls,
+                                       array('tx_indexedsearch_reindex')
+                               );
                        }
                }
 
                        }
                }
 
@@ -499,7 +521,13 @@ class tx_indexedsearch_crawler {
                                                'procInstructions' => array('[Index Cfg UID#'.$cfgRec['uid'].']'),
                                                'depth' => $params['depth']+1
                                        );
                                                'procInstructions' => array('[Index Cfg UID#'.$cfgRec['uid'].']'),
                                                'depth' => $params['depth']+1
                                        );
-                                       $pObj->addQueueEntry_callBack($cfgRec['set_id'],$nparams,$this->callBack,$cfgRec['pid'],time()+$this->instanceCounter*$this->secondsPerExternalUrl);
+                                       $pObj->addQueueEntry_callBack(
+                                               $cfgRec['set_id'],
+                                               $nparams,
+                                               $this->callBack,
+                                               $cfgRec['pid'],
+                                               $GLOBALS['EXEC_TIME'] + $this->instanceCounter * $this->secondsPerExternalUrl
+                                       );
                                }
                        }
                }
                                }
                        }
                }
@@ -731,13 +759,13 @@ class tx_indexedsearch_crawler {
         * @return      integer         The next time stamp
         */
        function generateNextIndexingTime($cfgRec)      {
         * @return      integer         The next time stamp
         */
        function generateNextIndexingTime($cfgRec)      {
-               $currentTime = time();
+               $currentTime = $GLOBALS['EXEC_TIME'];
 
                        // Now, find a midnight time to use for offset calculation. This has to differ depending on whether we have frequencies within a day or more than a day; Less than a day, we don't care which day to use for offset, more than a day we want to respect the currently entered day as offset regardless of when the script is run - thus the day-of-week used in case "Weekly" is selected will be respected
                if ($cfgRec['timer_frequency']<=24*3600)        {
                        $aMidNight = mktime (0,0,0)-1*24*3600;
                } else {
 
                        // Now, find a midnight time to use for offset calculation. This has to differ depending on whether we have frequencies within a day or more than a day; Less than a day, we don't care which day to use for offset, more than a day we want to respect the currently entered day as offset regardless of when the script is run - thus the day-of-week used in case "Weekly" is selected will be respected
                if ($cfgRec['timer_frequency']<=24*3600)        {
                        $aMidNight = mktime (0,0,0)-1*24*3600;
                } else {
-                       $lastTime = $cfgRec['timer_next_indexing']?$cfgRec['timer_next_indexing']:time();
+                       $lastTime = $cfgRec['timer_next_indexing'] ? $cfgRec['timer_next_indexing'] : $GLOBALS['EXEC_TIME'];
                        $aMidNight = mktime (0,0,0, date('m',$lastTime), date('d',$lastTime), date('y',$lastTime));
                }
 
                        $aMidNight = mktime (0,0,0, date('m',$lastTime), date('d',$lastTime), date('y',$lastTime));
                }
 
@@ -880,7 +908,7 @@ class tx_indexedsearch_crawler {
                                        '*',
                                        'index_config',
                                        'hidden=0
                                        '*',
                                        'index_config',
                                        'hidden=0
-                                               AND (starttime=0 OR starttime<='.time().')
+                                               AND (starttime=0 OR starttime<=' . $GLOBALS['EXEC_TIME'] . ')
                                                AND set_id=0
                                                AND type=1
                                                AND table2index='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'index_config').'
                                                AND set_id=0
                                                AND type=1
                                                AND table2index='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'index_config').'
index 70c6cb6..d5cfed7 100755 (executable)
@@ -1353,8 +1353,8 @@ class tx_indexedsearch_indexer {
                        'item_description' => $this->bodyDescription($this->contentParts),
                        'item_mtime' => $this->conf['mtime'],
                        'item_size' => strlen($this->conf['content']),
                        'item_description' => $this->bodyDescription($this->contentParts),
                        'item_mtime' => $this->conf['mtime'],
                        'item_size' => strlen($this->conf['content']),
-                       'tstamp' => time(),
-                       'crdate' => time(),
+                       'tstamp' => $GLOBALS['EXEC_TIME'],
+                       'crdate' => $GLOBALS['EXEC_TIME'],
                        'item_crdate' => $this->conf['crdate'], // Creation date of page
                        'sys_language_uid' => $this->conf['sys_language_uid'],  // Sys language uid of the page. Should reflect which language it DOES actually display!
                        'externalUrl' => 0,
                        'item_crdate' => $this->conf['crdate'], // Creation date of page
                        'sys_language_uid' => $this->conf['sys_language_uid'],  // Sys language uid of the page. Should reflect which language it DOES actually display!
                        'externalUrl' => 0,
@@ -1512,8 +1512,8 @@ class tx_indexedsearch_indexer {
                        'item_mtime' => $mtime,
                        'item_size' => $size,
                        'item_crdate' => $ctime,
                        'item_mtime' => $mtime,
                        'item_size' => $size,
                        'item_crdate' => $ctime,
-                       'tstamp' => time(),
-                       'crdate' => time(),
+                       'tstamp' => $GLOBALS['EXEC_TIME'],
+                       'crdate' => $GLOBALS['EXEC_TIME'],
                        'gr_list' => $this->conf['gr_list'],
                        'externalUrl' => $fileParts['scheme'] ? 1 : 0,
                        'recordUid' => intval($this->conf['recordUid']),
                        'gr_list' => $this->conf['gr_list'],
                        'externalUrl' => $fileParts['scheme'] ? 1 : 0,
                        'recordUid' => intval($this->conf['recordUid']),
@@ -1631,17 +1631,17 @@ class tx_indexedsearch_indexer {
 
                        // If there was an indexing of the page...:
                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
 
                        // If there was an indexing of the page...:
                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       if ($this->tstamp_maxAge && ($row['tstamp']+$this->tstamp_maxAge) < time())     {       // If max age is exceeded, index the page
+                       if ($this->tstamp_maxAge && ($row['tstamp'] + $this->tstamp_maxAge) < $GLOBALS['EXEC_TIME']) {  // If max age is exceeded, index the page
                                $out = 1;               // The configured max-age was exceeded for the document and thus it's indexed.
                        } else {
                                $out = 1;               // The configured max-age was exceeded for the document and thus it's indexed.
                        } else {
-                               if (!$this->tstamp_minAge || ($row['tstamp']+$this->tstamp_minAge)<time())      {       // if minAge is not set or if minAge is exceeded, consider at mtime
+                               if (!$this->tstamp_minAge || ($row['tstamp'] + $this->tstamp_minAge) < $GLOBALS['EXEC_TIME']) { // if minAge is not set or if minAge is exceeded, consider at mtime
                                        if ($mtime)     {               // It mtime is set, then it's tested. If not, the page must clearly be indexed.
                                                if ($row['item_mtime'] != $mtime)       {       // And if mtime is different from the index_phash mtime, it's about time to re-index.
                                                        $out = 2;               // The minimum age was exceed and mtime was set and the mtime was different, so the page was indexed.
                                                } else {
                                                        $out = -1;              // mtime matched the document, so no changes detected and no content updated
                                                        if ($this->tstamp_maxAge)       {
                                        if ($mtime)     {               // It mtime is set, then it's tested. If not, the page must clearly be indexed.
                                                if ($row['item_mtime'] != $mtime)       {       // And if mtime is different from the index_phash mtime, it's about time to re-index.
                                                        $out = 2;               // The minimum age was exceed and mtime was set and the mtime was different, so the page was indexed.
                                                } else {
                                                        $out = -1;              // mtime matched the document, so no changes detected and no content updated
                                                        if ($this->tstamp_maxAge)       {
-                                                               $this->log_setTSlogMessage('mtime matched, timestamp NOT updated because a maxAge is set ('.($row['tstamp'] + $this->tstamp_maxAge - time()).' seconds to expire time).',1);
+                                                               $this->log_setTSlogMessage('mtime matched, timestamp NOT updated because a maxAge is set (' . ($row['tstamp'] + $this->tstamp_maxAge - $GLOBALS['EXEC_TIME']) . ' seconds to expire time).', 1);
                                                        } else {
                                                                $this->updateTstamp($phash);    // Update the timestatmp
                                                                $this->log_setTSlogMessage('mtime matched, timestamp updated.',1);
                                                        } else {
                                                                $this->updateTstamp($phash);    // Update the timestatmp
                                                                $this->log_setTSlogMessage('mtime matched, timestamp updated.',1);
@@ -1723,7 +1723,7 @@ class tx_indexedsearch_indexer {
         */
        function updateTstamp($phash,$mtime=0)  {
                $updateFields = array(
         */
        function updateTstamp($phash,$mtime=0)  {
                $updateFields = array(
-                       'tstamp' => time()
+                       'tstamp' => $GLOBALS['EXEC_TIME']
                );
                if ($mtime)     { $updateFields['item_mtime'] = intval($mtime); }
 
                );
                if ($mtime)     { $updateFields['item_mtime'] = intval($mtime); }
 
index d9c90d5..eccbda2 100644 (file)
@@ -87,8 +87,8 @@ class tx_indexedsearch_modfunc2 extends t3lib_extobjbase {
                $conf['bid'] = intval(t3lib_div::_GET('id'));   // pageid for several statistics
 
                $addwhere1='';  // all records
                $conf['bid'] = intval(t3lib_div::_GET('id'));   // pageid for several statistics
 
                $addwhere1='';  // all records
-               $addwhere2=' AND tstamp > '.(time()-30*24*60*60);       // last 30 days
-               $addwhere3=' AND tstamp > '.(time()-24*60*60);          // last 24 hours
+               $addwhere2=' AND tstamp > ' . ($GLOBALS['EXEC_TIME'] - 30 * 24 * 60 * 60);      // last 30 days
+               $addwhere3=' AND tstamp > ' . ($GLOBALS['EXEC_TIME'] - 24 * 60 * 60);           // last 24 hours
 
                $content.= $LANG->getLL('title2').'
                        <table cellpading="5" cellspacing="5" valign="top"><tr><td valign="top">'
 
                $content.= $LANG->getLL('title2').'
                        <table cellpading="5" cellspacing="5" valign="top"><tr><td valign="top">'
index 959ecf0..b738576 100755 (executable)
@@ -1928,10 +1928,10 @@ class tx_indexedsearch extends tslib_pibase {
                                return ceil(log($total)/log($max)*100).'%';
                        break;
                        case 'crdate':  // Based on creation date
                                return ceil(log($total)/log($max)*100).'%';
                        break;
                        case 'crdate':  // Based on creation date
-                               return $this->cObj->calcAge(time()-$row['item_crdate'],0); // ,$conf['age']
+                               return $this->cObj->calcAge($GLOBALS['EXEC_TIME'] - $row['item_crdate'],0); // ,$conf['age']
                        break;
                        case 'mtime':   // Based on modification time
                        break;
                        case 'mtime':   // Based on modification time
-                               return $this->cObj->calcAge(time()-$row['item_mtime'],0); // ,$conf['age']
+                               return $this->cObj->calcAge($GLOBALS['EXEC_TIME'] - $row['item_mtime'],0); // ,$conf['age']
                        break;
                        default:        // fx. title
                                return '&nbsp;';
                        break;
                        default:        // fx. title
                                return '&nbsp;';
index 4a5198e..b664a59 100755 (executable)
@@ -1104,7 +1104,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                if (t3lib_div::testInt($tt))    {
                                                        if (filesize($theFile) > $tt*1024)      $ok=1;
                                                } else {
                                                if (t3lib_div::testInt($tt))    {
                                                        if (filesize($theFile) > $tt*1024)      $ok=1;
                                                } else {
-                                                       if (fileatime($theFile) < time()-(intval($tmap[$tt])*60*60*24)) $ok=1;
+                                                       if (fileatime($theFile) < $GLOBALS['EXEC_TIME'] - (intval($tmap[$tt]) * 60 * 60 * 24)) {
+                                                               $ok = 1;
+                                                       }
                                                }
                                        } else {
                                                $ok = 1;
                                                }
                                        } else {
                                                $ok = 1;
@@ -3672,8 +3674,8 @@ From sub-directory:
                                                                                'admin' => 1,
                                                                                'uc' => '',
                                                                                'fileoper_perms' => 0,
                                                                                'admin' => 1,
                                                                                'uc' => '',
                                                                                'fileoper_perms' => 0,
-                                                                               'tstamp' => time(),
-                                                                               'crdate' => time()
+                                                                               'tstamp' => $GLOBALS['EXEC_TIME'],
+                                                                               'crdate' => $GLOBALS['EXEC_TIME']
                                                                        );
 
                                                                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
                                                                        );
 
                                                                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
@@ -3793,8 +3795,8 @@ From sub-directory:
                                                                                'admin' => 1,
                                                                                'uc' => '',
                                                                                'fileoper_perms' => 0,
                                                                                'admin' => 1,
                                                                                'uc' => '',
                                                                                'fileoper_perms' => 0,
-                                                                               'tstamp' => time(),
-                                                                               'crdate' => time()
+                                                                               'tstamp' => $GLOBALS['EXEC_TIME'],
+                                                                               'crdate' => $GLOBALS['EXEC_TIME']
                                                                        );
 
                                                                        $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
                                                                        );
 
                                                                        $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
index dc5a4ca..4181aae 100644 (file)
@@ -94,7 +94,7 @@ Showing last 25 hour entries from the syslog. More features pending. This is the
                $rows = $TYPO3_DB->exec_SELECTgetRows(
                                '*',
                                'sys_log',
                $rows = $TYPO3_DB->exec_SELECTgetRows(
                                '*',
                                'sys_log',
-                               'tstamp>'.(time()-25*3600)
+                               'tstamp>' . ($GLOBALS['EXEC_TIME'] - 25 * 3600)
                        );
                foreach($rows as $r)    {
                        $l = unserialize($r['log_data']);
                        );
                foreach($rows as $r)    {
                        $l = unserialize($r['log_data']);
index bef2a29..0e3e595 100644 (file)
@@ -66,7 +66,7 @@ class tx_rsaauth_split_storage extends tx_rsaauth_abstract_storage {
 
                        // Remove expired keys (more than 30 minutes old)
                        $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_rsaauth_keys',
 
                        // Remove expired keys (more than 30 minutes old)
                        $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_rsaauth_keys',
-                                               'crdate<' . (time() - 30*60));
+                                               'crdate<' . ($GLOBALS['EXEC_TIME'] - 30 * 60));
 
                        // Get our value
                        list($row) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('key_value',
 
                        // Get our value
                        list($row) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('key_value',
@@ -112,7 +112,7 @@ class tx_rsaauth_split_storage extends tx_rsaauth_abstract_storage {
                        //
                        // Notice: we may not use TCEmain below to insert key part into the
                        // table because TCEmain requires a valid BE user!
                        //
                        // Notice: we may not use TCEmain below to insert key part into the
                        // table because TCEmain requires a valid BE user!
-                       $time = time();
+                       $time = $GLOBALS['EXEC_TIME'];
                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_rsaauth_keys', array(
                                'pid' => 0,
                                'crdate' => $time,
                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_rsaauth_keys', array(
                                'pid' => 0,
                                'crdate' => $time,
@@ -126,7 +126,7 @@ class tx_rsaauth_split_storage extends tx_rsaauth_abstract_storage {
 
                // Remove expired keys (more than 30 minutes old)
                $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_rsaauth_keys',
 
                // Remove expired keys (more than 30 minutes old)
                $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_rsaauth_keys',
-                                       'crdate<' . (time() - 30*60));
+                                       'crdate<' . ($GLOBALS['EXEC_TIME'] - 30 * 60));
        }
 }
 
        }
 }
 
index 5e40c6c..0a4c28c 100644 (file)
@@ -321,7 +321,7 @@ class tx_simulatestatic {
                                        if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                                $insertFields = array(
                                                        'md5hash' => $md5,
                                        if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                                $insertFields = array(
                                                        'md5hash' => $md5,
-                                                       'tstamp'  => time(),
+                                                       'tstamp'  => $GLOBALS['EXEC_TIME'],
                                                        'type'    => 1,
                                                        'params'  => $addParams
                                                );
                                                        'type'    => 1,
                                                        'params'  => $addParams
                                                );
index 910f619..4bc04be 100644 (file)
@@ -282,7 +282,7 @@ class SC_wizard_rte {
                        // Undo/Revert:
                        if ($undoButton)        {
                                $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'show_rechis.php?element=' . rawurlencode($this->P['table'] . ':' . $this->P['uid']) . '&revert=' . rawurlencode('field:' . $this->P['field']) . '&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;') . '">' .
                        // Undo/Revert:
                        if ($undoButton)        {
                                $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'show_rechis.php?element=' . rawurlencode($this->P['table'] . ':' . $this->P['uid']) . '&revert=' . rawurlencode('field:' . $this->P['field']) . '&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;') . '">' .
-                                       '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/undo.gif') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('rte_undoLastChange'), t3lib_BEfunc::calcAge(time() - $undoButtonR['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' .
+                                       '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/undo.gif') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('rte_undoLastChange'), t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' .
                                        '</a>';
                        }
 
                                        '</a>';
                        }