2009-01-23 19:23:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!defined( 'MEDIAWIKI' ))
|
|
|
|
die();
|
|
|
|
|
|
|
|
abstract class AbuseFilterView {
|
|
|
|
function __construct( $page, $params ) {
|
|
|
|
$this->mPage = $page;
|
|
|
|
$this->mParams = $params;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getTitle( $subpage='' ) {
|
|
|
|
return $this->mPage->getTitle( $subpage );
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract function show();
|
|
|
|
|
|
|
|
function canEdit() {
|
|
|
|
global $wgUser;
|
|
|
|
static $canEdit = 'unset';
|
|
|
|
|
|
|
|
if ($canEdit == 'unset') {
|
|
|
|
$canEdit = $wgUser->isAllowed( 'abusefilter-modify' );
|
|
|
|
}
|
|
|
|
|
|
|
|
return $canEdit;
|
|
|
|
}
|
2009-01-29 22:44:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class AbuseFilterChangesList extends OldChangesList {
|
|
|
|
protected function insertExtra( &$s, &$rc, &$classes ) {
|
|
|
|
## Empty, used for subclassers to add anything special.
|
|
|
|
$sk = $this->skin;
|
|
|
|
|
|
|
|
$title = SpecialPage::getTitleFor( 'AbuseFilter', "examine/".$rc->mAttribs['rc_id'] );
|
|
|
|
$examineLink = $sk->link( $title, wfMsgExt( 'abusefilter-changeslist-examine', 'parseinline' ) );
|
|
|
|
|
|
|
|
$s .= " ($examineLink)";
|
|
|
|
}
|
2009-01-23 19:23:19 +00:00
|
|
|
}
|