summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-03-25 13:48:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-03-25 13:48:42 +0000
commit4bfda4db833832533b48dd92ab6ccb917709f49f (patch)
tree64367bbb96c4a9031c78f350129e263b14696d4e /modules/system/system.module
parentf9693e5815f751a19b1d2321a9dbb330c21ddaa2 (diff)
downloadbrdo-4bfda4db833832533b48dd92ab6ccb917709f49f.tar.gz
brdo-4bfda4db833832533b48dd92ab6ccb917709f49f.tar.bz2
#410638 by foxtrotcharlie: Prevent 'Powered by Drupal' settings showing up on all system blocks.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module52
1 files changed, 28 insertions, 24 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index c9b9d2672..8c5f8b48e 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -901,36 +901,40 @@ function system_block_list() {
* Implementation of hook_block_configure().
*/
function system_block_configure($delta = '') {
- $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
- drupal_add_js(drupal_get_path('module', 'system') .'/system.js');
- // Compile a list of fields to show
- $form['wrapper']['color'] = array(
- '#type' => 'select',
- '#title' => t('Badge color'),
- '#default_value' => variable_get('drupal_badge_color', 'powered-blue'),
- '#options' => array('powered-black' => t('Black'), 'powered-blue' => t('Blue'), 'powered-gray' => t('Gray')),
- );
- $form['wrapper']['size'] = array(
- '#type' => 'select',
- '#title' => t('Badge size'),
- '#default_value' => variable_get('drupal_badge_size', '80x15'),
- '#options' => array('80x15' => t('Small'), '88x31' => t('Medium'), '135x42' => t('Large')),
- );
- $form['wrapper']['preview'] = array(
- '#type' => 'item',
- '#title' => 'Preview',
- '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => 'powered-by-preview'), FALSE),
- );
- return $form;
+ if ($delta == 'powered-by') {
+ $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
+ drupal_add_js(drupal_get_path('module', 'system') .'/system.js');
+ // Compile a list of fields to show
+ $form['wrapper']['color'] = array(
+ '#type' => 'select',
+ '#title' => t('Badge color'),
+ '#default_value' => variable_get('drupal_badge_color', 'powered-blue'),
+ '#options' => array('powered-black' => t('Black'), 'powered-blue' => t('Blue'), 'powered-gray' => t('Gray')),
+ );
+ $form['wrapper']['size'] = array(
+ '#type' => 'select',
+ '#title' => t('Badge size'),
+ '#default_value' => variable_get('drupal_badge_size', '80x15'),
+ '#options' => array('80x15' => t('Small'), '88x31' => t('Medium'), '135x42' => t('Large')),
+ );
+ $form['wrapper']['preview'] = array(
+ '#type' => 'item',
+ '#title' => 'Preview',
+ '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => 'powered-by-preview'), FALSE),
+ );
+ return $form;
+ }
}
/**
* Implementation of hook_block_save().
*/
function system_block_save($delta = '', $edit = NULL) {
- $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
- variable_set('drupal_badge_color', $edit['color']);
- variable_set('drupal_badge_size', $edit['size']);
+ if ($delta == 'powered-by') {
+ $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
+ variable_set('drupal_badge_color', $edit['color']);
+ variable_set('drupal_badge_size', $edit['size']);
+ }
}
/**