Index: modules/watchdog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/watchdog.module,v retrieving revision 1.103 diff -u -r1.103 watchdog.module --- modules/watchdog.module 20 Jun 2004 19:49:14 -0000 1.103 +++ modules/watchdog.module 1 Jul 2004 01:54:17 -0000 @@ -85,7 +85,7 @@ array('data' => t('user'), 'field' => 'u.name'), array('data' => t('operations'), 'colspan' => '2') ); - $sql = 'SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid '. ($type ? $query[$type] : ''); + $sql = 'SELECT w.*, u.name, u.uid FROM {watchdog} w LEFT JOIN {users} u ON w.uid = u.uid '. ($type ? $query[$type] : ''); $sql .= tablesort_sql($header); $result = pager_query($sql, 50); @@ -93,7 +93,7 @@ $rows[] = array( array('data' => format_date($watchdog->timestamp, 'small'), 'class' => "watchdog-$watchdog->type"), array('data' => truncate_utf8(strip_tags($watchdog->message), 64), 'class' => "watchdog-$watchdog->type"), - array('data' => format_name($watchdog), 'class' => "watchdog-$watchdog->type"), + array('data' => ($watchdog->uid != NULL) ? format_name($watchdog) : t('(deleted user)'), 'class' => "watchdog-$watchdog->type"), array('data' => $watchdog->link, 'class' => "watchdog-$watchdog->type"), array('data' => l(t('view details'), "admin/logs/view/$watchdog->wid"), 'class' => "watchdog-$watchdog->type") ); @@ -115,12 +115,12 @@ */ function watchdog_view($id) { $output = ''; - $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id); + $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w LEFT JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id); if ($watchdog = db_fetch_object($result)) { $output .= '
'. t('Type') ." | $watchdog->type |
---|---|
'. t('Date') .' | '. format_date($watchdog->timestamp, 'large') .' |
'. t('User') .' | '. format_name($watchdog) .' |
'. t('User') .' | '. (($watchdog->uid != NULL) ? format_name($watchdog) : t('(deleted user)')) .' |
'. t('Location') ." | $watchdog->location |
'. t('Message') ." | $watchdog->message |
'. t('Hostname') ." | $watchdog->hostname |