summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-11-28 12:28:35 +0000
committerDries Buytaert <dries@buytaert.net>2004-11-28 12:28:35 +0000
commit70fcf51e844942d32e81de6c98f5b4d1e9dd1b4e (patch)
treef4d7c393f9bf54f993566c04d90152dcdde6f40b /includes
parent76eace311e206c352d9d965a099d5d4cc457249a (diff)
downloadbrdo-70fcf51e844942d32e81de6c98f5b4d1e9dd1b4e.tar.gz
brdo-70fcf51e844942d32e81de6c98f5b4d1e9dd1b4e.tar.bz2
- Refactored the statistics and watchdog module (views). The most important
changes are: 1. Simplified the statistics pages: there are less pages and on the remaining pages there is a lot less visual clutter (less columns and better presentation). 2. Reorganized the 'administer - logs' menu: flattened the menu structure and removed a number of links. 3. Improved performance. Most statistics pages used about 160 slow SQL queries which made the statistics pages fairly unusable on my system. The new pages use at least 10 times less SQL queries and render much faster. They are actually usable. 4. There is now a 'track'-tab on node pages, and a second subtrab on the user accounts 'track'-tab for people with the 'access statistics' permission. They can be used to resp. track the node and the user. This makes the statistics more accessible. 5. Changed the way watchdog messages are filtered. This makes it easier to introduce new watchdog types. 6. Reworked the statistics module's permissions. 7. Less code: 223 insertions(+), 343 deletions(-). 8. Fixed several glitches: for example, the statistics pages sorted the 'Name' column by user ID instead of by name. Unfortunately, it is too difficult to backport these to DRUPAL-4-5. TODO: 1. Review the statistics modules help pages. 2. Help fine-tune the interfaces/views. NOTES: 1. You'll want to run update.php.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 87ac73d4b..c7b22d1eb 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -166,7 +166,7 @@ function drupal_goto($path = '', $query = NULL, $fragment = NULL) {
*/
function drupal_not_found() {
header('HTTP/1.0 404 Not Found');
- watchdog('httpd', t('404 error: %page not found.', array('%page' => '<em>'. db_escape_string($_GET['q']) .'</em>')));
+ watchdog('page not found', t('%page not found.', array('%page' => '<em>'. db_escape_string($_GET['q']) .'</em>')));
$path = drupal_get_normal_path(variable_get('site_404', ''));
$status = MENU_NOT_FOUND;
@@ -185,6 +185,7 @@ function drupal_not_found() {
*/
function drupal_access_denied() {
header('HTTP/1.0 403 Forbidden');
+ watchdog('access denied', t('%page denied access.', array('%page' => '<em>'. db_escape_string($_GET['q']) .'</em>')));
$path = drupal_get_normal_path(variable_get('site_403', ''));
$status = MENU_NOT_FOUND;
@@ -339,7 +340,7 @@ function error_handler($errno, $message, $filename, $line, $variables) {
$types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning');
$entry = $types[$errno] .': '. $message .' in '. $filename .' on line '. $line .'.';
- watchdog('error', t('%error: %message in %file on line %line.', array('%error' => $types[$errno], '%message' => $message, '%file' => $filename, '%line' => $line)));
+ watchdog('error', t('%message in %file on line %line.', array('%error' => $types[$errno], '%message' => $message, '%file' => $filename, '%line' => $line)));
if (variable_get('error_level', 1) == 1) {
print '<pre>'. $entry .'</pre>';