summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.module8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 67990084c..f7cafdbd5 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -3222,9 +3222,11 @@ class NodeController extends DrupalDefaultEntityController {
// object type specific callback.
$typed_nodes = array();
foreach ($nodes as $id => $object) {
- if (isset($object->title)) {
- $object->title = array(FIELD_LANGUAGE_NONE => array(array('value' => $object->title)));
- }
+ // The value loaded in $object->title is the one stored in {node}.title,
+ // which is used for building list queries. By unsetting it here, we
+ // allow DrupalDefaultEntityController:attachLoad() to populate it along
+ // with all the other field values for consistency.
+ unset($object->title);
$typed_nodes[$object->type][$id] = $object;
}