diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-02-03 17:30:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-02-03 17:30:13 +0000 |
commit | 607e9626d5af265b18e8319b156bb0fda3445cd4 (patch) | |
tree | ece98d14e826d14a711c9b572e3f43a428b9a365 /includes | |
parent | d4867346f578906751f8ea0bd799c3fc1bfcbf48 (diff) | |
download | brdo-607e9626d5af265b18e8319b156bb0fda3445cd4.tar.gz brdo-607e9626d5af265b18e8319b156bb0fda3445cd4.tar.bz2 |
- Patch #361683by Barry, Yves, Karen, Moshe Weitzman, David Strauss, floriant, chx, David Rothstein: initial field API patch. More work to be done, but ... oh my!
Diffstat (limited to 'includes')
-rw-r--r-- | includes/install.inc | 6 | ||||
-rw-r--r-- | includes/theme.inc | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/includes/install.inc b/includes/install.inc index 959e4e006..f2721aa1d 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -490,8 +490,10 @@ function drupal_verify_profile($profile, $locale) { * * @param $module_list * The modules to install. + * @param $disable_modules_installed_hook + * Normally just testing wants to set this to TRUE. */ -function drupal_install_modules($module_list = array()) { +function drupal_install_modules($module_list = array(), $disable_modules_installed_hook = FALSE) { $files = module_rebuild_cache(); $module_list = array_flip(array_values($module_list)); do { @@ -511,7 +513,7 @@ function drupal_install_modules($module_list = array()) { asort($module_list); $module_list = array_keys($module_list); $modules_installed = array_filter($module_list, '_drupal_install_module'); - if (!empty($modules_installed)) { + if (!$disable_modules_installed_hook && !empty($modules_installed)) { module_invoke_all('modules_installed', $modules_installed); } module_enable($module_list); diff --git a/includes/theme.inc b/includes/theme.inc index b77e35854..57989cc5b 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -624,7 +624,9 @@ function theme() { } if (isset($info['function'])) { // The theme call is a function. - $output = call_user_func_array($info['function'], $args); + if (drupal_function_exists($info['function'])) { + $output = call_user_func_array($info['function'], $args); + } } else { // The theme call is a template. @@ -2004,7 +2006,11 @@ function template_preprocess_node(&$variables) { } // Clean up name so there are no underscores. $variables['template_files'][] = 'node-' . str_replace('_', '-', $node->type); - $variables['template_files'][] = 'node-' . $node->nid; + $variables['template_files'][] = 'node-' . $node->nid;
+
+ // Add $FIELD_NAME_rendered variables for fields.
+ drupal_function_exists('field_attach_preprocess');
+ $variables += field_attach_preprocess('node', $node); } /** |