function list_theme_engines in Drupal 5
Same name and namespace in other branches
- 4 includes/theme.inc \list_theme_engines()
Provides a list of currently available theme engines
Parameters
$refresh: Whether to reload the list of themes from the database.
Return value
An array of the currently available theme engines.
1 call to list_theme_engines()
- path_to_engine in includes/
theme.inc - Return the path to the currently selected engine.
File
- includes/
theme.inc, line 122 - The theme system, which controls the output of Drupal.
Code
function list_theme_engines($refresh = FALSE) {
static $list;
if ($refresh) {
unset($list);
}
if (!$list) {
$list = array();
$result = db_query("SELECT * FROM {system} WHERE type = 'theme_engine' AND status = '1' ORDER BY name");
while ($engine = db_fetch_object($result)) {
if (file_exists($engine->filename)) {
$list[$engine->name] = $engine;
}
}
}
return $list;
}