diff -r acb7e23b6ffa -r 5841df0ab575 includes/pageprocess.php --- a/includes/pageprocess.php Sun May 04 21:57:48 2008 -0400 +++ b/includes/pageprocess.php Mon May 05 20:06:37 2008 -0400 @@ -1178,7 +1178,11 @@ else { - $q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\'' . $this->page_id . '\' AND namespace=\'' . $this->namespace . '\';'); + $q = $db->sql_query('SELECT t.page_text, t.char_tag, l.time_id FROM '.table_prefix."page_text AS t\n" + . " LEFT JOIN " . table_prefix . "logs AS l\n" + . " ON ( l.page_id = t.page_id AND l.namespace = t.namespace )\n" + . " WHERE t.page_id='$this->page_id' AND t.namespace='$this->namespace'\n" + . " ORDER BY l.time_id DESC LIMIT 1;"); if ( !$q ) { $this->send_error('Error during SQL query.', true);