Commit 583e63c1 authored by Steven Wittens's avatar Steven Wittens

Theme system bug: only show search box if search.module is enabled.

parent 39e40b5b
......@@ -233,6 +233,11 @@ function theme_get_settings($key = NULL) {
$settings = array_merge($settings, variable_get(str_replace('/', '_', 'theme_'. $key .'_settings'), array()));
}
// Only offer search box if search.module is enabled.
if (!module_exist('search')) {
$settings['toggle_search'] = 0;
}
return $settings;
}
......
......@@ -659,13 +659,16 @@ function system_theme_settings() {
// Toggle settings
$toggles = array('toggle_name' => t('Site name'),
'toggle_search' => t('Search box'),
'toggle_slogan' => t('Site slogan'),
'toggle_mission' => t('Mission statement'),
'toggle_primary_links' => t('Primary links'),
'toggle_secondary_links' => t('Secondary links'),
'toggle_node_user_picture' => t('User pictures in posts'),
'toggle_comment_user_picture' => t('User pictures in comments'));
// Only offer search box if search;module is enabled.
if (module_exist('search')) {
$toggles['toggle_search'] = t('Search box');
}
foreach ($toggles as $name => $title) {
if ((!$key) || in_array($name, $features)) {
......
......@@ -659,13 +659,16 @@ function system_theme_settings() {
// Toggle settings
$toggles = array('toggle_name' => t('Site name'),
'toggle_search' => t('Search box'),
'toggle_slogan' => t('Site slogan'),
'toggle_mission' => t('Mission statement'),
'toggle_primary_links' => t('Primary links'),
'toggle_secondary_links' => t('Secondary links'),
'toggle_node_user_picture' => t('User pictures in posts'),
'toggle_comment_user_picture' => t('User pictures in comments'));
// Only offer search box if search;module is enabled.
if (module_exist('search')) {
$toggles['toggle_search'] = t('Search box');
}
foreach ($toggles as $name => $title) {
if ((!$key) || in_array($name, $features)) {
......
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