// refacto Theme::getThemes ( array2Collection )
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11893 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
aa70c0f18d
commit
53091bc6d4
1 file changed
+4
-5
+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