Index: themes/engines/phptemplate/phptemplate.engine
===================================================================
RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v
retrieving revision 1.22
diff -u -r1.22 phptemplate.engine
--- themes/engines/phptemplate/phptemplate.engine	3 Nov 2005 19:40:36 -0000	1.22
+++ themes/engines/phptemplate/phptemplate.engine	24 Dec 2005 22:40:10 -0000
@@ -279,8 +279,11 @@
  * Prepare the values passed to the theme_block function to be passed
  * into a pluggable template engine.
  */
-function phptemplate_block($block) {
-  return _phptemplate_callback('block', array('block' => $block));
+function phptemplate_block($block, $region = '') {
+  return _phptemplate_callback('block', array(
+    'block' => $block,
+    'region' => $region
+  ));
 }
 
 /**
@@ -315,7 +318,10 @@
     $file = path_to_theme() . "/$file.tpl.php";
   }
   else {
-    if (file_exists(path_to_theme() . "/$hook.tpl.php")) {
+    if ($variables['region'] && file_exists(path_to_theme() . "/{$variables['region']}_$hook.tpl.php")) {
+      $file = path_to_theme() . "/{$variables['region']}_$hook.tpl.php";
+    }
+    elseif (file_exists(path_to_theme() . "/$hook.tpl.php")) {
       $file = path_to_theme() . "/$hook.tpl.php";
     }
     else {
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.267
diff -u -r1.267 theme.inc
--- includes/theme.inc	10 Dec 2005 19:26:47 -0000	1.267
+++ includes/theme.inc	24 Dec 2005 22:16:12 -0000
@@ -916,7 +916,7 @@
   if ($list = module_invoke('block', 'list', $region)) {
     foreach ($list as $key => $block) {
       // $key == <i>module</i>_<i>delta</i>
-      $output .= theme('block', $block);
+      $output .= theme('block', $block, $region);
     }
   }
 
