Index: journal.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/journal/journal.module,v retrieving revision 1.1.2.7 diff -u -p -r1.1.2.7 journal.module --- journal.module 18 Apr 2008 02:22:09 -0000 1.1.2.7 +++ journal.module 19 Apr 2008 16:23:49 -0000 @@ -214,14 +214,12 @@ function journal_view() { * @todo Add XML output format. */ function journal_output($journal, $format = 'table', $header = array()) { - $type = gettype($journal); - switch ($format) { case 'text': // Output delimiter in first line, since this may chance. $output = '\t' . "\n"; - while ($entry = ($type == 'resource' ? db_fetch_object($journal) : array_shift($journal))) { + while ($entry = (is_array($journal) ? array_shift($journal) : db_fetch_object($journal))) { $row = array( $entry->timestamp, $entry->uid, @@ -234,7 +232,7 @@ function journal_output($journal, $forma case 'list': $output = ''; - while ($entry = ($type == 'resource' ? db_fetch_object($journal) : array_shift($journal))) { + while ($entry = (is_array($journal) ? array_shift($journal) : db_fetch_object($journal))) { $output .= '
  • '; $output .= ''. theme('username', $entry) .' '. format_date($entry->timestamp, 'small') .':'; $output .= ''. filter_xss_admin($entry->message) .''; @@ -248,7 +246,7 @@ function journal_output($journal, $forma case 'table': default: $rows = array(); - while ($entry = ($type == 'resource' ? db_fetch_object($journal) : array_shift($journal))) { + while ($entry = (is_array($journal) ? array_shift($journal) : db_fetch_object($journal))) { $rows[] = array( format_date($entry->timestamp, 'small'), theme('username', $entry),