diff -r 44302dd20d62 -r 94c1ff984286 includes/log.php --- a/includes/log.php Mon Apr 13 17:28:24 2009 -0400 +++ b/includes/log.php Tue Apr 14 21:02:13 2009 -0400 @@ -112,10 +112,19 @@ switch($type) { case 'user': - $where_bits['user'][] = "author = '" . $db->escape($value) . "'"; + $where_bits['user'][] = "author = '" . $db->escape(str_replace('_', ' ', $value)) . "'"; break; case 'action': - $where_bits['action'][] = "action = '" . $db->escape($value) . "'"; + if ( $value === 'protect' ) + { + $where_bits['action'][] = "action = 'prot'"; + $where_bits['action'][] = "action = 'unprot'"; + $where_bits['action'][] = "action = 'semiprot'"; + } + else + { + $where_bits['action'][] = "action = '" . $db->escape($value) . "'"; + } break; case 'page': list($page_id, $namespace) = RenderMan::strToPageId($value); @@ -249,6 +258,16 @@ } /** + * Returns the list of criteria + * @return array + */ + + public function get_criteria() + { + return $this->criteria; + } + + /** * Formats a result row into pretty HTML. * @param array dataset from LogDisplay::get_data() * @static @@ -278,6 +297,10 @@ { $html .= ''; } + if ( $row['parent_revid'] > 0 && isPage($pagekey) ) + { + $html .= ', ' . $lang->get('pagetools_rc_btn_undo') . ''; + } $html .= ') '; } @@ -299,6 +322,11 @@ { $html .= 'N '; } + // minor edit? + if ( $row['action'] == 'edit' && $row['minor_edit'] ) + { + $html .= 'm '; + } // link to the page $cls = ( isPage($pagekey) ) ? '' : ' class="wikilink-nonexistent"'; @@ -306,7 +334,7 @@ // date $today = time() - ( time() % 86400 ); - $date = ( $row['time_id'] > $today ) ? '' : MemberlistFormatter::format_date($row['time_id']) . ' '; + $date = MemberlistFormatter::format_date($row['time_id']) . ' '; $date .= date('h:i:s', $row['time_id']); $html .= "$date . . "; @@ -373,7 +401,11 @@ 'semiprot' => 'log_action_protect_semi', 'delete' => 'log_action_delete' ); - $reason = ( !empty($row['edit_summary']) ) ? htmlspecialchars($row['edit_summary']) : '' . $lang->get('log_msg_no_reason_provided') . ''; + + if ( $row['edit_summary'] === '__REVERSION__' ) + $reason = '' . $lang->get('log_msg_reversion') . ''; + else + $reason = ( !empty($row['edit_summary']) ) ? htmlspecialchars($row['edit_summary']) : '' . $lang->get('log_msg_no_reason_provided') . ''; $html .= $lang->get($stringmap[$row['action']], array('reason' => $reason)); }