diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index 7bc237c..bcfcf73 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -15,8 +15,11 @@ */ function node_views_data() { + // Define the base group of this table. Fields that don't + // have a group defined will go into this field by default. $data['node']['table']['group'] = t('Content'); + // Advertise this table as a possible base table $data['node']['table']['base'] = array( 'field' => 'nid', 'title' => t('Content'), @@ -49,6 +52,7 @@ function node_views_data() { ), ); + // This definition has more items in it than it needs to as an example. $data['node']['title'] = array( 'title' => t('Title'), 'help' => t('The content title.'), @@ -127,7 +131,7 @@ function node_views_data() { 'id' => 'boolean', 'label' => t('Published status'), 'type' => 'yes-no', - 'use_equal' => TRUE, + 'use_equal' => TRUE, // Use status = 1 instead of status <> 0 in WHERE statment ), 'sort' => array( 'id' => 'standard', @@ -212,6 +216,10 @@ function node_views_data() { ); } + // Define some fields based upon views_handler_field_entity in the entity + // table so they can be re-used with other query backends. + // @see views_handler_field_entity + $data['views_entity_node']['table']['group'] = t('Content'); $data['views_entity_node']['view_node'] = array( @@ -246,6 +254,7 @@ function node_views_data() { ), ); + // Bogus fields for aliasing purposes. $data['node']['created_fulldate'] = array( 'title' => t('Created date'), 'help' => t('Date in the form of CCYYMMDD.'), @@ -401,6 +410,7 @@ function node_views_data() { ), ); + // For other base tables, explain how we join $data['node_revision']['table']['join'] = array( 'node' => array( 'left_field' => 'vid', @@ -580,7 +590,7 @@ function node_views_data() { } /** - * Alter comments and links based on the settings in the row plugin. + * Implements hook_preprocess_node(). */ function node_row_node_view_preprocess_node(&$vars) { $node = $vars['node']; diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc index 1eadb0c..dec7b32 100644 --- a/core/modules/user/user.views.inc +++ b/core/modules/user/user.views.inc @@ -360,6 +360,8 @@ function user_views_data() { /** * Implements hook_views_query_substitutions(). + * + * Allow replacement of current userid so we can cache these queries */ function user_views_query_substitutions($view) { global $user;