Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.961
diff -u -8 -p -r1.961 common.inc
--- includes/common.inc	15 Aug 2009 06:20:20 -0000	1.961
+++ includes/common.inc	15 Aug 2009 09:46:20 -0000
@@ -4224,17 +4224,17 @@ function drupal_common_theme() {
     ),
     'page' => array(
       'arguments' => array('page' => NULL),
       'template' => 'page',
     ),
     'maintenance_page' => array(
       'arguments' => array('content' => NULL, 'show_blocks' => TRUE, 'show_messages' => TRUE),
       'template' => 'maintenance-page',
-      'path' => 'includes',
+      'file path' => 'includes',
       'file' => 'theme.maintenance.inc',
     ),
     'update_page' => array(
       'arguments' => array('content' => NULL, 'show_messages' => TRUE),
     ),
     'install_page' => array(
       'arguments' => array('content' => NULL),
     ),
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.504
diff -u -8 -p -r1.504 theme.inc
--- includes/theme.inc	13 Aug 2009 03:05:54 -0000	1.504
+++ includes/theme.inc	15 Aug 2009 09:46:20 -0000
@@ -264,33 +264,36 @@ function drupal_theme_rebuild() {
 /**
  * Process a single implementation of hook_theme().
  *
  * @param $cache
  *   The theme registry that will eventually be cached; It is an associative
  *   array keyed by theme hooks, whose values are associative arrays describing
  *   the hook:
  *   - 'type': The passed in $type.
- *   - 'theme path': The passed in $path.
+ *   - 'arguments': The arguments for this theme hook as defined in
+ *     hook_theme(). If there is more than one implementation and 'arguments' is
+ *     not specified in a later one, then the previous definition is kept.
  *   - 'function': The name of the function generating output for this theme
  *     hook. Either defined explicitly in hook_theme() or, if neither 'function'
  *     nor 'template' is defined, then the default theme function name is used.
  *     The default theme function name is the theme hook prefixed by either
  *     'theme_' for modules or '$name_' for everything else. If 'function' is
  *     defined, 'template' is not used.
- *   - 'template': The filename of the template generating output for this
- *     theme hook. The template is in the directory defined by the 'path' key of
- *     hook_theme() or defaults to $path.
- *   - 'arguments': The arguments for this theme hook as defined in
- *     hook_theme(). If there is more than one implementation and 'arguments' is
- *     not specified in a later one, then the previous definition is kept.
+ *   - 'file': The file that will be included prior to the theme being rendered.
+ *     The path is relative to the Drupal root directory.
+ *   - 'template': The path of the template file generating output for this
+ *     theme hook. The template is in the directory defined by the 'theme path'
+ *     key of hook_theme() if present, or $path. The path is relative to the
+ *     Drupal root directory.
+ *   - 'theme path': The directory containing 'template'.
  *   - 'theme paths': The paths where implementations of a theme hook can be
  *     found. Its definition is similarly inherited like 'arguments'. Each time
  *     _theme_process_registry() is called for this theme hook, either the
- *     'path' key from hook_theme() (if defined) or $path is added.
+ *     'theme path' key from hook_theme() (if defined) or $path is added.
  *   - 'preprocess functions': See theme() for detailed documentation.
  *   - 'process functions': See theme() for detailed documentation.
  * @param $name
  *   The name of the module, theme engine, base theme engine, theme or base
  *   theme implementing hook_theme().
  * @param $type
  *   One of 'module', 'theme_engine', 'base_theme_engine', 'theme', or
  *   'base_theme'. Unlike regular hooks that can only be implemented by modules,
@@ -300,17 +303,16 @@ function drupal_theme_rebuild() {
  *   definition in the theme will be used.
  * @param $theme
  *   The loaded $theme object as returned from list_themes().
  * @param $path
  *   The directory where $name is. For example, modules/system or
  *   themes/garland.
  *
  * @see theme()
- * @see _theme_process_registry()
  * @see hook_theme()
  * @see list_themes()
  */
 function _theme_process_registry(&$cache, $name, $type, $theme, $path) {
   $result = array();
   $function = $name . '_theme';
 
   // Template functions work in two distinct phases with the process
@@ -320,56 +322,64 @@ function _theme_process_registry(&$cache
     'process functions'    => 'process',
   );
 
   if (function_exists($function)) {
     $result = $function($cache, $type, $theme, $path);
 
     foreach ($result as $hook => $info) {
       $result[$hook]['type'] = $type;
-      $result[$hook]['theme path'] = $path;
-      // if function and file are left out, default to standard naming
+
+      // If function and file are left out, default to standard naming
       // conventions.
       if (!isset($info['template']) && !isset($info['function'])) {
         $result[$hook]['function'] = ($type == 'module' ? 'theme_' : $name . '_') . $hook;
       }
-      // If a path is set in the info, use what was set. Otherwise use the
-      // default path. This is mostly so system.module can declare theme
-      // functions on behalf of core .include files.
-      // All files are included to be safe. Conditionally included
-      // files can prevent them from getting registered.
-      if (isset($info['file']) && !isset($info['path'])) {
-        $result[$hook]['file'] = $path . '/' . $info['file'];
+
+      if (isset($info['file'])) {
+        // Generate path relative to the Drupal root directory. The default
+        // path may be overridden using $info['file path'].
+        if (isset($info['file path'])) {
+          $result[$hook]['file'] = $info['file path'] . '/' . $info['file'];
+        }
+        else {
+          $result[$hook]['file'] = $path . '/' . $info['file'];
+        }
+        // All files are included to be safe. Conditionally included
+        // files can prevent them from getting registered.
         include_once DRUPAL_ROOT . '/' . $result[$hook]['file'];
       }
-      elseif (isset($info['file']) && isset($info['path'])) {
-        include_once DRUPAL_ROOT . '/' . $info['path'] . '/' . $info['file'];
+
+      // Generate path relative to the Drupal root directory. The default path
+      // may be overridden using $info['theme path'].
+      if (isset($info['theme path'])) {
+        $result[$hook]['theme path'] = $info['theme path'];
+      }
+      else {
+        $result[$hook]['theme path'] = $path;
       }
 
       // If 'arguments' have been defined previously, carry them forward.
       // This should happen if a theme overrides a Drupal defined theme
       // function, for example.
       if (!isset($info['arguments']) && isset($cache[$hook])) {
         $result[$hook]['arguments'] = $cache[$hook]['arguments'];
       }
 
       // The following apply only to theming hooks implemented as templates.
       if (isset($info['template'])) {
-        // Prepend the current theming path when none is set.
-        if (!isset($info['path'])) {
-          $result[$hook]['template'] = $path . '/' . $info['template'];
-        }
+        // Generate path relative to the Drupal root directory.
+        $result[$hook]['template'] = $result[$hook]['theme path'] . '/' . $info['template'];
 
         // These are used for template naming suggestions. Theme implementations
         // can occur in multiple paths. Suggestions should follow.
         if (!isset($info['theme paths']) && isset($cache[$hook])) {
           $result[$hook]['theme paths'] = $cache[$hook]['theme paths'];
         }
-        // Check for sub-directories.
-        $result[$hook]['theme paths'][] = isset($info['path']) ? $info['path'] : $path;
+        $result[$hook]['theme paths'][] = $result[$hook]['theme path'];
 
         foreach ($template_phases as $phase_key => $template_phase) {
           // Check for existing variable processors. Ensure arrayness.
           if (!isset($info[$phase_key]) || !is_array($info[$phase_key])) {
             $info[$phase_key] = array();
             $prefixes = array();
             if ($type == 'module') {
               // Default variable processor prefix.
@@ -710,21 +720,17 @@ function theme() {
   $info = $hooks[$hook];
   global $theme_path;
   $temp = $theme_path;
   // point path_to_theme() to the currently used theme path:
   $theme_path = $info['theme path'];
 
   // Include a file if the theme function or variable processor is held elsewhere.
   if (!empty($info['file'])) {
-    $include_file = $info['file'];
-    if (isset($info['path'])) {
-      $include_file = $info['path'] . '/' . $include_file;
-    }
-    include_once DRUPAL_ROOT . '/' . $include_file;
+    include_once DRUPAL_ROOT . '/' . $info['file'];
   }
   if (isset($info['function'])) {
     // The theme call is a function.
     if (drupal_function_exists($info['function'])) {
       // If a theme function that does not expect a renderable array is called
       // with a renderable array as the only argument (via drupal_render), then
       // we take the arguments from the properties of the renderable array. If
       // missing, use hook_theme() defaults.
@@ -797,19 +803,16 @@ function theme() {
     }
 
     if ($suggestions) {
       $template_file = drupal_discover_template($info['theme paths'], $suggestions, $extension);
     }
 
     if (empty($template_file)) {
       $template_file = $info['template'] . $extension;
-      if (isset($info['path'])) {
-        $template_file = $info['path'] . '/' . $template_file;
-      }
     }
     $output = $render_function($template_file, $variables);
   }
   // restore path_to_theme()
   $theme_path = $temp;
   return $output;
 }
 
@@ -977,17 +980,17 @@ function drupal_find_theme_templates($ca
       $template = substr($template, 0, $pos);
     }
     // Transform - in filenames to _ to match function naming scheme
     // for the purposes of searching.
     $hook = strtr($template, '-', '_');
     if (isset($cache[$hook])) {
       $templates[$hook] = array(
         'template' => $template,
-        'path' => dirname($file->filepath),
+        'theme path' => dirname($file->filepath),
       );
     }
     // Ensure that the pattern is maintained from base themes to its sub-themes.
     // Each sub-theme will have their templates scanned so the pattern must be
     // held for subsequent runs.
     if (isset($cache[$hook]['pattern'])) {
       $templates[$hook]['pattern'] = $cache[$hook]['pattern'];
     }
@@ -1003,17 +1006,17 @@ function drupal_find_theme_templates($ca
 
       $matches = preg_grep('/^' . $pattern . '/', $patterns);
       if ($matches) {
         foreach ($matches as $match) {
           $file = substr($match, 0, strpos($match, '.'));
           // Put the underscores back in for the hook name and register this pattern.
           $templates[strtr($file, '-', '_')] = array(
             'template' => $file,
-            'path' => dirname($files[$match]->filepath),
+            'theme path' => dirname($files[$match]->filepath),
             'arguments' => $info['arguments'],
           );
         }
       }
     }
   }
   return $templates;
 }
Index: modules/field/field.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.module,v
retrieving revision 1.22
diff -u -8 -p -r1.22 field.module
--- modules/field/field.module	11 Aug 2009 14:59:40 -0000	1.22
+++ modules/field/field.module	15 Aug 2009 09:46:20 -0000
@@ -168,17 +168,17 @@ function field_menu() {
  */
 function field_theme() {
   $path = drupal_get_path('module', 'field') . '/theme';
 
   return array(
     'field' => array(
       'template' => 'field',
       'arguments' => array('element' => NULL),
-      'path' => $path,
+      'theme path' => $path,
     ),
     'field_multiple_value_form' => array(
       'arguments' => array('element' => NULL),
     ),
   );
 }
 
 /**
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.61
diff -u -8 -p -r1.61 system.api.php
--- modules/system/system.api.php	12 Aug 2009 12:36:04 -0000	1.61
+++ modules/system/system.api.php	15 Aug 2009 09:46:20 -0000
@@ -596,66 +596,64 @@ function hook_permission() {
 
 /**
  * Register a module (or theme's) theme implementations.
  *
  * Modules and themes implementing this return an array of arrays. The key
  * to each sub-array is the internal name of the hook, and the array contains
  * info about the hook. Each array may contain the following items:
  *
- * - arguments: (required) An array of arguments that this theme hook uses. This
+ * - 'arguments': (required) An array of arguments that this theme hook uses. This
  *   value allows the theme layer to properly utilize templates. The
  *   array keys represent the name of the variable, and the value will be
  *   used as the default value if not specified to the theme() function.
  *   These arguments must be in the same order that they will be given to
  *   the theme() function.
- * - file: The file the implementation resides in. This file will be included
+ * - 'file': The file the implementation resides in. This file will be included
  *   prior to the theme being rendered, to make sure that the function or
  *   preprocess function (as needed) is actually loaded; this makes it possible
- *   to split theme functions out into separate files quite easily.
- * - path: Override the path of the file to be used. Ordinarily the module or
- *   theme path will be used, but if the file will not be in the default path,
- *   include it here. This path should be relative to the Drupal root
- *   directory.
- * - template: If specified, this theme implementation is a template, and this
+ *   to split theme functions out into separate files quite easily. If 'file
+ *   path' is specified, the file should be in this directory; otherwise it
+ *   should be in $path.
+ * - 'file path': The directory containing 'file', if this is different from
+ *   $path. This path should be relative to the Drupal root directory.
+ * - 'template': If specified, this theme implementation is a template, and this
  *   is the template file <b>without an extension</b>. Do not put .tpl.php
  *   on this file; that extension will be added automatically by the default
- *   rendering engine (which is PHPTemplate). If 'path', above, is specified,
- *   the template should also be in this path.
- * - function: If specified, this will be the function name to invoke for this
+ *   rendering engine (which is PHPTemplate). If 'theme path' is specified, the
+ *   the template should be in this directory; otherwise it should be in $path.
+ * - 'theme path': The directory containing 'template', if this is different from
+ *   $path. This path should be relative to the Drupal root directory.
+ * - 'theme paths': An array of other directories that may contain 'template'.
+ *   The paths should be relative to the Drupal root directory.
+ * - 'function': If specified, this will be the function name to invoke for this
  *   implementation. If neither file nor function is specified, a default
  *   function name will be assumed. For example, if a module registers
  *   the 'node' theme hook, 'theme_node' will be assigned to its function.
  *   If the chameleon theme registers the node hook, it will be assigned
  *   'chameleon_node' as its function.
- * - pattern: A regular expression pattern to be used to allow this theme
+ * - 'pattern': A regular expression pattern to be used to allow this theme
  *   implementation to have a dynamic name. The convention is to use __ to
  *   differentiate the dynamic portion of the theme. For example, to allow
  *   forums to be themed individually, the pattern might be: 'forum__'. Then,
- *   when the forum is themed, call: <code>theme(array('forum__' . $tid, 'forum'),
- *   $forum)</code>.
- * - preprocess functions: A list of functions used to preprocess this data.
+ *   when the forum is themed, call: <code>theme(array('forum__' . $tid,
+ *   'forum'), $forum)</code>.
+ * - 'preprocess functions': A list of functions used to preprocess this data.
  *   Ordinarily this won't be used; it's automatically filled in. By default,
  *   for a module this will be filled in as template_preprocess_HOOK. For
  *   a theme this will be filled in as phptemplate_preprocess and
  *   phptemplate_preprocess_HOOK as well as themename_preprocess and
  *   themename_preprocess_HOOK.
- * - override preprocess functions: Set to TRUE when a theme does NOT want the
+ * - 'override preprocess functions': Set to TRUE when a theme does NOT want the
  *   standard preprocess functions to run. This can be used to give a theme
  *   FULL control over how variables are set. For example, if a theme wants
  *   total control over how certain variables in the page.tpl.php are set,
  *   this can be set to true. Please keep in mind that when this is used
  *   by a theme, that theme becomes responsible for making sure necessary
  *   variables are set.
- * - type: (automatically derived) Where the theme hook is defined:
- *   'module', 'theme_engine', or 'theme'.
- * - theme path: (automatically derived) The directory path of the theme or
- *   module, so that it doesn't need to be looked up.
- * - theme paths: (automatically derived) An array of template suggestions where
- *   .tpl.php files related to this theme hook may be found.
  *
  * The following parameters are all optional.
  *
  * @param $existing
  *   An array of existing implementations that may be used for override
  *   purposes. This is primarily useful for themes that may wish to examine
  *   existing implementations to extract data (such as arguments) so that
  *   it may properly register its own, higher priority implementations.
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.5
diff -u -8 -p -r1.5 toolbar.module
--- modules/toolbar/toolbar.module	14 Aug 2009 15:30:59 -0000	1.5
+++ modules/toolbar/toolbar.module	15 Aug 2009 09:46:20 -0000
@@ -20,17 +20,16 @@ function toolbar_permission() {
 
 /**
  * Implement hook_theme().
  */
 function toolbar_theme($existing, $type, $theme, $path) {
   $items['toolbar'] = array(
     'arguments' => array('toolbar' => array()),
     'template' => 'toolbar',
-    'path' => drupal_get_path('module', 'toolbar'),
   );
   return $items;
 }
 
 /**
  * Implement hook_page_alter().
  * 
  * Add admin toolbar to the page_top region automatically.
