Feature #62445 ยป 62445.patch
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php | ||
---|---|---|
*/
|
||
public function enableFields($table, $show_hidden = FALSE, array $ignore_array = array()) {
|
||
$show_hidden = $show_hidden ?: ($table === 'pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords);
|
||
if ($GLOBALS['TSFE']->ignoreAccessTime){
|
||
$ignore_array['starttime'] = 1;
|
||
$ignore_array['endtime'] = 1;
|
||
}
|
||
return $GLOBALS['TSFE']->sys_page->enableFields($table, $show_hidden, $ignore_array);
|
||
}
|
||
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php | ||
---|---|---|
public $showHiddenRecords = FALSE;
|
||
/**
|
||
* Flag indicating that start and entime of records should be ignored. This includes
|
||
* sys_template, pages_language_overlay and even fe_groups in addition to all
|
||
* other regular content.
|
||
* @var bool
|
||
* @todo Define visibility
|
||
*/
|
||
public $ignoreAccessTime = FALSE;
|
||
/**
|
||
* Value that contains the simulated usergroup if any
|
||
* @var int
|
||
* @todo Define visibility
|
||
... | ... | |
public function clear_preview() {
|
||
$this->showHiddenPage = FALSE;
|
||
$this->showHiddenRecords = FALSE;
|
||
$this->ignoreAccessTime = FALSE;
|
||
$GLOBALS['SIM_EXEC_TIME'] = $GLOBALS['EXEC_TIME'];
|
||
$GLOBALS['SIM_ACCESS_TIME'] = $GLOBALS['ACCESS_TIME'];
|
||
$this->fePreview = 0;
|
||
... | ... | |
}
|
||
$this->showHiddenPage = (bool)$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'showHiddenPages');
|
||
$this->showHiddenRecords = (bool)$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'showHiddenRecords');
|
||
$this->ignoreAccessTime = (bool)$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'ignoreAccessTime');
|
||
// Simulate date
|
||
$simTime = $GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'simulateDate');
|
||
if ($simTime) {
|
typo3/sysext/frontend/Classes/Page/PageRepository.php | ||
---|---|---|
if (!$show_hidden) {
|
||
$this->where_hid_del .= 'AND pages.hidden=0 ';
|
||
}
|
||
$this->where_hid_del .= 'AND pages.starttime<=' . $GLOBALS['SIM_ACCESS_TIME'] . ' AND (pages.endtime=0 OR pages.endtime>' . $GLOBALS['SIM_ACCESS_TIME'] . ') ';
|
||
if (!$GLOBALS['TSFE']->ignoreAccessTime){
|
||
$this->where_hid_del .= 'AND pages.starttime<=' . $GLOBALS['SIM_ACCESS_TIME'] . ' AND (pages.endtime=0 OR pages.endtime>' . $GLOBALS['SIM_ACCESS_TIME'] . ') ';
|
||
}
|
||
// Filter out new/deleted place-holder pages in case we are NOT in a
|
||
// versioning preview (that means we are online!)
|
||
if (!$this->versioningPreview) {
|
||
... | ... | |
if ($table == 'pages') {
|
||
$enFields = $this->versioningPreview_where_hid_del;
|
||
} else {
|
||
$enFields = $this->enableFields($table, -1, array(), TRUE);
|
||
$ignore_array = array();
|
||
if ($GLOBALS['TSFE']->ignoreAccessTime){
|
||
$ignore_array['starttime'] = 1;
|
||
$ignore_array['endtime'] = 1;
|
||
}
|
||
$enFields = $this->enableFields($table, -1, $ignore_array, TRUE);
|
||
}
|
||
// Select workspace version of record, only testing for deleted.
|
||
$newrow = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow($fields, $table, 'pid=-1 AND
|
typo3/sysext/frontend/Classes/View/AdminPanelView.php | ||
---|---|---|
$this->extNeedUpdate = TRUE;
|
||
$out .= $this->extGetItem('preview_showHiddenPages', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="0" /><input type="checkbox" id="preview_showHiddenPages" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['preview_showHiddenPages'] ? ' checked="checked"' : '') . ' />');
|
||
$out .= $this->extGetItem('preview_showHiddenRecords', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenRecords]" value="0" /><input type="checkbox" id="preview_showHiddenRecords" name="TSFE_ADMIN_PANEL[preview_showHiddenRecords]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['preview_showHiddenRecords'] ? ' checked="checked"' : '') . ' />');
|
||
$out .= $this->extGetItem('preview_ignoreAccessTime', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[preview_ignoreAccessTime]" value="0" /><input type="checkbox" id="preview_ignoreAccessTime" name="TSFE_ADMIN_PANEL[preview_ignoreAccessTime]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['preview_ignoreAccessTime'] ? ' checked="checked"' : '') . ' />');
|
||
// Simulate date
|
||
$out .= $this->extGetItem('preview_simulateDate', '<input type="text" id="preview_simulateDate" name="TSFE_ADMIN_PANEL[preview_simulateDate]_hr" onchange="TSFEtypo3FormFieldGet(\'TSFE_ADMIN_PANEL[preview_simulateDate]\', \'datetime\', \'\', 1,0);" /><input type="hidden" name="TSFE_ADMIN_PANEL[preview_simulateDate]" value="' . $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['preview_simulateDate'] . '" />');
|
||
$this->extJSCODE .= 'TSFEtypo3FormFieldSet("TSFE_ADMIN_PANEL[preview_simulateDate]", "datetime", "", 0, 0);';
|
typo3/sysext/lang/locallang_tsfe.xlf | ||
---|---|---|
<trans-unit id="preview_showHiddenRecords" xml:space="preserve">
|
||
<source>Show hidden records</source>
|
||
</trans-unit>
|
||
<trans-unit id="preview_ignoreAccessTime" xml:space="preserve">
|
||
<source>Ignore access time</source>
|
||
</trans-unit>
|
||
<trans-unit id="preview_simulateDate" xml:space="preserve">
|
||
<source>Simulate time</source>
|
||
</trans-unit>
|
||
-
|
typo3/sysext/frontend/Classes/View/AdminPanelView.php | ||
---|---|---|
// Candidate for GeneralUtility::array_merge() if integer-keys will some day make trouble...
|
||
unset($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['action']);
|
||
// Actions:
|
||
if ($input['action']['clearCache'] && $this->isAdminModuleEnabled('cache')) {
|
||
if ($this->isAdminModuleEnabled('cache')) {
|
||
$GLOBALS['BE_USER']->extPageInTreeInfo = array();
|
||
$theStartId = (int)$input['cache_clearCacheId'];
|
||
$GLOBALS['TSFE']->clearPageCacheContent_pidList($GLOBALS['BE_USER']->extGetTreeList($theStartId, $this->extGetFeAdminValue('cache', 'clearCacheLevels'), 0, $GLOBALS['BE_USER']->getPagePermsClause(1)) . $theStartId);
|