* Add $wgAbuseFilterStyleVersion to SpecialAbuseLog::execute

* Remove one dupe call of addExtensionStyle from SpecialAbuseFilter::execute
* Bump $wgAbuseFilterStyleVersion per CSS changes in r46325
* Add a space between drop down and submit button
This commit is contained in:
Raimond Spekking 2009-01-27 17:32:30 +00:00
parent 88bb6d6626
commit 53887bb338
4 changed files with 7 additions and 10 deletions

View file

@ -668,7 +668,7 @@ class AbuseFilter {
$builder .= Xml::closeElement( 'optgroup' ) . "\n";
}
$rules .= Xml::tags( 'select', array( 'id' => 'wpFilterBuilder', 'onchange' => 'addText();' ), $builder );
$rules .= Xml::tags( 'select', array( 'id' => 'wpFilterBuilder', 'onchange' => 'addText();' ), $builder ) . ' ';
// Add syntax checking
$rules .= Xml::element( 'input', array( 'type' => 'button', 'onclick' => 'doSyntaxCheck()', 'value' => wfMsg( 'abusefilter-edit-check' ), 'id' => 'mw-abusefilter-syntaxcheck' ) );

View file

@ -79,5 +79,5 @@ $wgAjaxExportList[] = 'AbuseFilter::ajaxCheckSyntax';
$wgAjaxExportList[] = 'AbuseFilter::ajaxEvaluateExpression';
$wgAjaxExportList[] = 'AbuseFilter::ajaxReAutoconfirm';
## Style version
$wgAbuseFilterStyleVersion = 1;
// Bump the version number every time you change any of the .css/.js files
$wgAbuseFilterStyleVersion = 2;

View file

@ -12,7 +12,7 @@ class SpecialAbuseFilter extends SpecialPage {
}
function execute( $subpage ) {
global $wgUser,$wgOut,$wgRequest, $wgAbuseFilterStyleVersion, $wgScriptPath;
global $wgUser, $wgOut, $wgRequest, $wgAbuseFilterStyleVersion, $wgScriptPath;
$wgOut->addExtensionStyle( "{$wgScriptPath}/extensions/AbuseFilter/abusefilter.css?{$wgAbuseFilterStyleVersion}" );
$view = 'AbuseFilterViewList';
@ -25,9 +25,6 @@ class SpecialAbuseFilter extends SpecialPage {
$wgOut->setArticleRelated( false );
$wgOut->enableClientCache( false );
global $wgScriptPath;
$wgOut->addExtensionStyle( $wgScriptPath."/extensions/AbuseFilter/abusefilter.css" );
// Are we allowed?
if ( !$wgUser->isAllowed( 'abusefilter-view' ) ) {
$this->displayRestrictionError();

View file

@ -10,7 +10,7 @@ class SpecialAbuseLog extends SpecialPage {
}
function execute( $parameter ) {
global $wgUser,$wgOut,$wgRequest;
global $wgUser,$wgOut,$wgRequest, $wgAbuseFilterStyleVersion;
$this->setHeaders();
$this->loadParameters();
@ -21,8 +21,8 @@ class SpecialAbuseLog extends SpecialPage {
$wgOut->enableClientCache( false );
global $wgScriptPath;
$wgOut->addExtensionStyle( $wgScriptPath."/extensions/AbuseFilter/abusefilter.css" );
$wgOut->addExtensionStyle( $wgScriptPath . "/extensions/AbuseFilter/abusefilter.css?$wgAbuseFilterStyleVersion" );
// Are we allowed?
if ( count( $errors = $this->getTitle()->getUserPermissionsErrors( 'abusefilter-log', $wgUser, true, array( 'ns-specialprotected' ) ) ) ) {
// Go away.