| 1 |
<?php |
<?php |
| 2 |
// $Id: theme.inc,v 1.547 2009/11/03 06:47:22 webchick Exp $ |
// $Id: theme.inc,v 1.548 2009/11/05 16:19:25 webchick Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 562 |
|
|
| 563 |
if ($refresh) { |
if ($refresh) { |
| 564 |
$list = array(); |
$list = array(); |
| 565 |
|
drupal_static_reset('system_list'); |
| 566 |
} |
} |
| 567 |
|
|
| 568 |
if (empty($list)) { |
if (empty($list)) { |
| 571 |
// Extract from the database only when it is available. |
// Extract from the database only when it is available. |
| 572 |
// Also check that the site is not in the middle of an install or update. |
// Also check that the site is not in the middle of an install or update. |
| 573 |
if (db_is_active() && !defined('MAINTENANCE_MODE')) { |
if (db_is_active() && !defined('MAINTENANCE_MODE')) { |
| 574 |
$result = db_query("SELECT * FROM {system} WHERE type = :theme", array(':theme' => 'theme')); |
foreach (system_list('theme') as $theme) { |
|
foreach ($result as $theme) { |
|
| 575 |
if (file_exists($theme->filename)) { |
if (file_exists($theme->filename)) { |
| 576 |
$theme->info = unserialize($theme->info); |
$theme->info = unserialize($theme->info); |
| 577 |
$themes[] = $theme; |
$themes[] = $theme; |