includes/log.php
changeset 947 f222643fb578
parent 918 1064e7e57eeb
child 980 d13fad911955
equal deleted inserted replaced
946:ff58e1732482 947:f222643fb578
   154       $limit = ( $page_size > 0 ) ? "\n  LIMIT $offset, $page_size" : '';
   154       $limit = ( $page_size > 0 ) ? "\n  LIMIT $offset, $page_size" : '';
   155     $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';
   155     $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';
   156     $sql = 'SELECT ' . $columns . ' FROM ' . table_prefix . "logs AS l\n"
   156     $sql = 'SELECT ' . $columns . ' FROM ' . table_prefix . "logs AS l\n"
   157          . "  WHERE log_type = 'page' AND is_draft != 1$where_extra\n"
   157          . "  WHERE log_type = 'page' AND is_draft != 1$where_extra\n"
   158          . "  GROUP BY log_id, action, page_id, namespace, page_text, author, time_id, edit_summary, minor_edit"
   158          . "  GROUP BY log_id, action, page_id, namespace, page_text, author, time_id, edit_summary, minor_edit"
   159          . "  ORDER BY log_id DESC $limit;";
   159          . "  ORDER BY time_id DESC $limit;";
   160     
   160     
   161     return $sql;
   161     return $sql;
   162   }
   162   }
   163   
   163   
   164   /**
   164   /**