8561 Checkboxes and labels are aligned badly if in one line
[Packages/TYPO3.CMS.git] / typo3 / class.db_list.inc
index 31fbff1..aeb9362 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -564,6 +564,9 @@ class recordList extends t3lib_recordList {
                        $code = '<i>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</i> - '.htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table,$row),$GLOBALS['BE_USER']->uc['titleLen']));
                } else {
                        $code = htmlspecialchars(t3lib_div::fixed_lgd_cs($code,$this->fixedL));
+                       if ($code != htmlspecialchars($origCode)) {
+                               $code = '<span title="'.htmlspecialchars($origCode).'">'.$code.'</span>';
+                       }
                }
 
                switch((string)$this->clickTitleMode)   {
@@ -674,9 +677,10 @@ class recordList extends t3lib_recordList {
         *
         * @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:
@@ -698,8 +702,16 @@ class recordList extends t3lib_recordList {
                        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'])       {
@@ -773,4 +785,5 @@ class recordList extends t3lib_recordList {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list.inc'])        {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list.inc']);
 }
+
 ?>
\ No newline at end of file