Fixed bug #12508: Log usage of XLLfile to deprecation log (thanks to Steffen Gebert)
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tceforms.php
index 25f0400..7322ad6 100644 (file)
@@ -894,7 +894,15 @@ class t3lib_TCEforms       {
                                        $PA['fieldChangeFunc']['alert']=$alertMsgOnChange;
                                                // if this is the child of an inline type and it is the field creating the label
                                        if ($this->inline->isInlineChildAndLabelField($table, $field)) {
-                                               $PA['fieldChangeFunc']['inline'] = "inline.handleChangedField('".$PA['itemFormElName']."','".$this->inline->inlineNames['object']."[$table][".$row['uid']."]');";
+                                               $inlineObjectId = implode(
+                                                       t3lib_TCEforms_inline::Structure_Separator,
+                                                       array(
+                                                               $this->inline->inlineNames['object'],
+                                                               $table,
+                                                               $row['uid']
+                                                       )
+                                               );
+                                               $PA['fieldChangeFunc']['inline'] = "inline.handleChangedField('" . $PA['itemFormElName'] . "','" . $inlineObjectId . "');";
                                        }
 
                                                // Based on the type of the item, call a render function:
@@ -2025,6 +2033,15 @@ class t3lib_TCEforms     {
                        } elseif (isset($PA['fieldTSConfig']['altLabels.'][$evalValue])) {
                                $tvP[1] = rawurlencode($this->sL($PA['fieldTSConfig']['altLabels.'][$evalValue]));
                        }
+                       if ($tvP[1] == '') {
+                                       // Case: flexform, default values supplied, no label provided (bug #9795)
+                               foreach ($selItems as $selItem) {
+                                       if ($selItem[1] == $tvP[0]) {
+                                               $tvP[1] = $selItem[0];
+                                               break;
+                                       }
+                               }
+                       }
                        $itemArray[$tk] = implode('|',$tvP);
                }
                $itemsToSelect = '';
@@ -2419,10 +2436,26 @@ class t3lib_TCEforms    {
                        $langDisabled = $dataStructArray['meta']['langDisable'] ? 1 : 0;
 
                        $editData['meta']['currentLangId']=array();
+
+                               // Look up page overlays:
+                       $checkPageLanguageOverlay = $GLOBALS['BE_USER']->getTSConfigVal('options.checkPageLanguageOverlay')?TRUE:FALSE;
+                       if ($checkPageLanguageOverlay)  {
+                               $pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                                       '*',
+                                       'pages_language_overlay',
+                                       'pid='.intval($row['pid']).
+                                               t3lib_BEfunc::deleteClause('pages_language_overlay').
+                                               t3lib_BEfunc::versioningPlaceholderClause('pages_language_overlay'),
+                                       '',
+                                       '',
+                                       '',
+                                       'sys_language_uid'
+                               );
+                       }
                        $languages = $this->getAvailableLanguages();
 
                        foreach($languages as $lInfo)   {
-                               if ($GLOBALS['BE_USER']->checkLanguageAccess($lInfo['uid']))    {
+                               if ($GLOBALS['BE_USER']->checkLanguageAccess($lInfo['uid']) && (!$checkPageLanguageOverlay || $lInfo['uid']<=0 || is_array($pageOverlays[$lInfo['uid']])))      {
                                        $editData['meta']['currentLangId'][] =  $lInfo['ISOcode'];
                                }
                        }
@@ -3918,7 +3951,7 @@ class t3lib_TCEforms      {
                                if ($wizConf['_HIDDENFIELD'])   $item = $itemKinds[1];
 
                                $outStr = '';
-                               $vAlign = $wizConf['_VALIGN'] ? ' valign="'.$wizConf['_VALIGN'].'"' : '';
+                               $vAlign = $wizConf['_VALIGN'] ? ' style="vertical-align:'.$wizConf['_VALIGN'].'"' : '';
                                if (count($outArr)>1 || $wizConf['_PADDING'])   {
                                        $dist = intval($wizConf['_DISTANCE']);
                                        if ($wizConf['_VERTICAL'])      {
@@ -3928,7 +3961,7 @@ class t3lib_TCEforms      {
                                                $dist = $dist ? '<td><img src="clear.gif" height="1" width="'.$dist.'" alt="" /></td>' : '';
                                                $outStr = '<tr><td'.$vAlign.'>'.implode('</td>'.$dist.'<td'.$vAlign.'>',$outArr).'</td></tr>';
                                        }
-                                       $outStr = '<table border="0" cellpadding="'.intval($wizConf['_PADDING']).'" cellspacing="0">'.$outStr.'</table>';
+                                       $outStr = '<table border="0" cellpadding="'.intval($wizConf['_PADDING']).'" cellspacing="'.intval($wizConf['_PADDING']).'">'.$outStr.'</table>';
                                } else {
                                        $outStr = implode('',$outArr);
                                }
@@ -4084,9 +4117,11 @@ class t3lib_TCEforms     {
         * @param       string          The string which - if empty - will become the no-title string.
         * @param       array           Array with wrappin parts for the no-title output (in keys [0]/[1])
         * @return      string
-        * @deprecated since TYPO3 4.1
+        * @deprecated since TYPO3 4.1, this function will be removed in TYPO3 4.5.
         */
        function noTitle($str,$wrapParts=array())       {
+               t3lib_div::logDeprecatedFunction();
+
                return strcmp($str,'') ? $str : $wrapParts[0].'['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title').']'.$wrapParts[1];
        }
 
@@ -4900,10 +4935,10 @@ class t3lib_TCEforms    {
         * Returns divider.
         * Currently not implemented and returns only blank value.
         *
-        * @return      string
+        * @return      string          Empty string
         */
-       function getDivider()   {
-               //return "<hr />";
+       function getDivider() {
+               return '';
        }
 
        /**