diff modules/dblog/dblog.module @ 5:2427550111ae 6.2

Drupal 6.2
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:30:08 +0100
parents c1f4ac30525a
children
line wrap: on
line diff
--- a/modules/dblog/dblog.module	Tue Dec 23 14:29:21 2008 +0100
+++ b/modules/dblog/dblog.module	Tue Dec 23 14:30:08 2008 +0100
@@ -1,5 +1,5 @@
 <?php
-// $Id: dblog.module,v 1.21 2008/01/08 10:35:41 goba Exp $
+// $Id: dblog.module,v 1.21.2.2 2008/04/09 21:11:46 goba Exp $
 
 /**
  * @file
@@ -47,6 +47,7 @@
     'description' => 'Settings for logging to the Drupal database logs. This is the most common method for small to medium sites on shared hosting. The logs are viewable from the admin pages.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('dblog_admin_settings'),
+    'access arguments' => array('administer site configuration'),
     'file' => 'dblog.admin.inc',
   );
 
@@ -54,6 +55,7 @@
     'title' => 'Recent log entries',
     'description' => 'View events that have recently been logged.',
     'page callback' => 'dblog_overview',
+    'access arguments' => array('access site reports'),
     'weight' => -1,
     'file' => 'dblog.admin.inc',
   );
@@ -62,6 +64,7 @@
     'description' => "View 'page not found' errors (404s).",
     'page callback' => 'dblog_top',
     'page arguments' => array('page not found'),
+    'access arguments' => array('access site reports'),
     'file' => 'dblog.admin.inc',
   );
   $items['admin/reports/access-denied'] = array(
@@ -69,12 +72,14 @@
     'description' => "View 'access denied' errors (403s).",
     'page callback' => 'dblog_top',
     'page arguments' => array('access denied'),
+    'access arguments' => array('access site reports'),
     'file' => 'dblog.admin.inc',
   );
   $items['admin/reports/event/%'] = array(
     'title' => 'Details',
     'page callback' => 'dblog_event',
     'page arguments' => array(3),
+    'access arguments' => array('access site reports'),
     'type' => MENU_CALLBACK,
     'file' => 'dblog.admin.inc',
   );
@@ -98,7 +103,7 @@
 function dblog_cron() {
   // Cleanup the watchdog table
   $max = db_result(db_query('SELECT MAX(wid) FROM {watchdog}'));
-  db_query('DELETE FROM {watchdog} WHERE wid < %d', $max - variable_get('dblog_row_limit', 1000));
+  db_query('DELETE FROM {watchdog} WHERE wid <= %d', $max - variable_get('dblog_row_limit', 1000));
 }
 
 /**