changeset 1212 | db2edac4e5a7 |
parent 1175 | 1e2c9819ede3 |
child 1227 | bdac73ed481e |
1211:488294ceee13 | 1212:db2edac4e5a7 |
---|---|
163 $columns = ( $just_page_count ) ? 'COUNT(*)' : 'log_id, action, page_id, namespace, CHAR_LENGTH(page_text) AS revision_size, author, author_uid, u.username, time_id, edit_summary, minor_edit'; |
163 $columns = ( $just_page_count ) ? 'COUNT(*)' : 'log_id, action, page_id, namespace, CHAR_LENGTH(page_text) AS revision_size, author, author_uid, u.username, time_id, edit_summary, minor_edit'; |
164 $sql = 'SELECT ' . $columns . ' FROM ' . table_prefix . "logs AS l\n" |
164 $sql = 'SELECT ' . $columns . ' FROM ' . table_prefix . "logs AS l\n" |
165 . " LEFT JOIN " . table_prefix . "users AS u\n" |
165 . " LEFT JOIN " . table_prefix . "users AS u\n" |
166 . " ON ( u.user_id = l.author_uid OR u.user_id IS NULL )\n" |
166 . " ON ( u.user_id = l.author_uid OR u.user_id IS NULL )\n" |
167 . " WHERE log_type = 'page' AND is_draft != 1$where_extra\n" |
167 . " WHERE log_type = 'page' AND is_draft != 1$where_extra\n" |
168 . " GROUP BY log_id, action, page_id, namespace, page_text, author, time_id, edit_summary, minor_edit\n" |
168 . " GROUP BY log_id, action, page_id, namespace, page_text, author, author_uid, username, time_id, edit_summary, minor_edit\n" |
169 . " ORDER BY time_id DESC $limit;"; |
169 . " ORDER BY time_id DESC $limit;"; |
170 |
170 |
171 return $sql; |
171 return $sql; |
172 } |
172 } |
173 |
173 |