Mercurial > defr > drupal > core
diff modules/node/node.module @ 5:2427550111ae 6.2
Drupal 6.2
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:30:08 +0100 |
parents | 165d43f946a8 |
children | fff6d4c8c043 |
line wrap: on
line diff
--- a/modules/node/node.module Tue Dec 23 14:29:21 2008 +0100 +++ b/modules/node/node.module Tue Dec 23 14:30:08 2008 +0100 @@ -1,5 +1,5 @@ <?php -// $Id: node.module,v 1.947.2.3 2008/02/27 17:12:58 goba Exp $ +// $Id: node.module,v 1.947.2.6 2008/04/09 21:11:48 goba Exp $ /** * @file @@ -1150,7 +1150,7 @@ case 'status': $total = db_result(db_query('SELECT COUNT(*) FROM {node} WHERE status = 1')); - $remaining = db_result(db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0")); + $remaining = db_result(db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE n.status = 1 AND (d.sid IS NULL OR d.reindex <> 0)")); return array('remaining' => $remaining, 'total' => $total); case 'admin': @@ -1447,6 +1447,7 @@ 'title' => 'Add content type', 'page callback' => 'drupal_get_form', 'page arguments' => array('node_type_form'), + 'access arguments' => array('administer content types'), 'file' => 'content_types.inc', 'type' => MENU_LOCAL_TASK, ); @@ -1485,6 +1486,7 @@ 'title' => $type->name, 'page callback' => 'drupal_get_form', 'page arguments' => array('node_type_form', $type), + 'access arguments' => array('administer content types'), 'file' => 'content_types.inc', 'type' => MENU_CALLBACK, ); @@ -1495,6 +1497,7 @@ $items['admin/content/node-type/'. $type_url_str .'/delete'] = array( 'title' => 'Delete', 'page arguments' => array('node_type_delete_confirm', $type), + 'access arguments' => array('administer content types'), 'file' => 'content_types.inc', 'type' => MENU_CALLBACK, ); @@ -1545,6 +1548,8 @@ 'load arguments' => array(3), 'page callback' => 'node_show', 'page arguments' => array(1, NULL, TRUE), + 'access callback' => '_node_revision_access', + 'access arguments' => array(1), 'type' => MENU_CALLBACK, ); $items['node/%node/revisions/%/revert'] = array(