Index: trunk/phase3/includes/SpecialRecentchangeslinked.php |
— | — | @@ -25,12 +25,12 @@ |
26 | 26 | $sk = $wgUser->getSkin(); |
27 | 27 | |
28 | 28 | if (is_null($target)) { |
29 | | - $wgOut->errorpage( 'notargettitle', 'notargettext' ); |
| 29 | + $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
30 | 30 | return; |
31 | 31 | } |
32 | 32 | $nt = Title::newFromURL( $target ); |
33 | 33 | if( !$nt ) { |
34 | | - $wgOut->errorpage( 'notargettitle', 'notargettext' ); |
| 34 | + $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
35 | 35 | return; |
36 | 36 | } |
37 | 37 | $id = $nt->getArticleId(); |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1518,7 +1518,7 @@ |
1519 | 1519 | # Check patrol config options |
1520 | 1520 | |
1521 | 1521 | if ( !($wgUseNPPatrol || $wgUseRCPatrol)) { |
1522 | | - $wgOut->errorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
| 1522 | + $wgOut->showErrorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
1523 | 1523 | return; |
1524 | 1524 | } |
1525 | 1525 | |
— | — | @@ -1527,7 +1527,7 @@ |
1528 | 1528 | $rc = $rcid ? RecentChange::newFromId($rcid) : null; |
1529 | 1529 | if ( is_null ( $rc ) ) |
1530 | 1530 | { |
1531 | | - $wgOut->errorPage( 'markedaspatrollederror', 'markedaspatrollederrortext' ); |
| 1531 | + $wgOut->showErrorPage( 'markedaspatrollederror', 'markedaspatrollederrortext' ); |
1532 | 1532 | return; |
1533 | 1533 | } |
1534 | 1534 | |
— | — | @@ -1535,7 +1535,7 @@ |
1536 | 1536 | // Only new pages can be patrolled if the general patrolling is off....??? |
1537 | 1537 | // @fixme -- is this necessary? Shouldn't we only bother controlling the |
1538 | 1538 | // front end here? |
1539 | | - $wgOut->errorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
| 1539 | + $wgOut->showErrorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
1540 | 1540 | return; |
1541 | 1541 | } |
1542 | 1542 | |
Index: trunk/phase3/includes/SpecialLockdb.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | # This used to show a file not found error, but the likeliest reason for fopen() |
106 | 106 | # to fail at this point is insufficient permission to write to the file...good old |
107 | 107 | # is_writable() is plain wrong in some cases, it seems... |
108 | | - $this->notWritable(); |
| 108 | + self::notWritable(); |
109 | 109 | return; |
110 | 110 | } |
111 | 111 | fwrite( $fp, $this->reason ); |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | |
128 | 128 | public static function notWritable() { |
129 | 129 | global $wgOut; |
130 | | - $wgOut->errorPage( 'lockdb', 'lockfilenotwritable' ); |
| 130 | + $wgOut->showErrorPage( 'lockdb', 'lockfilenotwritable' ); |
131 | 131 | } |
132 | 132 | |
133 | 133 | } |
Index: trunk/phase3/includes/SpecialUserlogin.php |
— | — | @@ -487,7 +487,7 @@ |
488 | 488 | $this->resetLoginForm( wfMsg( 'resetpass_announce' ) ); |
489 | 489 | break; |
490 | 490 | default: |
491 | | - wfDebugDieBacktrace( "Unhandled case value" ); |
| 491 | + throw new MWException( "Unhandled case value" ); |
492 | 492 | } |
493 | 493 | } |
494 | 494 | |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | function render() { |
40 | 40 | global $wgOut; |
41 | 41 | $wgOut->setArticleBodyOnly( true ); |
42 | | - $wgOut->addSecondaryWikitext( $this->getContent() ); |
| 42 | + $wgOut->addWikiTextTitleTidy( $this->getContent(), $this->mTitle ); |
43 | 43 | } |
44 | 44 | |
45 | 45 | function view() { |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -687,7 +687,7 @@ |
688 | 688 | if( $title instanceof Title && $title->exists() && $title->userCanRead() ) { |
689 | 689 | global $wgOut; |
690 | 690 | $revision = Revision::newFromTitle( $title ); |
691 | | - $wgOut->addSecondaryWikiText( $revision->getText() ); |
| 691 | + $wgOut->addWikiTextTitleTidy( $revision->getText(), $this->mTitle ); |
692 | 692 | return true; |
693 | 693 | } else { |
694 | 694 | return false; |
Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | $url = trim( $url ); |
168 | 168 | if( stripos($url, 'http://') !== 0 && stripos($url, 'ftp://') !== 0 ) { |
169 | 169 | # Only HTTP or FTP URLs |
170 | | - $wgOut->errorPage( 'upload-proto-error', 'upload-proto-error-text' ); |
| 170 | + $wgOut->showErrorPage( 'upload-proto-error', 'upload-proto-error-text' ); |
171 | 171 | return true; |
172 | 172 | } |
173 | 173 | |
— | — | @@ -174,7 +174,7 @@ |
175 | 175 | $this->mCurlDestHandle = @fopen( $this->mTempPath, "wb" ); |
176 | 176 | if( $this->mCurlDestHandle === false ) { |
177 | 177 | # Could not open temporary file to write in |
178 | | - $wgOut->errorPage( 'upload-file-error', 'upload-file-error-text'); |
| 178 | + $wgOut->showErrorPage( 'upload-file-error', 'upload-file-error-text'); |
179 | 179 | return true; |
180 | 180 | } |
181 | 181 | |
— | — | @@ -195,9 +195,9 @@ |
196 | 196 | if( $error ) { |
197 | 197 | unlink( $dest ); |
198 | 198 | if( wfEmptyMsg( "upload-curl-error$errornum", wfMsg("upload-curl-error$errornum") ) ) |
199 | | - $wgOut->errorPage( 'upload-misc-error', 'upload-misc-error-text' ); |
| 199 | + $wgOut->showErrorPage( 'upload-misc-error', 'upload-misc-error-text' ); |
200 | 200 | else |
201 | | - $wgOut->errorPage( "upload-curl-error$errornum", "upload-curl-error$errornum-text" ); |
| 201 | + $wgOut->showErrorPage( "upload-curl-error$errornum", "upload-curl-error$errornum-text" ); |
202 | 202 | } |
203 | 203 | |
204 | 204 | return $error; |
— | — | @@ -376,9 +376,9 @@ |
377 | 377 | return self::BEFORE_PROCESSING; |
378 | 378 | } |
379 | 379 | |
380 | | - /* Check for PHP error if any, requires php 4.2 or newer */ |
381 | | - if( $this->mCurlError == 1/*UPLOAD_ERR_INI_SIZE*/ ) { |
382 | | - return self::LARGE_FILE_SERVER; |
| 380 | + /* Check for curl error */ |
| 381 | + if( $this->mCurlError ) { |
| 382 | + return self::BEFORE_PROCESSING; |
383 | 383 | } |
384 | 384 | |
385 | 385 | /** |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -640,7 +640,7 @@ |
641 | 641 | * Internal code errors should be reported with this method |
642 | 642 | */ |
643 | 643 | protected static function dieDebug($method, $message) { |
644 | | - wfDebugDieBacktrace("Internal error in $method: $message"); |
| 644 | + throw new MWException("Internal error in $method: $message"); |
645 | 645 | } |
646 | 646 | |
647 | 647 | /** |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -397,7 +397,7 @@ |
398 | 398 | $tpl->set( 'about', $this->aboutLink() ); |
399 | 399 | |
400 | 400 | $tpl->setRef( 'debug', $out->mDebugtext ); |
401 | | - $tpl->set( 'reporttime', $out->reportTime() ); |
| 401 | + $tpl->set( 'reporttime', wfReportTime() ); |
402 | 402 | $tpl->set( 'sitenotice', wfGetSiteNotice() ); |
403 | 403 | $tpl->set( 'bottomscripts', $this->bottomScripts() ); |
404 | 404 | |
— | — | @@ -838,14 +838,12 @@ |
839 | 839 | * @private |
840 | 840 | */ |
841 | 841 | function buildNavUrls () { |
842 | | - global $wgUseTrackbacks, $wgTitle, $wgArticle; |
| 842 | + global $wgUseTrackbacks, $wgTitle, $wgUser, $wgRequest; |
| 843 | + global $wgEnableUploads, $wgUploadNavigationUrl; |
843 | 844 | |
844 | 845 | $fname = 'SkinTemplate::buildNavUrls'; |
845 | 846 | wfProfileIn( $fname ); |
846 | 847 | |
847 | | - global $wgUser, $wgRequest; |
848 | | - global $wgEnableUploads, $wgUploadNavigationUrl; |
849 | | - |
850 | 848 | $action = $wgRequest->getText( 'action' ); |
851 | 849 | |
852 | 850 | $nav_urls = array(); |
Index: trunk/phase3/includes/SpecialPreferences.php |
— | — | @@ -356,7 +356,7 @@ |
357 | 357 | return; |
358 | 358 | } |
359 | 359 | |
360 | | - $wgOut->setParserOptions( ParserOptions::newFromUser( $wgUser ) ); |
| 360 | + $wgOut->parserOptions( ParserOptions::newFromUser( $wgUser ) ); |
361 | 361 | $this->mainPrefsForm( $error === false ? 'success' : 'error', $error); |
362 | 362 | } |
363 | 363 | |
Index: trunk/phase3/includes/SquidUpdate.php |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | |
221 | 221 | foreach ( $urlArr as $url ) { |
222 | 222 | if( !is_string( $url ) ) { |
223 | | - wfDebugDieBacktrace( 'Bad purge URL' ); |
| 223 | + throw new MWException( 'Bad purge URL' ); |
224 | 224 | } |
225 | 225 | $url = SquidUpdate::expand( $url ); |
226 | 226 | |