+2008-06-02 Ernesto Baschny <ernst@cron-it.de>
+
+ * Fixed bug #8362: Duplicate entry for [tstamp] and [crdate] in Web->List module for single table in selector-box (thanks to Steffen Kamper)
+
2008-05-31 Oliver Hader <oliver@typo3.org>
* Fixed bug #8336: JavaScript error in TBE_EDITOR causes login expired dialog
*
* @param string Table name
* @param boolean If set, users access to the field (non-exclude-fields) is NOT checked.
+ * @param boolean If set, also adds crdate and tstamp fields (note: they will also be added if user is admin or dontCheckUser is set)
* @return array Array, where values are fieldnames to include in query
*/
- function makeFieldList($table,$dontCheckUser=0) {
+ function makeFieldList($table,$dontCheckUser=0,$addDateFields=0) {
global $TCA,$BE_USER;
// Init fieldlist array:
if ($dontCheckUser || $BE_USER->isAdmin()) {
$fieldListArr[]='uid';
$fieldListArr[]='pid';
+ }
+
+ // Add date fields
+ if ($dontCheckUser || $BE_USER->isAdmin() || $addDateFields) {
if ($TCA[$table]['ctrl']['tstamp']) $fieldListArr[]=$TCA[$table]['ctrl']['tstamp'];
if ($TCA[$table]['ctrl']['crdate']) $fieldListArr[]=$TCA[$table]['ctrl']['crdate'];
+ }
+
+ // Add more special fields:
+ if ($dontCheckUser || $BE_USER->isAdmin()) {
if ($TCA[$table]['ctrl']['cruser_id']) $fieldListArr[]=$TCA[$table]['ctrl']['cruser_id'];
if ($TCA[$table]['ctrl']['sortby']) $fieldListArr[]=$TCA[$table]['ctrl']['sortby'];
if ($TCA[$table]['ctrl']['versioningWS']) {
$setFields=is_array($this->setFields[$table]) ? $this->setFields[$table] : array();
// Request fields from table:
- $fields = $this->makeFieldList($table);
+ $fields = $this->makeFieldList($table, false, true);
// Add pseudo "control" fields
- $fields[]='tstamp';
- $fields[]='crdate';
$fields[]='_PATH_';
$fields[]='_REF_';
$fields[]='_LOCALIZATION_';