mirror of
https://github.com/flextype/flextype.git
synced 2025-08-24 05:43:10 +02:00
fix(core): fix Plugins API - createPluginsDictionary method and increase app perfomance #259
This commit is contained in:
@@ -51,7 +51,7 @@ class Plugins
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function getLocales() : array
|
||||
public function getLocales()
|
||||
{
|
||||
return $this->locales;
|
||||
}
|
||||
@@ -90,9 +90,10 @@ class Plugins
|
||||
} else {
|
||||
// Save plugins dictionary
|
||||
$dictionary = $this->getPluginsDictionary($plugins_list, $locale);
|
||||
$this->flextype['cache']->save($locale, $dictionary);
|
||||
$this->flextype['cache']->save($locale, $dictionary[$locale]);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// If Plugins List isnt empty
|
||||
if (is_array($plugins_list) && count($plugins_list) > 0) {
|
||||
@@ -158,7 +159,7 @@ class Plugins
|
||||
|
||||
// Save plugins dictionary
|
||||
$dictionary = $this->getPluginsDictionary($plugins_list, $locale);
|
||||
$this->flextype['cache']->save($locale, $dictionary);
|
||||
$this->flextype['cache']->save($locale, $dictionary[$locale]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user