summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 01:15:04 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 01:15:04 +0000
commitedb9752723523963ffc1fac08430381fcf5cd7d7 (patch)
treea2f753bd4891ee2a47ba2490db772138730a141f
parentcf9f223cf5aa9a489db3520992ce7b85dcbfa220 (diff)
downloadbrdo-edb9752723523963ffc1fac08430381fcf5cd7d7.tar.gz
brdo-edb9752723523963ffc1fac08430381fcf5cd7d7.tar.bz2
#369409 by dropcube: Move block.tpl.php to block.module rather than system.module.
-rw-r--r--includes/common.inc4
-rw-r--r--includes/theme.inc32
-rw-r--r--modules/block/block.module37
-rw-r--r--modules/block/block.tpl.php (renamed from modules/system/block.tpl.php)0
4 files changed, 37 insertions, 36 deletions
diff --git a/includes/common.inc b/includes/common.inc
index fa6eae77c..2e8ef3010 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -3631,10 +3631,6 @@ function drupal_common_theme() {
'arguments' => array('title' => NULL, 'content' => NULL, 'region' => 'main'),
'template' => 'box',
),
- 'block' => array(
- 'arguments' => array('block' => NULL),
- 'template' => 'block',
- ),
'mark' => array(
'arguments' => array('type' => MARK_NEW),
),
diff --git a/includes/theme.inc b/includes/theme.inc
index 0e001863f..4189cdaed 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2027,35 +2027,3 @@ function template_preprocess_node(&$variables) {
$variables += field_attach_preprocess('node', $node);
}
-/**
- * Process variables for block.tpl.php
- *
- * Prepare the values passed to the theme_block function to be passed
- * into a pluggable template engine. Uses block properties to generate a
- * series of template file suggestions. If none are found, the default
- * block.tpl.php is used.
- *
- * Most themes utilize their own copy of block.tpl.php. The default is located
- * inside "modules/system/block.tpl.php". Look in there for the full list of
- * variables.
- *
- * The $variables array contains the following arguments:
- * - $block
- *
- * @see block.tpl.php
- */
-function template_preprocess_block(&$variables) {
- static $block_counter = array();
- $variables['block'] = $variables['block']['#block'];
- // All blocks get an independent counter for each region.
- if (!isset($block_counter[$variables['block']->region])) {
- $block_counter[$variables['block']->region] = 1;
- }
- // Same with zebra striping.
- $variables['block_zebra'] = ($block_counter[$variables['block']->region] % 2) ? 'odd' : 'even';
- $variables['block_id'] = $block_counter[$variables['block']->region]++;
-
- $variables['template_files'][] = 'block-' . $variables['block']->region;
- $variables['template_files'][] = 'block-' . $variables['block']->module;
- $variables['template_files'][] = 'block-' . $variables['block']->module . '-' . $variables['block']->delta;
-}
diff --git a/modules/block/block.module b/modules/block/block.module
index 727f526b5..a933fbf30 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -92,6 +92,10 @@ function block_help($path, $arg) {
*/
function block_theme() {
return array(
+ 'block' => array(
+ 'arguments' => array('block' => NULL),
+ 'template' => 'block',
+ ),
'block_admin_display_form' => array(
'template' => 'block-admin-display-form',
'file' => 'block.admin.inc',
@@ -728,3 +732,36 @@ function _block_get_cache_id($block) {
function block_flush_caches() {
return array('cache_block');
}
+
+/**
+ * Process variables for block.tpl.php
+ *
+ * Prepare the values passed to the theme_block function to be passed
+ * into a pluggable template engine. Uses block properties to generate a
+ * series of template file suggestions. If none are found, the default
+ * block.tpl.php is used.
+ *
+ * Most themes utilize their own copy of block.tpl.php. The default is located
+ * inside "modules/block/block.tpl.php". Look in there for the full list of
+ * variables.
+ *
+ * The $variables array contains the following arguments:
+ * - $block
+ *
+ * @see block.tpl.php
+ */
+function template_preprocess_block(&$variables) {
+ static $block_counter = array();
+ $variables['block'] = $variables['block']['#block'];
+ // All blocks get an independent counter for each region.
+ if (!isset($block_counter[$variables['block']->region])) {
+ $block_counter[$variables['block']->region] = 1;
+ }
+ // Same with zebra striping.
+ $variables['block_zebra'] = ($block_counter[$variables['block']->region] % 2) ? 'odd' : 'even';
+ $variables['block_id'] = $block_counter[$variables['block']->region]++;
+
+ $variables['template_files'][] = 'block-' . $variables['block']->region;
+ $variables['template_files'][] = 'block-' . $variables['block']->module;
+ $variables['template_files'][] = 'block-' . $variables['block']->module . '-' . $variables['block']->delta;
+} \ No newline at end of file
diff --git a/modules/system/block.tpl.php b/modules/block/block.tpl.php
index 459a94034..459a94034 100644
--- a/modules/system/block.tpl.php
+++ b/modules/block/block.tpl.php