summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-09 19:02:11 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-09 19:02:11 +0000
commit76f35b4ecf1d32573dc126a4914c1e6ef34c3cfc (patch)
treea12e22f795a55f248766b8bc0e8395dc27d18846 /modules
parente217837372494116fd55b29be985049dee0fd0b1 (diff)
downloadbrdo-76f35b4ecf1d32573dc126a4914c1e6ef34c3cfc.tar.gz
brdo-76f35b4ecf1d32573dc126a4914c1e6ef34c3cfc.tar.bz2
- Patch #367525 by zzolo: drupal_alter instead of hook_field_attach_view().
Diffstat (limited to 'modules')
-rw-r--r--modules/field/field.api.php2
-rw-r--r--modules/field/field.attach.inc7
2 files changed, 3 insertions, 6 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index f2da46c45..7971899b8 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -586,7 +586,7 @@ function hook_field_attach_delete_revision($obj_type, $object) {
* @param $teaser
* Whether to display the teaser only, as on the main page.
*/
-function hook_field_attach_view($output, $obj_type, $object, $teaser) {
+function hook_field_attach_view_alter($output, $obj_type, $object, $teaser) {
}
/**
diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc
index c10f85085..a6fbdf0a9 100644
--- a/modules/field/field.attach.inc
+++ b/modules/field/field.attach.inc
@@ -102,7 +102,7 @@ define('FIELD_STORAGE_INSERT', 'insert');
* for any object after the operation is complete, and access or
* modify all the field, form, or display data for that object and
* operation. For example, field_attach_view() invokes
- * hook_field_attach_view(). These all-module hooks are distinct from
+ * hook_field_attach_view_alter(). These all-module hooks are distinct from
* those of the Field Types API, such as hook_field_load(), that are
* only invoked for the module that defines a specific field type.
*
@@ -636,10 +636,7 @@ function _field_attach_view($obj_type, &$object, $teaser = FALSE) {
$output = _field_invoke_default('view', $obj_type, $object, $teaser);
// Let other modules make changes after rendering the view.
- foreach (module_implements('field_attach_view') as $module) {
- $function = $module . '_field_attach_view';
- $function($output, $obj_type, $object, $teaser);
- }
+ drupal_alter('field_attach_view', $output, $obj_type, $object, $teaser);
return $output;