// refacto Theme::getThemes ( array2Collection )
This commit is contained in:
+4
-5
@@ -44,10 +44,9 @@ class ThemeCore extends ObjectModel
|
|||||||
|
|
||||||
public static function getThemes()
|
public static function getThemes()
|
||||||
{
|
{
|
||||||
$sql = 'SELECT *
|
$themes = new Collection('Theme');
|
||||||
FROM '._DB_PREFIX_.'theme
|
$themes->orderBy('name');
|
||||||
ORDER BY name';
|
return $themes;
|
||||||
return Db::getInstance()->executeS($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,7 +71,7 @@ class ThemeCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$themes = Theme::getThemes();
|
$themes = Theme::getThemes();
|
||||||
foreach($themes as $theme_obj)
|
foreach($themes as $theme_obj)
|
||||||
$themes_dir[] = $theme_obj['directory'];
|
$themes_dir[] = $theme_obj->directory;
|
||||||
foreach( $dirlist as $theme)
|
foreach( $dirlist as $theme)
|
||||||
if (false !== array_search($theme, $themes_dir))
|
if (false !== array_search($theme, $themes_dir))
|
||||||
$available_theme[] = $theme;
|
$available_theme[] = $theme;
|
||||||
|
|||||||
Reference in New Issue
Block a user