r74190 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74189‎ | r74190 | r74191 >
Date:08:39, 3 October 2010
Author:ialex
Status:deferred (Comments)
Tags:
Comment:
Removed calls to deprecated function wfErrorExit()
Modified paths:
  • /trunk/extensions/gis/maparea.php (modified) (history)
  • /trunk/extensions/gis/mapsources.php (modified) (history)
  • /trunk/extensions/gis/neighbors.php (modified) (history)

Diff [purge]

Index: trunk/extensions/gis/maparea.php
@@ -51,11 +51,7 @@
5252 $wgOut->setPagetitle( "Maparea" );
5353
5454 if (($e = $this->p->get_error()) != "") {
55 - $wgOut->addHTML(
56 - "<p>" . htmlspecialchars( $e ) . "</p>");
57 - $wgOut->output();
58 - wfErrorExit();
59 - return;
 55+ throw new FatalError( htmlspecialchars( $e ) );
6056 }
6157
6258 $wgOut->addWikiText( $this->make_output() );
Index: trunk/extensions/gis/neighbors.php
@@ -57,11 +57,7 @@
5858 $wgOut->setPagetitle( "Neighbors" );
5959
6060 if (($e = $this->p->get_error()) != "") {
61 - $wgOut->addHTML(
62 - "<p>" . htmlspecialchars( $e ) . "</p>");
63 - $wgOut->output();
64 - wfErrorExit();
65 - return;
 61+ throw new FatalError( htmlspecialchars( $e ) );
6662 }
6763
6864 $wgOut->addWikiText( $this->make_output() );
Index: trunk/extensions/gis/mapsources.php
@@ -61,11 +61,7 @@
6262 global $wgOut, $wgUser, $wgContLang, $wgRequest;
6363
6464 if (($e = $this->p->get_error()) != "") {
65 - $wgOut->addHTML(
66 - "<p>" . htmlspecialchars( $e ) . "</p>");
67 - $wgOut->output();
68 - wfErrorExit();
69 - return "";
 65+ throw new FatalError( htmlspecialchars( $e ) );
7066 }
7167
7268 $attr = $this->p->get_attr();
@@ -215,11 +211,9 @@
216212 $bsarticle = new Article( $bstitle );
217213 }
218214 if ($bsarticle->getID() == 0) {
219 - $wgOut->addHTML( "<p>Please add this page: " .
220 - $sk->makeBrokenLinkObj( $bstitle ).".</p>");
221 - $wgOut->output();
222 - wfErrorExit();
223 - return "";
 215+ $wgOut->addHTML( );
 216+ throw new FatalError( "<p>Please add this page: " .
 217+ $sk->makeBrokenLinkObj( $bstitle ) . ".</p>" );
224218 }
225219 $bstext = $bsarticle->getContent( false ); # allow redir
226220

Follow-up revisions

RevisionCommit summaryAuthorDate
r74193Per Nikerabbit, follow-up to r74191: tag for removal in 1.19; I removed the l...ialex08:50, 3 October 2010
r74542Fix for r74190: remove line that should not be thereialex10:42, 9 October 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   22:53, 3 October 2010
+			$wgOut->addHTML( );

This line should probably be removed.

#Comment by IAlex (talk | contribs)   10:42, 9 October 2010

Done in r74542.

#Comment by Siebrand (talk | contribs)   15:51, 23 October 2010

Setting to new after r74542.

Status & tagging log