Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php |
— | — | @@ -185,9 +185,11 @@ |
186 | 186 | $parsed_comments = $wgOut->parseInline( $row->af_public_comments ); |
187 | 187 | |
188 | 188 | if ($this->canSeeDetails()) { |
| 189 | + $title = $this->getTitle( "examine/log/".$row->afl_id ); |
189 | 190 | $detailsLink = $sk->makeKnownLinkObj( $this->getTitle( ), wfMsg( 'abusefilter-log-detailslink' ), 'details='.$row->afl_id ); |
| 191 | + $examineLink = $sk->link( $title, wfMsgExt( 'abusefilter-changeslist-examine', 'parseinline' ), array() ); |
190 | 192 | |
191 | | - $description = wfMsgExt( 'abusefilter-log-detailedentry', array( 'parseinline', 'replaceafter' ), array( $timestamp, $user, $row->afl_filter, $row->afl_action, $sk->makeKnownLinkObj( $title ), $actions_taken, $parsed_comments, $detailsLink ) ); |
| 193 | + $description = wfMsgExt( 'abusefilter-log-detailedentry', array( 'parseinline', 'replaceafter' ), array( $timestamp, $user, $row->afl_filter, $row->afl_action, $sk->makeKnownLinkObj( $title ), $actions_taken, $parsed_comments, $detailsLink, $examineLink ) ); |
192 | 194 | } else { |
193 | 195 | $description = wfMsgExt( 'abusefilter-log-entry', array( 'parseinline', 'replaceafter' ), array( $timestamp, $user, $row->afl_action, $sk->makeKnownLinkObj( $title ), $actions_taken, $parsed_comments ) ); |
194 | 196 | } |
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewExamine.php |
— | — | @@ -15,7 +15,9 @@ |
16 | 16 | |
17 | 17 | // Check if we've got a subpage |
18 | 18 | if ( count($this->mParams)>1 && is_numeric($this->mParams[1]) ) { |
19 | | - $this->showExaminer( $this->mParams[1] ); |
| 19 | + $this->showExaminerForRC( $this->mParams[1] ); |
| 20 | + } elseif ( count($this->mParams)>2 && $this->mParams[1] == 'log' && is_numeric( $this->mParams[2] ) ) { |
| 21 | + $this->showExaminerForLogEntry( $this->mParams[2] ); |
20 | 22 | } else { |
21 | 23 | $this->showSearch(); |
22 | 24 | } |
— | — | @@ -78,9 +80,9 @@ |
79 | 81 | $wgOut->addHTML( $output ); |
80 | 82 | } |
81 | 83 | |
82 | | - function showExaminer( $rcid ) { |
83 | | - global $wgOut, $wgUser; |
84 | | - |
| 84 | + function showExaminerForRC( $rcid ) { |
| 85 | + global $wgOut; |
| 86 | + |
85 | 87 | // Get data |
86 | 88 | $dbr = wfGetDB( DB_SLAVE ); |
87 | 89 | $row = $dbr->selectRow( 'recentchanges', '*', array( 'rc_id' => $rcid ), __METHOD__ ); |
— | — | @@ -92,6 +94,29 @@ |
93 | 95 | |
94 | 96 | $vars = AbuseFilter::getVarsFromRCRow( $row ); |
95 | 97 | |
| 98 | + $this->showExaminer( $vars ); |
| 99 | + } |
| 100 | + |
| 101 | + function showExaminerForLogEntry( $logid ) { |
| 102 | + global $wgOut; |
| 103 | + |
| 104 | + // Get data |
| 105 | + $dbr = wfGetDB( DB_SLAVE ); |
| 106 | + $row = $dbr->selectRow( 'abuse_filter_log', '*', array( 'afl_id' => $logid ), __METHOD__ ); |
| 107 | + |
| 108 | + if (!$row) { |
| 109 | + $wgOut->addWikiMsg( 'abusefilter-examine-notfound' ); |
| 110 | + return; |
| 111 | + } |
| 112 | + |
| 113 | + $vars = unserialize( $row->afl_var_dump ); |
| 114 | + |
| 115 | + $this->showExaminer( $vars ); |
| 116 | + } |
| 117 | + |
| 118 | + function showExaminer( $vars ) { |
| 119 | + global $wgOut, $wgUser; |
| 120 | + |
96 | 121 | if (!$vars) { |
97 | 122 | $wgOut->addWikiMsg( 'abusefilter-examine-incompatible' ); |
98 | 123 | return; |
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | Filter description: $6', |
72 | 72 | 'abusefilter-log-detailedentry' => '$1: $2 triggered [[Special:AbuseFilter/$3|filter $3]], performing the action "$4" on $5. |
73 | 73 | Actions taken: $6; |
74 | | -Filter description: $7 ($8)', |
| 74 | +Filter description: $7 ($8) ($9)', |
75 | 75 | 'abusefilter-log-detailslink' => 'details', |
76 | 76 | 'abusefilter-log-details-legend' => 'Details for log entry $1', |
77 | 77 | 'abusefilter-log-details-var' => 'Variable', |
— | — | @@ -406,7 +406,8 @@ |
407 | 407 | * $5 link to page the action that triggered the filter was made on |
408 | 408 | * $6 actions taken by the filter |
409 | 409 | * $7 comments in filter description |
410 | | -* $8 filter details link', |
| 410 | +* $8 action details link |
| 411 | +* $9 link to examine the action', |
411 | 412 | 'abusefilter-log-detailslink' => '{{Identical|Details}}', |
412 | 413 | 'abusefilter-log-details-var' => 'Caption of a column on a detail view of [[Special:AbuseLog]]', |
413 | 414 | 'abusefilter-log-details-val' => 'Caption of a column on a detail view of [[Special:AbuseLog]] |