* Fixed bug #0000527: Title tag is added even if the page title was empty. Thanks...
[Packages/TYPO3.CMS.git] / typo3 / class.db_list.inc
index bb38900..d7f037d 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -32,7 +32,7 @@
  * Revised for TYPO3 3.6 December/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *   84: class recordList extends t3lib_recordList
- *  140:     function start($id,$table,$pointer,$search="",$levels="",$showLimit=0)
- *  186:     function generateList()
- *  233:     function getSearchBox($formFields=1)
- *  276:     function showSysNotesForPage()
+ *  144:     function start($id,$table,$pointer,$search="",$levels="",$showLimit=0)
+ *  195:     function generateList()
+ *  242:     function getSearchBox($formFields=1)
+ *  286:     function showSysNotesForPage()
  *
  *              SECTION: Various helper functions
- *  353:     function setDispFields()
- *  378:     function thumbCode($row,$table,$field)
- *  391:     function makeQueryArray($table, $id, $addWhere="",$fieldList='*')
- *  433:     function setTotalItems($queryParts)
- *  449:     function makeSearchString($table)
- *  488:     function linkWrapTable($table,$code)
- *  505:     function linkWrapItems($table,$uid,$code,$row)
- *  532:     function listURL($altId='',$table=-1,$exclList='')
- *  551:     function requestUri()
- *  562:     function makeFieldList($table,$dontCheckUser=0)
- *  601:     function getTreeObject($id,$depth,$perms_clause)
+ *  363:     function setDispFields()
+ *  388:     function thumbCode($row,$table,$field)
+ *  401:     function makeQueryArray($table, $id, $addWhere="",$fieldList='*')
+ *  443:     function setTotalItems($queryParts)
+ *  459:     function makeSearchString($table)
+ *  498:     function linkWrapTable($table,$code)
+ *  515:     function linkWrapItems($table,$uid,$code,$row)
+ *  578:     function listURL($altId='',$table=-1,$exclList='')
+ *  597:     function requestUri()
+ *  608:     function makeFieldList($table,$dontCheckUser=0)
+ *  648:     function getTreeObject($id,$depth,$perms_clause)
  *
  * TOTAL FUNCTIONS: 15
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -76,7 +76,7 @@
 /**
  * Child class for rendering of Web > List (not the final class. see class.db_list_extra)
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  * @see localRecordList
@@ -92,6 +92,7 @@ class recordList extends t3lib_recordList {
        var $widthGif = '<img src="clear.gif" width="1" height="4" hspace="160" alt="" />';
        var $script = 'db_list.php';                    // Current script name
        var $allFields=0;                                               // Indicates if all available fields for a user should be selected or not.
+       var $localizationView=FALSE;                    // Whether to show localization view or not.
 
                // Internal, static: GPvar:
        var $csvOutput=FALSE;                   // If set, csvList is outputted.
@@ -112,6 +113,7 @@ class recordList extends t3lib_recordList {
        var $perms_clause='';                   // Page select permissions
        var $calcPerms=0;                               // Some permissions...
        var $clickTitleMode = '';               // Mode for what happens when a user clicks the title of a record.
+       var $modSharedTSconfig = array();               // Shared module configuration, used by localization features
 
                // Internal, dynamic:
        var $JScode = '';                               // JavaScript code accumulation
@@ -172,10 +174,15 @@ class recordList extends t3lib_recordList {
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                if ($sL>0)      {
                        $tree = $this->getTreeObject($id,$sL,$this->perms_clause);
-                       $this->pidSelect = 'pid IN ('.implode($tree->ids,',').')';
+                       $this->pidSelect = 'pid IN ('.implode(',',$tree->ids).')';
                } else {
                        $this->pidSelect = 'pid='.intval($id);
                }
+
+                       // Initialize languages:
+               if ($this->localizationView)    {
+                       $this->initializeLanguages();
+               }
        }
 
        /**
@@ -266,6 +273,7 @@ class recordList extends t3lib_recordList {
                                        </tr>
                                </table>
                        '.$formElements[1];
+               $content.=t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_searchbox', $GLOBALS['BACK_PATH'],'|<br/>');
                return $content;
        }
 
@@ -535,7 +543,6 @@ class recordList extends t3lib_recordList {
                        case 'show':
                                        // "Show" link (only pages and tt_content elements)
                                if ($table=='pages' || $table=='tt_content')    {
-                                       $params = '&edit['.$table.']['.$row['uid'].']=edit';
                                        $code = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($table=='tt_content'?$this->id.'#'.$row['uid']:$row['uid'])).'" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'">'.
                                                        $code.
                                                        '</a>';
@@ -624,6 +631,7 @@ class recordList extends t3lib_recordList {
                                if ($TCA[$table]['ctrl']['crdate'])     $fieldListArr[]=$TCA[$table]['ctrl']['crdate'];
                                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']['versioning']) $fieldListArr[]='t3ver_id';
                        }
                }
                return $fieldListArr;
@@ -648,7 +656,6 @@ class recordList extends t3lib_recordList {
                $tree->ids[]=$id;
                return $tree;
        }
-
 }