r80995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80994‎ | r80995 | r80996 >
Date:21:40, 25 January 2011
Author:kaldari
Status:ok
Tags:
Comment:
more readable regex
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialBannerLoader.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialBannerLoader.php
@@ -29,7 +29,7 @@
3030 if ( $wgRequest->getText( 'banner' ) ) {
3131 $bannerName = $wgRequest->getText( 'banner' );
3232 $content = $this->getJsNotice( $bannerName );
33 - if ( preg_match( "/<centralnotice-template-\w{1,}>\z/", $content ) ) {
 33+ if ( preg_match( "/<centralnotice-template-\w+>\z/", $content ) ) {
3434 echo "/* Failed cache lookup */";
3535 } elseif ( strlen( $content ) == 0 ) {
3636 // Hack for IE/Mac 0-length keepalive problem, see RawPage.php

Status & tagging log