r38135 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38134‎ | r38135 | r38136 >
Date:15:41, 28 July 2008
Author:raymond
Status:old
Tags:
Comment:
* Add a few CSS ids to allow customization of warning messages
* Apply formatNum to $wgMaxArticleSize too
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1144,7 +1144,9 @@
11451145 # Then it must be protected based on static groups (regular)
11461146 $noticeMsg = 'protectedpagewarning';
11471147 }
 1148+ $wgOut->addHTML( "<div id='mw-edit-$noticeMsg'>\n" );
11481149 $wgOut->addWikiMsg( $noticeMsg );
 1150+ $wgOut->addHTML( "</div>\n" );
11491151 }
11501152 if ( $this->mTitle->isCascadeProtected() ) {
11511153 # Is this page under cascading protection from some source pages?
@@ -1166,9 +1168,13 @@
11671169 $this->kblength = (int)(strlen( $this->textbox1 ) / 1024);
11681170 }
11691171 if ( $this->tooBig || $this->kblength > $wgMaxArticleSize ) {
1170 - $wgOut->addWikiMsg( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgMaxArticleSize );
 1172+ $wgOut->addHTML( "<div id='mw-edit-longpageerror'>\n" );
 1173+ $wgOut->addWikiMsg( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) );
 1174+ $wgOut->addHTML( "</div>\n" );
11711175 } elseif( $this->kblength > 29 ) {
 1176+ $wgOut->addHTML( "<div id='mw-edit-longpagewarning'>\n" );
11721177 $wgOut->addWikiMsg( 'longpagewarning', $wgLang->formatNum( $this->kblength ) );
 1178+ $wgOut->addHTML( "</div>\n" );
11731179 }
11741180
11751181 #need to parse the preview early so that we know which templates are used,

Status & tagging log