• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

modules/node.views.inc

Go to the documentation of this file.
00001 <?php
00017 function node_views_data() {
00018   // ----------------------------------------------------------------
00019   // node table -- basic table information.
00020 
00021   // Define the base group of this table. Fields that don't
00022   // have a group defined will go into this field by default.
00023   $data['node']['table']['group'] = t('Content');
00024 
00025   // Advertise this table as a possible base table
00026   $data['node']['table']['base'] = array(
00027     'field' => 'nid',
00028     'title' => t('Content'),
00029     'weight' => -10,
00030     'access query tag' => 'node_access',
00031     'defaults' => array(
00032       'field' => 'title',
00033     ),
00034   );
00035   $data['node']['table']['entity type'] = 'node';
00036 
00037 
00038   // For other base tables, explain how we join
00039   $data['node']['table']['join'] = array(
00040     // this explains how the 'node' table (named in the line above)
00041     // links toward the node_revision table.
00042     'node_revision' => array(
00043       'handler' => 'views_join', // this is actually optional
00044       'left_table' => 'node_revision', // Because this is a direct link it could be left out.
00045       'left_field' => 'nid',
00046       'field' => 'nid',
00047       // also supported:
00048       // 'type' => 'INNER',
00049       // 'extra' => array(array('field' => 'fieldname', 'value' => 'value', 'operator' => '='))
00050       //   Unfortunately, you can't specify other tables here, but you can construct
00051       //   alternative joins in the handlers that can do that.
00052       // 'table' => 'the actual name of this table in the database',
00053      ),
00054   );
00055 
00056   // ----------------------------------------------------------------
00057   // node table -- fields
00058 
00059   // nid
00060   $data['node']['nid'] = array(
00061     'title' => t('Nid'),
00062     'help' => t('The node ID.'), // The help that appears on the UI,
00063     // Information for displaying the nid
00064     'field' => array(
00065       'handler' => 'views_handler_field_node',
00066       'click sortable' => TRUE,
00067     ),
00068     // Information for accepting a nid as an argument
00069     'argument' => array(
00070       'handler' => 'views_handler_argument_node_nid',
00071       'name field' => 'title', // the field to display in the summary.
00072       'numeric' => TRUE,
00073       'validate type' => 'nid',
00074     ),
00075     // Information for accepting a nid as a filter
00076     'filter' => array(
00077       'handler' => 'views_handler_filter_numeric',
00078     ),
00079     // Information for sorting on a nid.
00080     'sort' => array(
00081       'handler' => 'views_handler_sort',
00082     ),
00083   );
00084 
00085   // title
00086   // This definition has more items in it than it needs to as an example.
00087   $data['node']['title'] = array(
00088     'title' => t('Title'), // The item it appears as on the UI,
00089     'help' => t('The content title.'), // The help that appears on the UI,
00090      // Information for displaying a title as a field
00091     'field' => array(
00092       'field' => 'title', // the real field. This could be left out since it is the same.
00093       'group' => t('Content'), // The group it appears in on the UI. Could be left out.
00094       'handler' => 'views_handler_field_node',
00095       'click sortable' => TRUE,
00096       'link_to_node default' => TRUE,
00097      ),
00098     'sort' => array(
00099       'handler' => 'views_handler_sort',
00100     ),
00101     // Information for accepting a title as a filter
00102     'filter' => array(
00103       'handler' => 'views_handler_filter_string',
00104     ),
00105     'argument' => array(
00106       'handler' => 'views_handler_argument_string',
00107     ),
00108   );
00109 
00110   // created field
00111   $data['node']['created'] = array(
00112     'title' => t('Post date'), // The item it appears as on the UI,
00113     'help' => t('The date the content was posted.'), // The help that appears on the UI,
00114     'field' => array(
00115       'handler' => 'views_handler_field_date',
00116       'click sortable' => TRUE,
00117     ),
00118     'sort' => array(
00119       'handler' => 'views_handler_sort_date',
00120     ),
00121     'filter' => array(
00122       'handler' => 'views_handler_filter_date',
00123     ),
00124   );
00125 
00126   // changed field
00127   $data['node']['changed'] = array(
00128     'title' => t('Updated date'), // The item it appears as on the UI,
00129     'help' => t('The date the content was last updated.'), // The help that appears on the UI,
00130     'field' => array(
00131       'handler' => 'views_handler_field_date',
00132       'click sortable' => TRUE,
00133     ),
00134     'sort' => array(
00135       'handler' => 'views_handler_sort_date',
00136     ),
00137     'filter' => array(
00138       'handler' => 'views_handler_filter_date',
00139     ),
00140   );
00141 
00142   // Content type
00143   $data['node']['type'] = array(
00144     'title' => t('Type'), // The item it appears as on the UI,
00145     'help' => t('The content type (for example, "blog entry", "forum post", "story", etc).'), // The help that appears on the UI,
00146     'field' => array(
00147       'handler' => 'views_handler_field_node_type',
00148       'click sortable' => TRUE,
00149     ),
00150     'sort' => array(
00151       'handler' => 'views_handler_sort',
00152     ),
00153     'filter' => array(
00154       'handler' => 'views_handler_filter_node_type',
00155     ),
00156     'argument' => array(
00157       'handler' => 'views_handler_argument_node_type',
00158     ),
00159   );
00160 
00161   // published status
00162   $data['node']['status'] = array(
00163     'title' => t('Published'),
00164     'help' => t('Whether or not the content is published.'),
00165     'field' => array(
00166       'handler' => 'views_handler_field_boolean',
00167       'click sortable' => TRUE,
00168       'output formats' => array(
00169         'published-notpublished' => array(t('Published'), t('Not published')),
00170       ),
00171     ),
00172     'filter' => array(
00173       'handler' => 'views_handler_filter_boolean_operator',
00174       'label' => t('Published'),
00175       'type' => 'yes-no',
00176       'use equal' => TRUE, // Use status = 1 instead of status <> 0 in WHERE statment
00177     ),
00178     'sort' => array(
00179       'handler' => 'views_handler_sort',
00180     ),
00181   );
00182 
00183   // published status + extra
00184   $data['node']['status_extra'] = array(
00185     'title' => t('Published or admin'),
00186     'help' => t('Filters out unpublished content if the current user cannot view it.'),
00187     'filter' => array(
00188       'field' => 'status',
00189       'handler' => 'views_handler_filter_node_status',
00190       'label' => t('Published or admin'),
00191     ),
00192   );
00193 
00194   // promote status
00195   $data['node']['promote'] = array(
00196     'title' => t('Promoted to front page'),
00197     'help' => t('Whether or not the content is promoted to the front page.'),
00198     'field' => array(
00199       'handler' => 'views_handler_field_boolean',
00200       'click sortable' => TRUE,
00201       'output formats' => array(
00202         'promoted-notpromoted' => array(t('Promoted'), t('Not promoted')),
00203       ),
00204     ),
00205     'filter' => array(
00206       'handler' => 'views_handler_filter_boolean_operator',
00207       'label' => t('Promoted to front page'),
00208       'type' => 'yes-no',
00209     ),
00210     'sort' => array(
00211       'handler' => 'views_handler_sort',
00212     ),
00213   );
00214 
00215   // sticky
00216   $data['node']['sticky'] = array(
00217     'title' => t('Sticky'), // The item it appears as on the UI,
00218     'help' => t('Whether or not the content is sticky.'), // The help that appears on the UI,
00219      // Information for displaying a title as a field
00220     'field' => array(
00221       'handler' => 'views_handler_field_boolean',
00222       'click sortable' => TRUE,
00223       'output formats' => array(
00224         'sticky' => array(t('Sticky'), ''),
00225       ),
00226     ),
00227     'filter' => array(
00228       'handler' => 'views_handler_filter_boolean_operator',
00229       'label' => t('Sticky'),
00230       'type' => 'yes-no',
00231     ),
00232     'sort' => array(
00233       'handler' => 'views_handler_sort',
00234       'help' => t('Whether or not the content is sticky. To list sticky content first, set this to descending.'),
00235     ),
00236   );
00237 
00238   // Define some fields based upon views_handler_field_entity in the entity
00239   // table so they can be re-used with other query backends.
00240   // @see views_handler_field_entity
00241 
00242   $data['node']['view_node']['moved to'] = array('views_entity_node', 'view_node');
00243   $data['views_entity_node']['view_node'] = array(
00244     'field' => array(
00245       'title' => t('Link'),
00246       'help' => t('Provide a simple link to the content.'),
00247       'handler' => 'views_handler_field_node_link',
00248     ),
00249   );
00250 
00251   $data['node']['edit_node']['moved to'] = array('views_entity_node', 'edit_node');
00252   $data['views_entity_node']['edit_node'] = array(
00253     'field' => array(
00254       'title' => t('Edit link'),
00255       'help' => t('Provide a simple link to edit the content.'),
00256       'handler' => 'views_handler_field_node_link_edit',
00257     ),
00258   );
00259 
00260   $data['node']['delete_node']['moved to'] = array('views_entity_node', 'delete_node');
00261   $data['views_entity_node']['delete_node'] = array(
00262     'field' => array(
00263       'title' => t('Delete link'),
00264       'help' => t('Provide a simple link to delete the content.'),
00265       'handler' => 'views_handler_field_node_link_delete',
00266     ),
00267   );
00268 
00269   $data['node']['path'] = array(
00270     'field' => array(
00271       'title' => t('Path'),
00272       'help' => t('The aliased path to this content.'),
00273       'handler' => 'views_handler_field_node_path',
00274     ),
00275   );
00276 
00277 
00278   // Bogus fields for aliasing purposes.
00279 
00280   $data['node']['created_fulldate'] = array(
00281     'title' => t('Created date'),
00282     'help' => t('Date in the form of CCYYMMDD.'),
00283     'argument' => array(
00284       'field' => 'created',
00285       'handler' => 'views_handler_argument_node_created_fulldate',
00286     ),
00287   );
00288 
00289   $data['node']['created_year_month'] = array(
00290     'title' => t('Created year + month'),
00291     'help' => t('Date in the form of YYYYMM.'),
00292     'argument' => array(
00293       'field' => 'created',
00294       'handler' => 'views_handler_argument_node_created_year_month',
00295     ),
00296   );
00297 
00298   $data['node']['created_year'] = array(
00299     'title' => t('Created year'),
00300     'help' => t('Date in the form of YYYY.'),
00301     'argument' => array(
00302       'field' => 'created',
00303       'handler' => 'views_handler_argument_node_created_year',
00304     ),
00305   );
00306 
00307   $data['node']['created_month'] = array(
00308     'title' => t('Created month'),
00309     'help' => t('Date in the form of MM (01 - 12).'),
00310     'argument' => array(
00311       'field' => 'created',
00312       'handler' => 'views_handler_argument_node_created_month',
00313     ),
00314   );
00315 
00316   $data['node']['created_day'] = array(
00317     'title' => t('Created day'),
00318     'help' => t('Date in the form of DD (01 - 31).'),
00319     'argument' => array(
00320       'field' => 'created',
00321       'handler' => 'views_handler_argument_node_created_day',
00322     ),
00323   );
00324 
00325   $data['node']['created_week'] = array(
00326     'title' => t('Created week'),
00327     'help' => t('Date in the form of WW (01 - 53).'),
00328     'argument' => array(
00329       'field' => 'created',
00330       'handler' => 'views_handler_argument_node_created_week',
00331     ),
00332   );
00333 
00334   $data['node']['changed_fulldate'] = array(
00335     'title' => t('Updated date'),
00336     'help' => t('Date in the form of CCYYMMDD.'),
00337     'argument' => array(
00338       'field' => 'changed',
00339       'handler' => 'views_handler_argument_node_created_fulldate',
00340     ),
00341   );
00342 
00343   $data['node']['changed_year_month'] = array(
00344     'title' => t('Updated year + month'),
00345     'help' => t('Date in the form of YYYYMM.'),
00346     'argument' => array(
00347       'field' => 'changed',
00348       'handler' => 'views_handler_argument_node_created_year_month',
00349     ),
00350   );
00351 
00352   $data['node']['changed_year'] = array(
00353     'title' => t('Updated year'),
00354     'help' => t('Date in the form of YYYY.'),
00355     'argument' => array(
00356       'field' => 'changed',
00357       'handler' => 'views_handler_argument_node_created_year',
00358     ),
00359   );
00360 
00361   $data['node']['changed_month'] = array(
00362     'title' => t('Updated month'),
00363     'help' => t('Date in the form of MM (01 - 12).'),
00364     'argument' => array(
00365       'field' => 'changed',
00366       'handler' => 'views_handler_argument_node_created_month',
00367     ),
00368   );
00369 
00370   $data['node']['changed_day'] = array(
00371     'title' => t('Updated day'),
00372     'help' => t('Date in the form of DD (01 - 31).'),
00373     'argument' => array(
00374       'field' => 'changed',
00375       'handler' => 'views_handler_argument_node_created_day',
00376     ),
00377   );
00378 
00379   $data['node']['changed_week'] = array(
00380     'title' => t('Updated week'),
00381     'help' => t('Date in the form of WW (01 - 53).'),
00382     'argument' => array(
00383       'field' => 'changed',
00384       'handler' => 'views_handler_argument_node_created_week',
00385     ),
00386   );
00387 
00388   // uid field
00389   $data['node']['uid'] = array(
00390     'title' => t('Author uid'),
00391     'help' => t('The user authoring the content. If you need more fields than the uid add the content: author relationship'),
00392     'relationship' => array(
00393       'title' => t('Author'),
00394       'help' => t('Relate content to the user who created it.'),
00395       'handler' => 'views_handler_relationship',
00396       'base' => 'users',
00397       'field' => 'uid',
00398       'label' => t('author'),
00399     ),
00400     'filter' => array(
00401       'handler' => 'views_handler_filter_user_name',
00402     ),
00403     'argument' => array(
00404       'handler' => 'views_handler_argument_numeric',
00405     ),
00406     'field' => array(
00407       'handler' => 'views_handler_field_user',
00408     ),
00409   );
00410 
00411   $data['node']['uid_revision'] = array(
00412     'title' => t('User has a revision'),
00413     'help' => t('All nodes where a certain user has a revision'),
00414     'real field' => 'nid',
00415     'filter' => array(
00416       'handler' => 'views_handler_filter_node_uid_revision',
00417     ),
00418     'argument' => array(
00419       'handler' => 'views_handler_argument_node_uid_revision',
00420     ),
00421   );
00422 
00423   // ----------------------------------------------------------------------
00424   // Content revision table
00425 
00426   // Define the base group of this table. Fields that don't
00427   // have a group defined will go into this field by default.
00428   $data['node_revisions']['moved to'] = 'node_revision';
00429   $data['node_revision']['table']['group']  = t('Content revision');
00430   // Support the conversion of the field body
00431   $data['node_revisions']['body']['moved to'] = array('field_revision_data', 'body-revision_id');
00432 
00433   // Advertise this table as a possible base table
00434   $data['node_revision']['table']['base'] = array(
00435     'field' => 'vid',
00436     'title' => t('Content revision'),
00437     'help' => t('Content revision is a history of changes to content.'),
00438     'defaults' => array(
00439       'field' => 'title',
00440     ),
00441   );
00442 
00443   // For other base tables, explain how we join
00444   $data['node_revision']['table']['join'] = array(
00445     // Directly links to node table.
00446     'node' => array(
00447       'left_field' => 'vid',
00448       'field' => 'vid',
00449     ),
00450   );
00451 
00452   // uid field for node revision
00453   $data['node_revision']['uid'] = array(
00454     'title' => t('User'),
00455     'help' => t('Relate a content revision to the user who created the revision.'),
00456     'relationship' => array(
00457       'handler' => 'views_handler_relationship',
00458       'base' => 'users',
00459       'base field' => 'uid',
00460       'label' => t('revision user'),
00461     ),
00462   );
00463 
00464   // nid
00465   $data['node_revision']['vid'] = array(
00466     'title' => t('Vid'),
00467     'help' => t('The revision ID of the content revision.'), // The help that appears on the UI,
00468     // Information for displaying the nid
00469     'field' => array(
00470       'click sortable' => TRUE,
00471     ),
00472     // Information for accepting a nid as an argument
00473     'argument' => array(
00474       'handler' => 'views_handler_argument_node_vid',
00475       'click sortable' => TRUE,
00476       'numeric' => TRUE,
00477     ),
00478     // Information for accepting a nid as a filter
00479     'filter' => array(
00480       'handler' => 'views_handler_filter_numeric',
00481     ),
00482     // Information for sorting on a nid.
00483     'sort' => array(
00484       'handler' => 'views_handler_sort',
00485     ),
00486     'relationship' => array(
00487       'handler' => 'views_handler_relationship',
00488       'base' => 'node',
00489       'base field' => 'vid',
00490       'title' => t('Content'),
00491       'label' => t('Get the actual content from a content revision.'),
00492     ),
00493   );
00494 
00495   // title
00496   $data['node_revision']['title'] = array(
00497     'title' => t('Title'), // The item it appears as on the UI,
00498     'help' => t('The content title.'), // The help that appears on the UI,
00499      // Information for displaying a title as a field
00500     'field' => array(
00501       'field' => 'title', // the real field
00502       'handler' => 'views_handler_field_node_revision',
00503       'click sortable' => TRUE,
00504      ),
00505     'sort' => array(
00506       'handler' => 'views_handler_sort',
00507     ),
00508     'filter' => array(
00509       'handler' => 'views_handler_filter_string',
00510     ),
00511     'argument' => array(
00512       'handler' => 'views_handler_argument_string',
00513     ),
00514   );
00515 
00516   // log field
00517   $data['node_revision']['log'] = array(
00518     'title' => t('Log message'), // The item it appears as on the UI,
00519     'help' => t('The log message entered when the revision was created.'), // The help that appears on the UI,
00520      // Information for displaying a title as a field
00521     'field' => array(
00522       'handler' => 'views_handler_field_xss',
00523      ),
00524     'filter' => array(
00525       'handler' => 'views_handler_filter_string',
00526     ),
00527   );
00528 
00529   // revision timestamp
00530   // changed field
00531   $data['node_revision']['timestamp'] = array(
00532     'title' => t('Updated date'), // The item it appears as on the UI,
00533     'help' => t('The date the node was last updated.'), // The help that appears on the UI,
00534     'field' => array(
00535       'handler' => 'views_handler_field_date',
00536       'click sortable' => TRUE,
00537     ),
00538     'sort' => array(
00539       'handler' => 'views_handler_sort_date',
00540     ),
00541     'filter' => array(
00542       'handler' => 'views_handler_filter_date',
00543     ),
00544   );
00545 
00546   $data['node_revision']['revert_revision'] = array(
00547     'field' => array(
00548       'title' => t('Revert link'),
00549       'help' => t('Provide a simple link to revert to the revision.'),
00550       'handler' => 'views_handler_field_node_revision_link_revert',
00551     ),
00552   );
00553 
00554   $data['node_revision']['delete_revision'] = array(
00555     'field' => array(
00556       'title' => t('Delete link'),
00557       'help' => t('Provide a simple link to delete the content revision.'),
00558       'handler' => 'views_handler_field_node_revision_link_delete',
00559     ),
00560   );
00561 
00562   // ----------------------------------------------------------------------
00563   // Node access table
00564 
00565   // Define the base group of this table. Fields that don't
00566   // have a group defined will go into this field by default.
00567   $data['node_access']['table']['group']  = t('Content access');
00568 
00569   // For other base tables, explain how we join
00570   $data['node_access']['table']['join'] = array(
00571     // Directly links to node table.
00572     'node' => array(
00573       'left_field' => 'nid',
00574       'field' => 'nid',
00575     ),
00576   );
00577   // nid field
00578   $data['node_access']['nid'] = array(
00579     'title' => t('Access'),
00580     'help' => t('Filter by access.'),
00581     'filter' => array(
00582       'handler' => 'views_handler_filter_node_access',
00583       'help' => t('Filter for content by view access. <strong>Not necessary if you are using node as your base table.</strong>'),
00584     ),
00585   );
00586 
00587   // ----------------------------------------------------------------------
00588   // History table
00589 
00590   // We're actually defining a specific instance of the table, so let's
00591   // alias it so that we can later add the real table for other purposes if we
00592   // need it.
00593   $data['history_user']['moved to'] = 'history';
00594   $data['history']['table']['group']  = t('Content');
00595 
00596   // Explain how this table joins to others.
00597   $data['history']['table']['join'] = array(
00598      // Directly links to node table.
00599     'node' => array(
00600       'table' => 'history',
00601       'left_field' => 'nid',
00602       'field' => 'nid',
00603       'extra' => array(
00604         array('field' => 'uid', 'value' => '***CURRENT_USER***', 'numeric' => TRUE),
00605       ),
00606     ),
00607   );
00608 
00609   $data['history']['timestamp'] = array(
00610     'title' => t('Has new content'),
00611     'field' => array(
00612       'handler' => 'views_handler_field_history_user_timestamp',
00613       'help' => t('Show a marker if the content is new or updated.'),
00614     ),
00615     'filter' => array(
00616       'help' => t('Show only content that is new or updated.'),
00617       'handler' => 'views_handler_filter_history_user_timestamp',
00618     ),
00619   );
00620   return $data;
00621 }
00622 
00626 function node_views_plugins() {
00627   return array(
00628     'module' => 'views', // This just tells our themes are elsewhere.
00629     'row' => array(
00630       'node' => array(
00631         'title' => t('Content'),
00632         'help' => t('Display the content with standard node view.'),
00633         'handler' => 'views_plugin_row_node_view',
00634         'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules
00635         'base' => array('node'), // only works with 'node' as base.
00636         'uses options' => TRUE,
00637         'type' => 'normal',
00638         'help topic' => 'style-node',
00639       ),
00640       'node_rss' => array(
00641         'title' => t('Content'),
00642         'help' => t('Display the content with standard node view.'),
00643         'handler' => 'views_plugin_row_node_rss',
00644         'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules
00645         'theme' => 'views_view_row_rss',
00646         'base' => array('node'), // only works with 'node' as base.
00647         'uses options' => TRUE,
00648         'type' => 'feed',
00649         'help topic' => 'style-node-rss',
00650       ),
00651     ),
00652     'argument validator' => array(
00653       'node' => array(
00654         'title' => t('Content'),
00655         'handler' => 'views_plugin_argument_validate_node',
00656       ),
00657     ),
00658     'argument default' => array(
00659       'node' => array(
00660         'title' => t('Content ID from URL'),
00661         'handler' => 'views_plugin_argument_default_node'
00662       ),
00663     ),
00664   );
00665 }
00666 
00670 function node_row_node_view_preprocess_node(&$vars) {
00671   $node = $vars['node'];
00672   $options = $vars['view']->style_plugin->row_plugin->options;
00673 
00674   // Prevent the comment form from showing up if this is not a page display.
00675   if ($vars['view_mode'] == 'full' && !$vars['view']->display_handler->has_path()) {
00676     $node->comment = FALSE;
00677   }
00678 
00679   if (!$options['links']) {
00680     unset($vars['content']['links']);
00681   }
00682 
00683   if (!empty($options['comments']) && user_access('access comments') && $node->comment) {
00684     $vars['content']['comments'] = comment_node_page_additions($node);
00685   }
00686 }
00687 
00691 function node_views_query_substitutions() {
00692   return array(
00693     '***ADMINISTER_NODES***' => intval(user_access('administer nodes')),
00694     '***VIEW_OWN_UNPUBLISHED_NODES***' => intval(user_access('view own unpublished content')),
00695     '***BYPASS_NODE_ACCESS***' =>  intval(user_access('bypass node access')),
00696   );
00697 }
00698 
00702 function node_views_analyze($view) {
00703   $ret = array();
00704   // Check for something other than the default display:
00705   if ($view->base_table == 'node') {
00706     foreach ($view->display as $id => $display) {
00707       if (empty($display->handler)) {
00708         continue;
00709       }
00710       if (!$display->handler->is_defaulted('access') || !$display->handler->is_defaulted('filters')) {
00711         // check for no access control
00712         $access = $display->handler->get_option('access');
00713         if (empty($access['type']) || $access['type'] == 'none') {
00714           $select = db_select('role', 'r');
00715           $select->innerJoin('role_permission', 'p', 'r.rid = p.rid');
00716           $result = $select->fields('r', array('name'))
00717             ->fields('p', array('permission'))
00718             ->condition('r.name', array('anonymous user', 'authenticated user'), 'IN')
00719             ->condition('p.permission', 'access content')
00720             ->execute();
00721 
00722           foreach ($result as $role) {
00723             $role->safe = TRUE;
00724             $roles[$role->name] = $role;
00725           }
00726           if (!($roles['anonymous user']->safe && $roles['authenticated user']->safe)) {
00727             $ret[] = views_ui_analysis(t('Some roles lack permission to access content, but display %display has no access control.', array('%display' => $display->display_title)), 'warning');
00728           }
00729           $filters = $display->handler->get_option('filters');
00730           foreach ($filters as $filter) {
00731             if ($filter['table'] == 'node' && ($filter['field'] == 'status' || $filter['field'] == 'status_extra')) {
00732               continue 2;
00733             }
00734           }
00735           $ret[] = views_ui_analysis(t('Display %display has no access control but does not contain a filter for published nodes.', array('%display' => $display->display_title)), 'warning');
00736         }
00737       }
00738     }
00739   }
00740   foreach ($view->display as $id => $display) {
00741     if ($display->display_plugin == 'page') {
00742       if ($display->handler->get_option('path') == 'node/%') {
00743         $ret[] = views_ui_analysis(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use panels.', array('%display' => $display->display_title)), 'warning');
00744       }
00745     }
00746   }
00747 
00748   return $ret;
00749 }
00750 

Generated on Sun Feb 26 2012 12:52:51 for Views by  doxygen 1.7.1