equal
deleted
inserted
replaced
71 { |
71 { |
72 $sql = 'SELECT ( CHAR_LENGTH(l1.page_text) - CHAR_LENGTH(l2.page_text) ) AS size_change, l1.author, l1.page_id, l1.namespace, l1.edit_summary, |
72 $sql = 'SELECT ( CHAR_LENGTH(l1.page_text) - CHAR_LENGTH(l2.page_text) ) AS size_change, l1.author, l1.page_id, l1.namespace, l1.edit_summary, |
73 l1.time_id AS currev_time, l2.time_id AS oldrev_time |
73 l1.time_id AS currev_time, l2.time_id AS oldrev_time |
74 FROM ' . table_prefix . 'logs AS l1 |
74 FROM ' . table_prefix . 'logs AS l1 |
75 LEFT JOIN ' . table_prefix . 'logs AS l2 |
75 LEFT JOIN ' . table_prefix . 'logs AS l2 |
76 ON ( l1.log_type = l2.log_type AND l1.action = \'edit\' AND l1.action = l2.action AND l2.time_id < l1.time_id AND l1.page_id = l2.page_id AND l1.namespace = l2.namespace ) |
76 ON ( l1.log_type = l2.log_type AND l1.action = \'edit\' AND l1.action = l2.action AND l2.time_id < l1.time_id AND l1.page_id = l2.page_id AND l1.namespace = l2.namespace AND l2.is_draft != 1 ) |
77 WHERE l2.time_id IS NOT NULL' . $where_extra . ' |
77 WHERE l2.time_id IS NOT NULL' . $where_extra . ' |
|
78 AND l1.is_draft != 1 |
78 GROUP BY oldrev_time |
79 GROUP BY oldrev_time |
79 ORDER BY l1.time_id DESC, l2.time_id DESC;'; |
80 ORDER BY l1.time_id DESC, l2.time_id DESC;'; |
80 } |
81 } |
81 else |
82 else |
82 { |
83 { |