r41097 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41096‎ | r41097 | r41098 >
Date:09:47, 21 September 2008
Author:tstarling
Status:old
Tags:
Comment:
Revert r41095, the bug is there because giving an error message as the return value from Article::getContent() is a terrible hack which should never have been allowed to survive this long. Move this crap to Article::view() or something.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/UploadBase.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialLinkSearch.php (modified) (history)
  • /trunk/phase3/skins/common/images/cyrl (modified) (history)

Diff [purge]

Property changes on: trunk/phase3/skins/common/images/cyrl
___________________________________________________________________
Deleted: svn:mergeinfo
Index: trunk/phase3/includes/Article.php
@@ -210,7 +210,7 @@
211211 * @return Return the text of this revision
212212 */
213213 function getContent() {
214 - global $wgOut, $wgMessageCache;
 214+ global $wgUser, $wgOut, $wgMessageCache;
215215
216216 wfProfileIn( __METHOD__ );
217217
@@ -220,11 +220,12 @@
221221
222222 if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
223223 $wgMessageCache->loadAllMessages();
224 - $ret = wfMsgWeirdKey( $this->mTitle->getText() );
225 - return "<div class='noarticletext'>\n$ret\n</div>";
 224+ $ret = wfMsgWeirdKey ( $this->mTitle->getText() ) ;
226225 } else {
227 - return $this->getNoSuchPageText();
 226+ $ret = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' );
228227 }
 228+
 229+ return "<div class='noarticletext'>\n$ret\n</div>";
229230 } else {
230231 $this->loadContent();
231232 wfProfileOut( __METHOD__ );
@@ -232,20 +233,6 @@
233234 }
234235 }
235236
236 - /*
237 - * HACK HACK! We pre-parse them with parsemag to get GRAMMAR working right.
238 - * It should be safe to do this and then do the full parse.
239 - */
240 - function getNoSuchPageText() {
241 - global $wgUser;
242 - if ( $wgUser->isLoggedIn() ) {
243 - $text = wfMsgExt( 'noarticletext', 'parsemag' );
244 - } else {
245 - $text = wfMsgExt( 'noarticletextanon', 'parsemag' );
246 - }
247 - return "<div class='noarticletext'>\n$text\n</div>";
248 - }
249 -
250237 /**
251238 * This function returns the text of a section, specified by a number ($section).
252239 * A section is text under a heading like == Heading == or \<h1\>Heading\</h1\>, or
Property changes on: trunk/phase3/includes/specials/SpecialLinkSearch.php
___________________________________________________________________
Deleted: svn:mergeinfo
Property changes on: trunk/phase3/includes/UploadBase.php
___________________________________________________________________
Deleted: svn:mergeinfo
Index: trunk/phase3/RELEASE-NOTES
@@ -213,7 +213,6 @@
214214 has been blocked more than 10 times. Patch by Matt Johnston.
215215 * (bug 12678) Skins don't show Upload link if the user isn't allowed to upload.
216216 * Fixed incorrect usage of DB_LAST in Special:Export. Deprecated DB_LAST.
217 -* 11119 {{grammar}} broken in noarticletext(anon) when ui lang != content lang
218217
219218 === API changes in 1.14 ===
220219

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r41095* An attempt to fix bug 11119...nikerabbit09:18, 21 September 2008