Skip to content

Commit cb3740c

Browse files
committed
Correctly load the DCA labels
1 parent 67c7b18 commit cb3740c

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

core-bundle/src/Resources/contao/library/Contao/DcaLoader.php

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,6 @@ private function loadDcaFiles($blnNoCache)
138138
*/
139139
private function addDefaultLabels($blnNoCache)
140140
{
141-
// Return if there are no labels
142-
if (!isset(static::$arrLanguageFiles[$this->strTable]))
143-
{
144-
return;
145-
}
146-
147-
// Return if the labels have been added already
148-
if (!$blnNoCache && isset(static::$arrLoaded['languageFiles'][$this->strTable]))
149-
{
150-
return;
151-
}
152-
153-
static::$arrLoaded['languageFiles'][$this->strTable] = true;
154-
155141
// Operations
156142
foreach (array('global_operations', 'operations') as $key)
157143
{
@@ -167,7 +153,7 @@ private function addDefaultLabels($blnNoCache)
167153
continue;
168154
}
169155

170-
if (isset($GLOBALS['TL_LANG'][$this->strTable][$k]))
156+
if (isset($GLOBALS['TL_LANG'][$this->strTable][$k]) || !isset($GLOBALS['TL_LANG']['DCA'][$k]))
171157
{
172158
$v['label'] = &$GLOBALS['TL_LANG'][$this->strTable][$k];
173159
}
@@ -190,10 +176,7 @@ private function addDefaultLabels($blnNoCache)
190176
continue;
191177
}
192178

193-
if (isset($GLOBALS['TL_LANG'][$this->strTable][$k]))
194-
{
195-
$v['label'] = &$GLOBALS['TL_LANG'][$this->strTable][$k];
196-
}
179+
$v['label'] = &$GLOBALS['TL_LANG'][$this->strTable][$k];
197180
}
198181

199182
unset($v);

0 commit comments

Comments
 (0)