r79752 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79751‎ | r79752 | r79753 >
Date:20:40, 6 January 2011
Author:happy-melon
Status:ok
Tags:
Comment:
More ancient deprecated functions:
* OutputPage::setParserOptions() - 1.6 (r12183)
* OutputPage::addPrimaryWikitext() - 1.10 (r19095)
* OutputPage::addSecondaryWikiText() - 1.10 (r19520)
* OutputPage::tryParserCache() - 1.16 (r52888)
* OutputPage::reportTime() - 1.6 (r11117)
* OutputPage::<various error pages> - 1.7 (r14631)
Modified paths:
  • /trunk/extensions/Asksql/Asksql_body.php (modified) (history)
  • /trunk/extensions/BlockTitles/BlockTitles.php (modified) (history)
  • /trunk/extensions/DumpHTML/dumpHTML.inc (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/extensions/RandomInCategory/RandomInCategory.body.php (modified) (history)
  • /trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/SpecialGiftManager.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/SpecialGiftManagerLogo.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/SpecialRemoveMasterGift.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserProfile/SpecialPopulateExistingUsersProfiles.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserProfile/SpecialToggleUserPageType.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserStats/SpecialUpdateEditCounts.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialComparePages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1001,14 +1001,6 @@
10021002 }
10031003
10041004 /**
1005 - * @deprecated use parserOptions() instead
1006 - */
1007 - public function setParserOptions( $options ) {
1008 - wfDeprecated( __METHOD__ );
1009 - return $this->parserOptions( $options );
1010 - }
1011 -
1012 - /**
10131005 * Get/set the ParserOptions object to use for wikitext parsing
10141006 *
10151007 * @param $options either the ParserOption to use or null to only get the
@@ -1119,43 +1111,6 @@
11201112 }
11211113
11221114 /**
1123 - * Add wikitext to the buffer, assuming that this is the primary text for a page view
1124 - * Saves the text into the parser cache if possible.
1125 - *
1126 - * @param $text String: wikitext
1127 - * @param $article Article object
1128 - * @param $cache Boolean
1129 - * @deprecated Use Article::outputWikitext
1130 - */
1131 - public function addPrimaryWikiText( $text, $article, $cache = true ) {
1132 - global $wgParser;
1133 -
1134 - wfDeprecated( __METHOD__ );
1135 -
1136 - $popts = $this->parserOptions();
1137 - $popts->setTidy( true );
1138 - $parserOutput = $wgParser->parse(
1139 - $text, $article->mTitle,
1140 - $popts, true, true, $this->mRevisionId
1141 - );
1142 - $popts->setTidy( false );
1143 - if ( $cache && $article && $parserOutput->isCacheable() ) {
1144 - $parserCache = ParserCache::singleton();
1145 - $parserCache->save( $parserOutput, $article, $popts );
1146 - }
1147 -
1148 - $this->addParserOutput( $parserOutput );
1149 - }
1150 -
1151 - /**
1152 - * @deprecated use addWikiTextTidy()
1153 - */
1154 - public function addSecondaryWikiText( $text, $linestart = true ) {
1155 - wfDeprecated( __METHOD__ );
1156 - $this->addWikiTextTitleTidy( $text, $this->getTitle(), $linestart );
1157 - }
1158 -
1159 - /**
11601115 * Add a ParserOutput object, but without Html
11611116 *
11621117 * @param $parserOutput ParserOutput object
@@ -1283,24 +1238,6 @@
12841239 }
12851240
12861241 /**
1287 - * @deprecated
1288 - *
1289 - * @param $article Article
1290 - * @return Boolean: true if successful, else false.
1291 - */
1292 - public function tryParserCache( &$article ) {
1293 - wfDeprecated( __METHOD__ );
1294 - $parserOutput = ParserCache::singleton()->get( $article, $article->getParserOptions() );
1295 -
1296 - if ( $parserOutput !== false ) {
1297 - $this->addParserOutput( $parserOutput );
1298 - return true;
1299 - } else {
1300 - return false;
1301 - }
1302 - }
1303 -
1304 - /**
13051242 * Set the value of the "s-maxage" part of the "Cache-control" HTTP header
13061243 *
13071244 * @param $maxage Integer: maximum cache time on the Squid, in seconds.
@@ -1756,17 +1693,6 @@
17571694 }
17581695
17591696 /**
1760 - * @deprecated use wfReportTime() instead.
1761 - *
1762 - * @return String
1763 - */
1764 - public function reportTime() {
1765 - wfDeprecated( __METHOD__ );
1766 - $time = wfReportTime();
1767 - return $time;
1768 - }
1769 -
1770 - /**
17711697 * Produce a "user is blocked" page.
17721698 *
17731699 * @param $return Boolean: whether to have a "return to $wgTitle" message or not.
@@ -2101,53 +2027,6 @@
21022028 $this->addModules( 'mediawiki.legacy.password' );
21032029 }
21042030
2105 - /** @deprecated */
2106 - public function errorpage( $title, $msg ) {
2107 - wfDeprecated( __METHOD__ );
2108 - throw new ErrorPageError( $title, $msg );
2109 - }
2110 -
2111 - /** @deprecated */
2112 - public function databaseError( $fname, $sql, $error, $errno ) {
2113 - throw new MWException( "OutputPage::databaseError is obsolete\n" );
2114 - }
2115 -
2116 - /** @deprecated */
2117 - public function fatalError( $message ) {
2118 - wfDeprecated( __METHOD__ );
2119 - throw new FatalError( $message );
2120 - }
2121 -
2122 - /** @deprecated */
2123 - public function unexpectedValueError( $name, $val ) {
2124 - wfDeprecated( __METHOD__ );
2125 - throw new FatalError( wfMsg( 'unexpected', $name, $val ) );
2126 - }
2127 -
2128 - /** @deprecated */
2129 - public function fileCopyError( $old, $new ) {
2130 - wfDeprecated( __METHOD__ );
2131 - throw new FatalError( wfMsg( 'filecopyerror', $old, $new ) );
2132 - }
2133 -
2134 - /** @deprecated */
2135 - public function fileRenameError( $old, $new ) {
2136 - wfDeprecated( __METHOD__ );
2137 - throw new FatalError( wfMsg( 'filerenameerror', $old, $new ) );
2138 - }
2139 -
2140 - /** @deprecated */
2141 - public function fileDeleteError( $name ) {
2142 - wfDeprecated( __METHOD__ );
2143 - throw new FatalError( wfMsg( 'filedeleteerror', $name ) );
2144 - }
2145 -
2146 - /** @deprecated */
2147 - public function fileNotFoundError( $name ) {
2148 - wfDeprecated( __METHOD__ );
2149 - throw new FatalError( wfMsg( 'filenotfound', $name ) );
2150 - }
2151 -
21522031 public function showFatalError( $message ) {
21532032 $this->setPageTitle( wfMsg( 'internalerror' ) );
21542033 $this->setRobotPolicy( 'noindex,nofollow' );
@@ -2917,7 +2796,7 @@
29182797 * @param $modules Array: list of jQuery modules which should be loaded
29192798 * @return Array: the list of modules which were not loaded.
29202799 * @since 1.16
2921 - * @deprecated No longer needed as of 1.17
 2800+ * @deprecated @since 1.17
29222801 */
29232802 public function includeJQuery( $modules = array() ) {
29242803 return array();
Index: trunk/phase3/includes/specials/SpecialComparePages.php
@@ -40,47 +40,6 @@
4141 parent::__construct( 'ComparePages' );
4242 }
4343
44 - protected function setup( $par ) {
45 - global $wgRequest, $wgUser;
46 -
47 - // Options
48 - $opts = new FormOptions();
49 - $this->opts = $opts; // bind
50 - $opts->add( 'page1', '' );
51 - $opts->add( 'page2', '' );
52 - $opts->add( 'rev1', '' );
53 - $opts->add( 'rev2', '' );
54 - $opts->add( 'action', '' );
55 -
56 - // Set values
57 - $opts->fetchValuesFromRequest( $wgRequest );
58 -
59 - $title1 = Title::newFromText( $opts->getValue( 'page1' ) );
60 - $title2 = Title::newFromText( $opts->getValue( 'page2' ) );
61 -
62 - if( $title1 && $title1->exists() && $opts->getValue( 'rev1' ) == '' ) {
63 - $pda = new Article( $title1 );
64 - $pdi = $pda->getID();
65 - $pdLastRevision = Revision::loadFromPageId( wfGetDB( DB_SLAVE ), $pdi );
66 - $opts->setValue( 'rev1', $pdLastRevision->getId() );
67 - } elseif ( $opts->getValue( 'rev1' ) != '' ) {
68 - $pdrev = Revision::newFromId( $opts->getValue( 'rev1' ) );
69 - if( $pdrev ) $opts->setValue( 'page1', $pdrev->getTitle()->getPrefixedText() );
70 - }
71 - if( $title2 && $title2->exists() && $opts->getValue( 'rev2' ) == '' ) {
72 - $pda = new Article( $title2 );
73 - $pdi = $pda->getID();
74 - $pdLastRevision = Revision::loadFromPageId( wfGetDB( DB_SLAVE ), $pdi );
75 - $opts->setValue('rev2', $pdLastRevision->getId() );
76 - } elseif ( $opts->getValue( 'rev2' ) != '' ) {
77 - $pdrev = Revision::newFromId( $opts->getValue( 'rev2' ) );
78 - if( $pdrev ) $opts->setValue( 'page2', $pdrev->getTitle()->getPrefixedText() );
79 - }
80 -
81 - // Store some objects
82 - $this->skin = $wgUser->getSkin();
83 - }
84 -
8544 /**
8645 * Show a form for filtering namespace and username
8746 *
@@ -91,80 +50,87 @@
9251 $this->setHeaders();
9352 $this->outputHeader();
9453
95 - $this->setup( $par );
 54+ $form = new HTMLForm( array(
 55+ 'Page1' => array(
 56+ 'type' => 'text',
 57+ 'name' => 'page1',
 58+ 'label-message' => 'compare-page1',
 59+ 'size' => '40',
 60+ 'section' => 'page1',
 61+ ),
 62+ 'Revision1' => array(
 63+ 'type' => 'int',
 64+ 'name' => 'rev1',
 65+ 'label-message' => 'compare-rev1',
 66+ 'size' => '8',
 67+ 'section' => 'page1',
 68+ ),
 69+ 'Page2' => array(
 70+ 'type' => 'text',
 71+ 'name' => 'page2',
 72+ 'label-message' => 'compare-page2',
 73+ 'size' => '40',
 74+ 'section' => 'page2',
 75+ ),
 76+ 'Revision2' => array(
 77+ 'type' => 'int',
 78+ 'name' => 'rev2',
 79+ 'label-message' => 'compare-rev2',
 80+ 'size' => '8',
 81+ 'section' => 'page2',
 82+ ),
 83+ 'Action' => array(
 84+ 'type' => 'hidden',
 85+ 'name' => 'action',
 86+ ),
 87+ 'Diffonly' => array(
 88+ 'type' => 'hidden',
 89+ 'name' => 'diffonly',
 90+ ),
 91+ ), 'compare' );
 92+ $form->setSubmitText( wfMsg( 'compare-submit' ) );
 93+ $form->suppressReset();
 94+ $form->setMethod( 'get' );
 95+ $form->setTitle( $this->getTitle() );
9696
97 - // Settings
98 - $this->form();
 97+ $form->loadData();
 98+ $form->displayForm( '' );
9999
100 - if( $this->opts->getValue( 'rev1' ) && $this->opts->getValue( 'rev2' ) ) {
101 - $de = new DifferenceEngine( null,
102 - $this->opts->getValue( 'rev1' ),
103 - $this->opts->getValue( 'rev2' ),
104 - null, // rcid
105 - ( $this->opts->getValue( 'action' ) == 'purge' ),
106 - false );
107 - $de->showDiffPage( true );
108 - }
 100+ self::showDiff( $form->mFieldData );
109101 }
110102
111 - protected function form() {
112 - global $wgOut, $wgScript;
 103+ public static function showDiff( $data ){
113104
114 - // Consume values
115 - $page1 = $this->opts->consumeValue( 'page1' );
116 - $page2 = $this->opts->consumeValue( 'page2' );
117 - $rev1 = $this->opts->consumeValue( 'rev1' );
118 - $rev2 = $this->opts->consumeValue( 'rev2' );
 105+ if( $data['Revision1'] ){
 106+ $rev1 = $data['Revision1'];
 107+ } elseif( $data['Page1'] ) {
 108+ $title = Title::newFromText( $data['Page1'] );
 109+ if( $title instanceof Title ){
 110+ $rev1 = $title->getLatestRevID();
 111+ }
 112+ } else {
 113+ $rev1 = null;
 114+ }
119115
120 - // Store query values in hidden fields so that form submission doesn't lose them
121 - $hidden = array();
122 - foreach ( $this->opts->getUnconsumedValues() as $key => $value ) {
123 - $hidden[] = Html::hidden( $key, $value );
 116+ if( $data['Revision2'] ){
 117+ $rev2 = $data['Revision2'];
 118+ } elseif( $data['Page2'] ) {
 119+ $title = Title::newFromText( $data['Page2'] );
 120+ if( $title instanceof Title ){
 121+ $rev2 = $title->getLatestRevID();
 122+ }
 123+ } else {
 124+ $rev2 = null;
124125 }
125 - $hidden = implode( "\n", $hidden );
126126
127 - $form = Html::openElement( 'form', array( 'action' => $wgScript ) ) .
128 - Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
129 - Xml::fieldset( wfMsg( 'compare-selector' ) ) .
130 - Html::openElement( 'table', array( 'id' => 'mw-diff-table', 'style' => 'width:100%' ) ) .
131 - "<tr>
132 - <td class='mw-label' style='width:10%'>" .
133 - Html::element( 'label', array( 'for' => 'page1' ), wfMsg( 'compare-page1' ) ) .
134 - "</td>
135 - <td class='mw-input' style='width:40%'>" .
136 - Html::input( 'page1', $page1, 'text', array( 'size' => 40, 'id' => 'page1' ) ) .
137 - "</td>
138 - <td class='mw-label' style='width:10%'>" .
139 - Html::element( 'label', array( 'for' => 'page2' ), wfMsg( 'compare-page2' ) ) .
140 - "</td>
141 - <td class='mw-input' style='width:40%'>" .
142 - Html::input( 'page2', $page2, 'text', array( 'size' => 40, 'id' => 'page2' ) ) .
143 - "</td>
144 - </tr>" .
145 - "<tr>
146 - <td class='mw-label'>" .
147 - Html::element( 'label', array( 'for' => 'rev1' ), wfMsg( 'compare-rev1' ) ) .
148 - "</td>
149 - <td class='mw-input'>" .
150 - Html::input( 'rev1', $rev1, 'text', array( 'size' => 8, 'id' => 'rev1' ) ) .
151 - "</td>
152 - <td class='mw-label'>" .
153 - Html::element( 'label', array( 'for' => 'rev2' ), wfMsg( 'compare-rev2' ) ) .
154 - "</td>
155 - <td class='mw-input'>" .
156 - Html::input( 'rev2', $rev2, 'text', array( 'size' => 8, 'id' => 'rev2' ) ) .
157 - "</td>
158 - </tr>" .
159 - "<tr> <td></td>
160 - <td class='mw-submit' colspan='3'>" .
161 - Xml::submitButton( wfMsg( 'compare-submit' ) ) .
162 - "</td>
163 - </tr>" .
164 - Html::closeElement( 'table' ) .
165 - Html::closeElement( 'fieldset' ) .
166 - $hidden .
167 - Html::closeElement( 'form' );
168 -
169 - $wgOut->addHTML( $form );
 127+ if( $rev1 && $rev2 ) {
 128+ $de = new DifferenceEngine( null,
 129+ $rev1,
 130+ $rev2,
 131+ null, // rcid
 132+ ( $data["Action"] == 'purge' ),
 133+ false );
 134+ $de->showDiffPage( true );
 135+ }
170136 }
171137 }
Index: trunk/extensions/BlockTitles/BlockTitles.php
@@ -46,8 +46,7 @@
4747 foreach ( $wgBlockTitlePatterns as $re ) {
4848 if ( preg_match( $re, $t ) ) {
4949 // too bad you can't pass parameter to errorpage
50 - $wgOut->errorpage( 'block_title_error_page_title', 'block_title_error' );
51 - return false;
 50+ throw new ErrorPageError( 'block_title_error_page_title', 'block_title_error' );
5251 }
5352 }
5453
Index: trunk/extensions/SocialProfile/UserProfile/SpecialPopulateExistingUsersProfiles.php
@@ -29,7 +29,7 @@
3030 global $wgRequest, $wgOut, $wgUser;
3131
3232 if ( !in_array( 'staff', $wgUser->getEffectiveGroups() ) ) {
33 - $wgOut->errorpage( 'error', 'badaccess' );
 33+ throw new ErrorPageError( 'error', 'badaccess' );
3434 return '';
3535 }
3636
Index: trunk/extensions/SocialProfile/UserProfile/SpecialToggleUserPageType.php
@@ -29,8 +29,7 @@
3030
3131 // This feature is only available to logged-in users.
3232 if ( !$wgUser->isLoggedIn() ) {
33 - $wgOut->errorpage( 'error', 'badaccess' );
34 - return '';
 33+ throw new ErrorPageError( 'error', 'badaccess' );
3534 }
3635
3736 $dbr = wfGetDB( DB_MASTER );
Index: trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -108,8 +108,7 @@
109109
110110 /** Check if the user is allowed to upload files */
111111 if ( !$wgUser->isAllowed( 'upload' ) ) {
112 - $wgOut->errorpage( 'uploadnologin', 'uploadnologintext' );
113 - return;
 112+ throw new ErrorPageError( 'uploadnologin', 'uploadnologintext' );
114113 }
115114
116115 /** Check if the image directory is writeable, this is a common mistake */
@@ -279,7 +278,7 @@
280279 * is a PHP-managed upload temporary
281280 */
282281 function saveUploadedFile( $saveName, $tempName, $ext ) {
283 - global $wgUploadDirectory, $wgOut, $wgUser;
 282+ global $wgUploadDirectory, $wgUser;
284283
285284 $dest = $this->avatarUploadDirectory;
286285
@@ -344,7 +343,8 @@
345344 }
346345
347346 if ( $type < 0 ) {
348 - $wgOut->fileCopyError( $tempName, $stash );
 347+ # FIXME: undefined variable $stash
 348+ throw new FatalError( wfMsg( 'filecopyerror', $tempName, $stash ) );
349349 }
350350 return $type;
351351 }
@@ -362,12 +362,11 @@
363363 * @access private
364364 */
365365 function saveTempUploadedFile( $saveName, $tempName ) {
366 - global $wgOut;
367366 $archive = wfImageArchiveDir( $saveName, 'temp' );
368367 $stash = $archive . '/' . gmdate( 'YmdHis' ) . '!' . $saveName;
369368
370369 if ( !move_uploaded_file( $tempName, $stash ) ) {
371 - $wgOut->fileCopyError( $tempName, $stash );
 370+ throw new FatalError( wfMsg( 'filecopyerror', $tempName, $stash ) );
372371 return false;
373372 }
374373
@@ -410,7 +409,7 @@
411410 $success = unlink( $this->mUploadTempName );
412411 wfRestoreWarnings();
413412 if ( !$success ) {
414 - $wgOut->fileDeleteError( $this->mUploadTempName );
 413+ throw new FatalError( wfMsg( 'filedeleteerror', $this->mUploadTempName ) );
415414 }
416415 }
417416
Index: trunk/extensions/SocialProfile/UserGifts/SpecialRemoveMasterGift.php
@@ -55,7 +55,7 @@
5656
5757 // Check for permissions
5858 if ( $wgUser->isAnon() || !$this->canUserManage() ) {
59 - $wgOut->errorpage( 'error', 'badaccess' );
 59+ throw new ErrorPageError( 'error', 'badaccess' );
6060 }
6161
6262 $this->gift_id = $wgRequest->getVal( 'gift_id' );
Index: trunk/extensions/SocialProfile/UserGifts/SpecialGiftManager.php
@@ -20,7 +20,7 @@
2121 $wgOut->setPageTitle( wfMsg( 'giftmanager' ) );
2222
2323 if ( $wgUser->isAnon() || !$this->canUserManage() ) {
24 - $wgOut->errorpage( 'error', 'badaccess' );
 24+ throw new ErrorPageError( 'error', 'badaccess' );
2525 }
2626
2727 $wgOut->addStyle( $wgUserGiftsScripts . '/UserGifts.css' );
@@ -141,7 +141,7 @@
142142 if ( $gift_id ) {
143143 $gift = Gifts::getGift( $gift_id );
144144 if ( $wgUser->getID() != $gift['creator_user_id'] && ( !in_array( 'giftadmin', $wgUser->getGroups() ) && !$wgUser->isAllowed( 'delete' ) ) ) {
145 - $wgOut->errorpage( 'error', 'badaccess' );
 145+ throw new ErrorPageError( 'error', 'badaccess' );
146146 }
147147 }
148148
Index: trunk/extensions/SocialProfile/UserGifts/SpecialGiftManagerLogo.php
@@ -105,8 +105,7 @@
106106
107107 /** Various rights checks */
108108 if ( !$wgUser->isAllowed( 'upload' ) || $wgUser->isBlocked() ) {
109 - $wgOut->errorpage( 'uploadnologin', 'uploadnologintext' );
110 - return;
 109+ throw new ErrorPageError( 'uploadnologin', 'uploadnologintext' );
111110 }
112111 if ( wfReadOnly() ) {
113112 $wgOut->readOnlyPage();
@@ -355,7 +354,7 @@
356355 // $sql = "UPDATE user set user_avatar = " . $type . " WHERE user_id = " . $wgUser->mId;
357356 // $res = $dbw->query($sql);
358357 } else {
359 - $wgOut->fileCopyError( $tempName, $stash );
 358+ throw new FatalError( wfMsg( 'filecopyerror', $tempName, $stash ) ); # FIXME: undefined variable $stash
360359 }
361360 return $type;
362361 }
@@ -373,12 +372,11 @@
374373 * @access private
375374 */
376375 function saveTempUploadedFile( $saveName, $tempName ) {
377 - global $wgOut;
378376 $archive = wfImageArchiveDir( $saveName, 'temp' );
379377 $stash = $archive . '/' . gmdate( 'YmdHis' ) . '!' . $saveName;
380378
381379 if ( !move_uploaded_file( $tempName, $stash ) ) {
382 - $wgOut->fileCopyError( $tempName, $stash );
 380+ throw new FatalError( wfMsg( 'filecopyerror', $tempName, $stash ) );
383381 return false;
384382 }
385383
@@ -423,7 +421,7 @@
424422 $success = unlink( $this->mUploadTempName );
425423 wfRestoreWarnings();
426424 if ( !$success ) {
427 - $wgOut->fileDeleteError( $this->mUploadTempName );
 425+ throw new FatalError( wfMsg( 'filedeleteerror', $this->mUploadTempName ) );
428426 }
429427 }
430428
@@ -549,7 +547,7 @@
550548 global $wgOut, $wgUser, $wgUseCopyrightUpload;
551549
552550 if ( !$this->canUserManage() ) {
553 - $wgOut->errorpage( 'error', 'badaccess' );
 551+ throw new ErrorPageError( 'error', 'badaccess' );
554552 }
555553
556554 $cols = intval( $wgUser->getOption( 'cols' ) );
Index: trunk/extensions/SocialProfile/UserStats/SpecialUpdateEditCounts.php
@@ -102,8 +102,7 @@
103103 // Check permissions -- we must be allowed to access this special page
104104 // before we can run any database queries
105105 if ( !$wgUser->isAllowed( 'updatepoints' ) ) {
106 - $wgOut->errorpage( 'error', 'badaccess' );
107 - return false;
 106+ throw new ErrorPageError( 'error', 'badaccess' );
108107 }
109108
110109 // And obviously the database needs to be writable before we start
Index: trunk/extensions/RandomInCategory/RandomInCategory.body.php
@@ -45,7 +45,7 @@
4646 return;
4747 }
4848
49 - $wgOut->reportTime();
 49+ wfReportTime(); #FIXME: this does nothing?
5050 $wgOut->redirect( $title->getFullUrl() );
5151 }
5252
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -312,7 +312,7 @@
313313 if ( $title instanceof Title && $title->exists() && $title->userCanRead() ) {
314314 global $wgOut;
315315 $revision = Revision::newFromTitle( $title );
316 - $wgOut->addSecondaryWikiText( $revision->getText() );
 316+ $wgOut->addWikiText( $revision->getText() );
317317 return true;
318318 } else {
319319 return false;
Index: trunk/extensions/Asksql/Asksql_body.php
@@ -16,8 +16,7 @@
1717 wfLoadExtensionMessages( 'Asksql' );
1818
1919 if ( !$wgAllowSysopQueries ) {
20 - $wgOut->errorpage( 'nosuchspecialpage', 'nospecialpagetext' );
21 - return;
 20+ throw new ErrorPageError( 'nosuchspecialpage', 'nospecialpagetext' );
2221 }
2322 if ( !$wgUser->isAllowed( 'asksql' ) ) {
2423 $wgOut->permissionRequired( 'asksql' );
Index: trunk/extensions/DumpHTML/dumpHTML.inc
@@ -796,7 +796,7 @@
797797 $ns = $wgTitle->getNamespace();
798798 if ( $ns == NS_SPECIAL ) {
799799 $wgOut = new OutputPage;
800 - $wgOut->setParserOptions( new ParserOptions );
 800+ $wgOut->parserOptions( new ParserOptions );
801801 SpecialPage::executePath( $wgTitle );
802802 } else {
803803 /** @todo merge with Wiki.php code */
@@ -812,7 +812,7 @@
813813 return $this->getRedirect( $rt );
814814 } else {
815815 $wgOut = new OutputPage;
816 - $wgOut->setParserOptions( new ParserOptions );
 816+ $wgOut->parserOptions( new ParserOptions );
817817
818818 $wgArticle->view();
819819 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r11117Move reporttime method from OutputPage object to a global function, let us us...hashar13:37, 24 September 2005
r12183* Added a new accessor/mutator for OutputPage::mParserOptions and deprecated ...avar02:38, 21 December 2005
r14631Removed most exit() calls from the MediaWiki core, by replacing them with eit...tstarling06:40, 7 June 2006
r19095Merge from branches/werdna/restrictions-separation (forked at r18959): * Bran...werdna23:32, 10 January 2007
r19520ar: fix the 'create a new page' on search page when no exact match foundhashar19:22, 20 January 2007
r52888Implemented the PoolCounter feature and did some general refactoring in the a...tstarling08:12, 8 July 2009

Status & tagging log