Skip to content

Commit b1a278d

Browse files
committed
fix formlister bug
1 parent a751ed7 commit b1a278d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

assets/snippets/FormLister/core/FormLister.abstract.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ public function __construct(\DocumentParser $modx, $cfg = array())
145145
public function initForm()
146146
{
147147
$lexicon = $this->getCFGDef('lexicon');
148+
$langDir = $this->getCFGDef('langDir', 'assets/snippets/FormLister/core/lang/');
149+
$lang = $this->getCFGDef('lang', $this->modx->config['manager_language']);
148150
if ($lexicon) {
149151
$_lexicon = $this->config->loadArray($lexicon);
150152
if (isset($_lexicon[0])) {
151-
$lang = $this->lexicon->loadLang($_lexicon);
153+
$lang = $this->lexicon->loadLang($_lexicon, $lang, $langDir);
152154
} else {
153155
$lang = $this->lexicon->fromArray($_lexicon);
154156
}

0 commit comments

Comments
 (0)