158 } |
158 } |
159 if ( ENANO_DBLAYER == 'PGSQL' ) |
159 if ( ENANO_DBLAYER == 'PGSQL' ) |
160 $limit = ( $page_size > 0 ) ? "\n LIMIT $page_size OFFSET $offset" : ''; |
160 $limit = ( $page_size > 0 ) ? "\n LIMIT $page_size OFFSET $offset" : ''; |
161 else |
161 else |
162 $limit = ( $page_size > 0 ) ? "\n LIMIT $offset, $page_size" : ''; |
162 $limit = ( $page_size > 0 ) ? "\n LIMIT $offset, $page_size" : ''; |
163 $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'; |
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" |
|
166 . " ON ( u.user_id = l.author_uid OR u.user_id IS NULL )\n" |
165 . " WHERE log_type = 'page' AND is_draft != 1$where_extra\n" |
167 . " WHERE log_type = 'page' AND is_draft != 1$where_extra\n" |
166 . " 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, time_id, edit_summary, minor_edit\n" |
167 . " ORDER BY time_id DESC $limit;"; |
169 . " ORDER BY time_id DESC $limit;"; |
168 |
170 |
169 return $sql; |
171 return $sql; |
384 $html .= "<span style=\"$css\">({$size_change})</span>"; |
386 $html .= "<span style=\"$css\">({$size_change})</span>"; |
385 $html .= ' . . '; |
387 $html .= ' . . '; |
386 } |
388 } |
387 |
389 |
388 // link to userpage |
390 // link to userpage |
389 $cls = ( isPage($paths->nslist['User'] . $row['author']) ) ? '' : ' class="wikilink-nonexistent"'; |
391 $real_username = $row['author_uid'] > 1 && !empty($row['username']) ? $row['username'] : $row['author']; |
390 $rank_info = $session->get_user_rank($row['author']); |
392 $cls = ( isPage($paths->nslist['User'] . $real_username) ) ? '' : ' class="wikilink-nonexistent"'; |
391 $html .= '<a style="' . $rank_info['rank_style'] . '" href="' . makeUrlNS('User', sanitize_page_id($row['author']), false, true) . '"' . $cls . '>' . htmlspecialchars($row['author']) . '</a> '; |
393 $rank_info = $session->get_user_rank($row['author_uid']); |
|
394 $html .= '<a style="' . $rank_info['rank_style'] . '" href="' . makeUrlNS('User', sanitize_page_id($real_username), false, true) . '"' . $cls . '>' . htmlspecialchars($real_username) . '</a> '; |
392 $html .= '('; |
395 $html .= '('; |
393 $html .= '<a href="' . makeUrlNS('Special', 'PrivateMessages/Compose/To/' . sanitize_page_id($row['author']), false, true) . '">'; |
396 $html .= '<a href="' . makeUrlNS('Special', 'PrivateMessages/Compose/To/' . sanitize_page_id($real_username), false, true) . '">'; |
394 $html .= $lang->get('pagetools_rc_btn_pm'); |
397 $html .= $lang->get('pagetools_rc_btn_pm'); |
395 $html .= '</a>, '; |
398 $html .= '</a>, '; |
396 $html .= '<a href="' . makeUrlNS('User', sanitize_page_id($row['author']), false, true) . '#do:comments">'; |
399 $html .= '<a href="' . makeUrlNS('User', sanitize_page_id($real_username), false, true) . '#do:comments">'; |
397 $html .= $lang->get('pagetools_rc_btn_usertalk'); |
400 $html .= $lang->get('pagetools_rc_btn_usertalk'); |
398 $html .= '</a>'; |
401 $html .= '</a>'; |
399 $html .= ') . . '; |
402 $html .= ') . . '; |
400 |
403 |
401 // Edit summary |
404 // Edit summary |