diff -r 589e6e7e5243 -r 61354f877e06 includes/pageutils.php
--- a/includes/pageutils.php Mon Jul 06 11:26:42 2009 -0400
+++ b/includes/pageutils.php Mon Jul 06 11:27:02 2009 -0400
@@ -378,8 +378,8 @@
}
$db->free_result();
echo '
' . $lang->get('history_heading_other') . '
';
- $q = 'SELECT log_id,time_id,action,date_string,page_id,namespace,author,edit_summary,minor_edit FROM ' . table_prefix.'logs WHERE log_type=\'page\' AND action!=\'edit\' AND page_id=\'' . $paths->page_id . '\' AND namespace=\'' . $paths->namespace . '\' ORDER BY time_id DESC;';
- if ( !$db->sql_query($q) )
+ $sql = 'SELECT log_id,time_id,action,date_string,page_id,namespace,author,edit_summary,minor_edit FROM ' . table_prefix.'logs WHERE log_type=\'page\' AND action!=\'edit\' AND page_id=\'' . $paths->page_id . '\' AND namespace=\'' . $paths->namespace . '\' ORDER BY time_id DESC;';
+ if ( !( $q = $db->sql_query($sql)) )
{
$db->_die('The history data for the page "' . htmlspecialchars($paths->cpage['name']) . '" could not be selected.');
}
@@ -400,7 +400,7 @@
|
';
$cls = 'row2';
- while($r = $db->fetchrow()) {
+ while($r = $db->fetchrow($q)) {
if($cls == 'row2') $cls = 'row1';
else $cls = 'row2';