Merging accidental branch split
authorDan
Wed, 15 Apr 2009 20:06:20 -0400
changeset 920 4babf8545826
parent 917 64cf017a22f1 (current diff)
parent 919 1314deadf903 (diff)
child 921 a71de5e21423
Merging accidental branch split
--- a/includes/log.php	Wed Apr 15 20:02:01 2009 -0400
+++ b/includes/log.php	Wed Apr 15 20:06:20 2009 -0400
@@ -148,10 +148,14 @@
     {
       $where_extra .= "\n    AND ( (" . implode(") OR (", $where_bits['action']) . ") )";
     }
-    $limit = ( $page_size > 0 ) ? "\n  LIMIT $offset, $page_size" : '';
+    if ( ENANO_DBLAYER == 'PGSQL' )
+      $limit = ( $page_size > 0 ) ? "\n  LIMIT $page_size OFFSET $offset" : '';
+    else
+      $limit = ( $page_size > 0 ) ? "\n  LIMIT $offset, $page_size" : '';
     $columns = ( $just_page_count ) ? 'COUNT(*)' : 'log_id, action, page_id, namespace, CHAR_LENGTH(page_text) AS revision_size, author, time_id, edit_summary, minor_edit';
-    $sql = 'SELECT ' . $columns . ' FROM ' . table_prefix . "logs\n"
+    $sql = 'SELECT ' . $columns . ' FROM ' . table_prefix . "logs AS l\n"
          . "  WHERE log_type = 'page' AND is_draft != 1$where_extra\n"
+         . "  GROUP BY log_id, action, page_id, namespace, page_text, author, time_id, edit_summary, minor_edit"
          . "  ORDER BY log_id DESC $limit;";
     
     return $sql;
--- a/plugins/SpecialLog.php	Wed Apr 15 20:02:01 2009 -0400
+++ b/plugins/SpecialLog.php	Wed Apr 15 20:06:20 2009 -0400
@@ -274,7 +274,7 @@
     
     echo $paginator;
     // padding
-    echo '<div style="height: 10px;"></div>';
+    echo '<div style="height: 10px; clear: both;"></div>';
     foreach ( $dataset as $row )
     {
       echo LogDisplay::render_row($row) . '<br />';