summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-05 19:40:55 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-05 19:40:55 +0000
commit523ba0348ea70e6ed1412488cd37dc521d13abae (patch)
treec33b24146b1d1a6dc352f6cfdaab81e2babd14a5
parente758e30450ca661f2e99f2795441b9ebe7d3c0f1 (diff)
downloadbrdo-523ba0348ea70e6ed1412488cd37dc521d13abae.tar.gz
brdo-523ba0348ea70e6ed1412488cd37dc521d13abae.tar.bz2
#292253 by Damien Tournoud: Remove per-user themes selection from core.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--modules/color/color.module7
-rw-r--r--modules/system/system.admin.inc22
-rw-r--r--modules/system/system.module67
4 files changed, 2 insertions, 96 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d15d1a426..344d9e8a5 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -79,6 +79,8 @@ Drupal 7.0, xxxx-xx-xx (development version)
* Refactored the HTML corrector to take advantage of PHP 5 features.
- Removed ping module:
* Contributed modules with similar functionality are available.
+- Removed per-user themes:
+ * Contributed modules with similar functionality are available.
- Refactored the "access rules" component of user module:
* The user module now provides a simple interface for blocking single
IP addresses. The previous functionality in the user module for restricting
diff --git a/modules/color/color.module b/modules/color/color.module
index dab080f39..965a9fc89 100644
--- a/modules/color/color.module
+++ b/modules/color/color.module
@@ -59,13 +59,6 @@ function color_form_system_themes_alter(&$form, &$form_state) {
}
/**
- * Implement hook_form_FORM_ID_alter().
- */
-function color_form_system_theme_select_form_alter(&$form, &$form_state) {
- _color_theme_select_form_alter($form, $form_state);
-}
-
-/**
* Helper for hook_form_FORM_ID_alter() implementations.
*/
function _color_theme_select_form_alter(&$form, &$form_state) {
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index cf5335600..bc2aba4f9 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -2160,28 +2160,6 @@ function theme_system_modules_uninstall($form) {
}
/**
- * Theme the theme select form.
- * @param $form
- * An associative array containing the structure of the form.
- * @ingroup themeable
- */
-function theme_system_theme_select_form($form) {
- foreach (element_children($form) as $key) {
- $row = array();
- if (isset($form[$key]['description']) && is_array($form[$key]['description'])) {
- $row[] = drupal_render($form[$key]['screenshot']);
- $row[] = drupal_render($form[$key]['description']);
- $row[] = drupal_render($form['theme'][$key]);
- }
- $rows[] = $row;
- }
-
- $header = array(t('Screenshot'), t('Name'), t('Selected'));
- $output = theme('table', $header, $rows);
- return $output;
-}
-
-/**
* Theme function for the system themes form.
*
* @param $form
diff --git a/modules/system/system.module b/modules/system/system.module
index 344378272..e3d01214d 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -150,10 +150,6 @@ function system_help($path, $arg) {
*/
function system_theme() {
return array_merge(drupal_common_theme(), array(
- 'system_theme_select_form' => array(
- 'arguments' => array('form' => NULL),
- 'file' => 'system.admin.inc',
- ),
'system_themes_form' => array(
'arguments' => array('form' => NULL),
'file' => 'system.admin.inc',
@@ -1380,7 +1376,6 @@ function system_preprocess_page(&$variables) {
*/
function system_user_form(&$edit, &$user, $category = NULL) {
if ($category == 'account') {
- $form['theme_select'] = system_theme_select_form(t('Selecting a different theme will change the look and feel of the site.'), isset($edit['theme']) ? $edit['theme'] : NULL, 2);
if (variable_get('configurable_timezones', 1)) {
system_user_timezone($edit, $form);
}
@@ -1586,68 +1581,6 @@ function system_admin_menu_block($item) {
}
/**
- * Returns a fieldset containing the theme select form.
- *
- * @param $description
- * description of the fieldset
- * @param $default_value
- * default value of theme radios
- * @param $weight
- * weight of the fieldset
- * @return
- * a form array
- */
-function system_theme_select_form($description = '', $default_value = '', $weight = 0) {
- if (user_access('select different theme')) {
- $enabled = array();
- $themes = list_themes();
-
- foreach ($themes as $theme) {
- if ($theme->status) {
- $enabled[] = $theme;
- }
- }
-
- if (count($enabled) > 1) {
- ksort($enabled);
-
- $form['themes'] = array(
- '#type' => 'fieldset',
- '#title' => t('Theme configuration'),
- '#description' => $description,
- '#collapsible' => TRUE,
- '#theme' => 'system_theme_select_form'
- );
-
- foreach ($enabled as $info) {
- // For the default theme, revert to an empty string so the user's theme updates when the site theme is changed.
- $info->key = $info->name == variable_get('theme_default', 'garland') ? '' : $info->name;
-
- $screenshot = NULL;
- $theme_key = $info->name;
- while ($theme_key) {
- if (file_exists($themes[$theme_key]->info['screenshot'])) {
- $screenshot = $themes[$theme_key]->info['screenshot'];
- break;
- }
- $theme_key = isset($themes[$theme_key]->info['base theme']) ? $themes[$theme_key]->info['base theme'] : NULL;
- }
-
- $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $info->name)), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
-
- $form['themes'][$info->key]['screenshot'] = array('#markup' => $screenshot);
- $form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#markup' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '<br /> <em>' . t('(site default theme)') . '</em>' : ''));
- $options[$info->key] = '';
- }
-
- $form['themes']['theme'] = array('#type' => 'radios', '#options' => $options, '#default_value' => $default_value ? $default_value : '');
- $form['#weight'] = $weight;
- return $form;
- }
- }
-}
-
-/**
* Checks the existence of the directory specified in $form_element. This
* function is called from the system_settings form to check both the
* file_directory_path and file_directory_temp directories. If validation