Commit 9385794e authored by Dries's avatar Dries

- Patch #41548 by Neil: critical bugfix: theme didn't load when styles are used.

parent 3dae9587
......@@ -99,7 +99,7 @@ function list_themes($refresh = FALSE) {
if (!$list) {
$list = array();
$result = db_query("SELECT * FROM {system} WHERE type = 'theme' AND status = 1");
$result = db_query("SELECT * FROM {system} WHERE type = 'theme'");
while ($theme = db_fetch_object($result)) {
if (file_exists($theme->filename)) {
$list[$theme->name] = $theme;
......
......@@ -167,7 +167,7 @@ function system_test() {
function system_user($type, $edit, &$user, $category = NULL) {
if ($type == 'form' && $category == 'account') {
if (user_access('select different theme')) {
$themes = list_themes();
$themes = array_filter(list_themes(), create_function('$theme', 'return $theme->status;'));
if (count($themes) > 1) {
ksort($themes);
......
......@@ -167,7 +167,7 @@ function system_test() {
function system_user($type, $edit, &$user, $category = NULL) {
if ($type == 'form' && $category == 'account') {
if (user_access('select different theme')) {
$themes = list_themes();
$themes = array_filter(list_themes(), create_function('$theme', 'return $theme->status;'));
if (count($themes) > 1) {
ksort($themes);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment