From fb2c693f0967456a7f9fd07711554686c8268289 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 4 Jan 2009 16:17:47 +0000 Subject: - Patch #353861 by killes: converted theme.inc to new database layer. --- includes/theme.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index e23d58cf4..2d6b88964 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -456,8 +456,8 @@ function list_themes($refresh = FALSE) { // Extract from the database only when it is available. // Also check that the site is not in the middle of an install or update. if (db_is_active() && !defined('MAINTENANCE_MODE')) { - $result = db_query("SELECT * FROM {system} WHERE type = '%s'", 'theme'); - while ($theme = db_fetch_object($result)) { + $result = db_query("SELECT * FROM {system} WHERE type = :theme", array(':theme' => 'theme')); + foreach ($result as $theme) { if (file_exists($theme->filename)) { $theme->info = unserialize($theme->info); $themes[] = $theme; -- cgit v1.2.3