[BUGFIX] Pootle: Multi-line labels are not rendered properly
[Packages/TYPO3.CMS.git] / typo3 / class.db_list_extra.inc
index a757afb..7436836 100644 (file)
  *
  * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   91: class localRecordList extends recordList
- *  123:     function writeTop($row)
- *  304:     function getTable($table,$id,$rowlist)
- *  559:     function renderListRow($table,$row,$cc,$titleCol,$thumbsCol,$indent=0)
- *  648:     function renderListHeader($table,$currentIdList)
- *
- *              SECTION: Rendering of various elements
- *  796:     function makeControl($table,$row)
- *  986:     function makeClip($table,$row)
- * 1057:     function makeRef($table,$uid)
- * 1086:     function makeLocalizationPanel($table,$row)
- * 1148:     function fieldSelectBox($table,$formFields=1)
- *
- *              SECTION: Helper functions
- * 1231:     function linkClipboardHeaderIcon($string,$table,$cmd,$warning='')
- * 1242:     function clipNumPane()
- * 1256:     function addSortLink($code,$field,$table)
- * 1281:     function recPath($pid)
- * 1294:     function showNewRecLink($table)
- * 1304:     function makeReturnUrl()
- *
- *              SECTION: CSV related functions
- * 1329:     function initCSV()
- * 1352:     function addToCSV($row,$table)
- * 1376:     function setCsvRow($csvRow)
- * 1387:     function outputCSV($prefix)
- *
- * TOTAL FUNCTIONS: 19
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
 
 
 
@@ -121,15 +85,6 @@ class localRecordList extends recordList {
        var $duplicateStack=array();                    // Used to track which elements has duplicates and how many
 
        /**
-        * references of the current record
-        *
-        * @var array
-        *
-        * @deprecated since 4.4: Use getReferenceCount instead
-        */
-       public $references;
-
-       /**
         * [$tablename][$uid] = number of references to this record
         *
         * @var array
@@ -752,28 +707,6 @@ class localRecordList extends recordList {
        }
 
        /**
-        * Write sys_refindex entries for current record to $this->references
-        *
-        * @param       string          Table name
-        * @param       integer         Uid of current record
-        * @return      void
-        *
-        * @deprecated since 4.4, will be removed in TYPO3 4.6 - Use getReferenceCount instead
-        */
-       function setReferences($table, $uid) {
-               t3lib_div::logDeprecatedFunction();
-
-               $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       'tablename, recuid, field',
-                       'sys_refindex',
-                       'ref_table='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'sys_refindex').
-                               ' AND ref_uid='.intval($uid).
-                               ' AND deleted=0'
-               );
-               $this->references = $rows;
-       }
-
-       /**
         * Gets the number of records referencing the record with the UID $uid in
         * the table $tableName.
         *
@@ -1216,7 +1149,7 @@ class localRecordList extends recordList {
                                        '</a>';
 
                                        // Versioning:
-                               if (t3lib_extMgm::isLoaded('version') {
+                               if (t3lib_extMgm::isLoaded('version') && !t3lib_extMgm::isLoaded('workspaces')) {
                                        $vers = t3lib_BEfunc::selectVersionsOfRecord($table, $row['uid'], 'uid', $GLOBALS['BE_USER']->workspace, FALSE, $row);
                                        if (is_array($vers))    {       // If table can be versionized.
                                                $versionIcon = 'no-version';
@@ -1488,29 +1421,6 @@ class localRecordList extends recordList {
        }
 
        /**
-        * Make reference count
-        *
-        * @param       string          Table name
-        * @param       integer         UID of record
-        * @return      string          HTML-table
-        *
-        * @deprecated since 4.4, will be removed in TYPO3 4.6 - Use createReferenceHtml() instead
-        */
-       function makeRef($table,$uid)   {
-               t3lib_div::logDeprecatedFunction();
-
-                       // Compile information for title tag:
-               $infoData=array();
-               if (is_array($this->references)) {
-                       foreach ($this->references as $row) {
-                               $infoData[]=$row['tablename'].':'.$row['recuid'].':'.$row['field'];
-                       }
-               }
-
-               return count($infoData) ? '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.$uid.'\'); return false;').'" title="'.htmlspecialchars(t3lib_div::fixed_lgd_cs(implode(' / ',$infoData),100)).'">'.count($infoData).'</a>' : '';
-       }
-
-       /**
         * Creates the HTML for a reference count for the record with the UID $uid
         * in the table $tableName.
         *
@@ -1656,7 +1566,7 @@ class localRecordList extends recordList {
 
                        // Compile the options into a multiple selector box:
                $lMenu = '
-                                                                               <select size="'.t3lib_div::intInRange(count($fields)+1,3,20).'" multiple="multiple" name="displayFields['.$table.'][]">'.implode('',$opt).'
+                                                                               <select size="'.t3lib_utility_Math::forceIntegerInRange(count($fields)+1,3,20).'" multiple="multiple" name="displayFields['.$table.'][]">'.implode('',$opt).'
                                                                                </select>
                                ';
 
@@ -1829,10 +1739,9 @@ class localRecordList extends recordList {
         * Adds selected columns of one table row as CSV line.
         *
         * @param       array           Record array, from which the values of fields found in $this->fieldArray will be listed in the CSV output.
-        * @param       string          Table name @deprecated since 4.4
         * @return      void
         */
-       protected function addToCSV(array $row = array(), $table = '') {
+       protected function addToCSV(array $row = array()) {
                $rowReducedByControlFields = self::removeControlFieldsFromFieldRow($row);
                $rowReducedToSelectedColumns = array_intersect_key($rowReducedByControlFields, array_flip($this->fieldArray));
                $this->setCsvRow($rowReducedToSelectedColumns);
@@ -1901,4 +1810,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc']);
 }
 
-?>
\ No newline at end of file
+?>