Bug #38838 ยป a.diff
sysext/cms/tslib/class.tslib_fe.php | ||
---|---|---|
$selectFields = array();
|
||
// saves the WHERE parts of the SQL query
|
||
$whereConditions = array();
|
||
foreach (array('starttime', 'endtime') as $field) {
|
||
// there is no need to load TCA because we need only enable columns!
|
||
if (isset($GLOBALS['TCA'][$tableName]['ctrl']['enablecolumns'][$field])) {
|
||
$timeFields[$field] = $GLOBALS['TCA'][$tableName]['ctrl']['enablecolumns'][$field];
|
||
$selectFields[$field] = 'MIN(' . $timeFields[$field] . ') AS ' . $field;
|
||
$selectFields[$field]
|
||
= 'MIN('
|
||
. 'if( ' . $timeFields[$field] . ' = 0, NULL , ' . $timeFields[$field] . ' )'
|
||
. ') AS ' . $field;
|
||
$whereConditions[$field] = $timeFields[$field] . '>' . $now;
|
||
}
|
||
}
|
||
// if starttime or endtime are defined, evaluate them
|
||
if (count($timeFields)) {
|
||
// find the timestamp, when the current page's content changes the next time
|
||
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
|