Index: branches/wmf/1.17wmf1/includes/BagOStuff.php |
— | — | @@ -727,6 +727,7 @@ |
728 | 728 | |
729 | 729 | $handle = $this->getReader(); |
730 | 730 | if ( !$handle ) { |
| 731 | + wfProfileOut( __METHOD__ ); |
731 | 732 | return null; |
732 | 733 | } |
733 | 734 | |
— | — | @@ -757,6 +758,7 @@ |
758 | 759 | |
759 | 760 | $handle = $this->getWriter(); |
760 | 761 | if ( !$handle ) { |
| 762 | + wfProfileOut( __METHOD__ ); |
761 | 763 | return false; |
762 | 764 | } |
763 | 765 | |
— | — | @@ -773,6 +775,7 @@ |
774 | 776 | |
775 | 777 | $handle = $this->getWriter(); |
776 | 778 | if ( !$handle ) { |
| 779 | + wfProfileOut( __METHOD__ ); |
777 | 780 | return false; |
778 | 781 | } |
779 | 782 | |
— | — | @@ -791,6 +794,7 @@ |
792 | 795 | $handle = $this->getWriter(); |
793 | 796 | |
794 | 797 | if ( !$handle ) { |
| 798 | + wfProfileOut( __METHOD__ ); |
795 | 799 | return false; |
796 | 800 | } |
797 | 801 | |
Index: branches/wmf/1.17wmf1/includes/diff/DifferenceEngine.php |
— | — | @@ -150,6 +150,8 @@ |
151 | 151 | URL=$url2 |
152 | 152 | CONTROL; |
153 | 153 | echo( $control ); |
| 154 | + |
| 155 | + wfProfileOut( __METHOD__ ); |
154 | 156 | return; |
155 | 157 | } |
156 | 158 | |
— | — | @@ -620,16 +622,20 @@ |
621 | 623 | $this->mCacheHit = true; |
622 | 624 | // Check if the diff should be hidden from this user |
623 | 625 | if ( !$this->loadRevisionData() ) { |
| 626 | + wfProfileOut( __METHOD__ ); |
624 | 627 | return false; |
625 | 628 | } elseif ( $this->mOldRev && !$this->mOldRev->userCan( Revision::DELETED_TEXT ) ) { |
| 629 | + wfProfileOut( __METHOD__ ); |
626 | 630 | return false; |
627 | 631 | } elseif ( $this->mNewRev && !$this->mNewRev->userCan( Revision::DELETED_TEXT ) ) { |
| 632 | + wfProfileOut( __METHOD__ ); |
628 | 633 | return false; |
629 | 634 | } |
630 | 635 | // Short-circuit |
631 | 636 | if ( $this->mOldRev && $this->mNewRev |
632 | 637 | && $this->mOldRev->getID() == $this->mNewRev->getID() ) |
633 | 638 | { |
| 639 | + wfProfileOut( __METHOD__ ); |
634 | 640 | return ''; |
635 | 641 | } |
636 | 642 | // Cacheable? |
— | — | @@ -757,6 +763,7 @@ |
758 | 764 | wfProfileOut( __METHOD__ . "-shellexec" ); |
759 | 765 | unlink( $tempName1 ); |
760 | 766 | unlink( $tempName2 ); |
| 767 | + wfProfileOut( __METHOD__ ); |
761 | 768 | return $difftext; |
762 | 769 | } |
763 | 770 | |
— | — | @@ -765,7 +772,9 @@ |
766 | 773 | $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) ); |
767 | 774 | $diffs = new Diff( $ota, $nta ); |
768 | 775 | $formatter = new TableDiffFormatter(); |
769 | | - return $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) . |
| 776 | + $difftext = $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) . |
| 777 | + wfProfileOut( __METHOD__ ); |
| 778 | + return $difftext; |
770 | 779 | $this->debug(); |
771 | 780 | } |
772 | 781 | |
Index: branches/wmf/1.17wmf1/includes/Article.php |
— | — | @@ -1893,6 +1893,7 @@ |
1894 | 1894 | if ( !$rev ) { |
1895 | 1895 | wfDebug( "Article::replaceSection asked for bogus section (page: " . |
1896 | 1896 | $this->getId() . "; section: $section; edittime: $edittime)\n" ); |
| 1897 | + wfProfileOut( __METHOD__ ); |
1897 | 1898 | return null; |
1898 | 1899 | } |
1899 | 1900 | |
— | — | @@ -2074,12 +2075,12 @@ |
2075 | 2076 | $flags & EDIT_MINOR, null, null, &$flags, &$status ) ) ) |
2076 | 2077 | { |
2077 | 2078 | wfDebug( __METHOD__ . ": ArticleSave hook aborted save!\n" ); |
2078 | | - wfProfileOut( __METHOD__ ); |
2079 | 2079 | |
2080 | 2080 | if ( $status->isOK() ) { |
2081 | 2081 | $status->fatal( 'edit-hook-aborted' ); |
2082 | 2082 | } |
2083 | 2083 | |
| 2084 | + wfProfileOut( __METHOD__ ); |
2084 | 2085 | return $status; |
2085 | 2086 | } |
2086 | 2087 | |
Property changes on: branches/wmf/1.17wmf1/includes/Article.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2087 | 2088 | Merged /trunk/phase3/includes/Article.php:r81729,81890-81894,81896-81898,81900 |
Index: branches/wmf/1.17wmf1/includes/parser/Tidy.php |
— | — | @@ -118,15 +118,13 @@ |
119 | 119 | $retval = -1; |
120 | 120 | } |
121 | 121 | |
122 | | - wfProfileOut( __METHOD__ ); |
123 | | - |
124 | 122 | if( !$stderr && $cleansource == '' && $text != '' ) { |
125 | 123 | // Some kind of error happened, so we couldn't get the corrected text. |
126 | 124 | // Just give up; we'll use the source text and append a warning. |
127 | | - return null; |
128 | | - } else { |
129 | | - return $cleansource; |
| 125 | + $cleansource = null; |
130 | 126 | } |
| 127 | + wfProfileOut( __METHOD__ ); |
| 128 | + return $cleansource; |
131 | 129 | } |
132 | 130 | |
133 | 131 | /** |
— | — | @@ -144,6 +142,7 @@ |
145 | 143 | |
146 | 144 | if( $stderr ) { |
147 | 145 | $retval = $tidy->getStatus(); |
| 146 | + wfProfileOut( __METHOD__ ); |
148 | 147 | return $tidy->errorBuffer; |
149 | 148 | } else { |
150 | 149 | $tidy->cleanRepair(); |
Index: branches/wmf/1.17wmf1/includes/parser/Parser.php |
— | — | @@ -2424,6 +2424,7 @@ |
2425 | 2425 | } |
2426 | 2426 | if ( $stack > 0 ) { |
2427 | 2427 | wfDebug( __METHOD__.": Invalid input; not enough close tags (stack $stack, state $state)\n" ); |
| 2428 | + wfProfileOut( __METHOD__ ); |
2428 | 2429 | return false; |
2429 | 2430 | } |
2430 | 2431 | wfProfileOut( __METHOD__ ); |
Property changes on: branches/wmf/1.17wmf1/includes/parser/Parser.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2431 | 2432 | Merged /trunk/phase3/includes/parser/Parser.php:r81729,81890-81894,81896-81898,81900 |
Index: branches/wmf/1.17wmf1/includes/parser/Parser_LinkHooks.php |
— | — | @@ -265,9 +265,10 @@ |
266 | 266 | if( $return === false ) { |
267 | 267 | # False (no link) was returned, output plain wikitext |
268 | 268 | # Build it again as the hook is allowed to modify $paramText |
269 | | - return isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]"; |
| 269 | + $return = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]"; |
270 | 270 | } |
271 | 271 | # Content was returned, return it |
| 272 | + wfProfileOut( __METHOD__ ); |
272 | 273 | return $return; |
273 | 274 | } |
274 | 275 | |
Index: branches/wmf/1.17wmf1/includes/Linker.php |
— | — | @@ -720,6 +720,7 @@ |
721 | 721 | return $this->linkKnown( $title, "$prefix$text$inside", array(), $query ) . $trail; |
722 | 722 | } |
723 | 723 | } else { |
| 724 | + wfProfileOut( __METHOD__ ); |
724 | 725 | return "<!-- ERROR -->{$prefix}{$text}{$trail}"; |
725 | 726 | } |
726 | 727 | } |
Index: branches/wmf/1.17wmf1/includes/AjaxDispatcher.php |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
| 137 | + $wgOut = null; |
137 | 138 | wfProfileOut( __METHOD__ ); |
138 | | - $wgOut = null; |
139 | 139 | } |
140 | 140 | } |
Index: branches/wmf/1.17wmf1/includes/db/DatabaseIbm_db2.php |
— | — | @@ -351,6 +351,7 @@ |
352 | 352 | } |
353 | 353 | |
354 | 354 | if ( strlen( $user ) < 1 ) { |
| 355 | + wfProfileOut( __METHOD__ ); |
355 | 356 | return null; |
356 | 357 | } |
357 | 358 | |
— | — | @@ -378,6 +379,8 @@ |
379 | 380 | "Server: $server, Database: $dbName, User: $user, Password: " |
380 | 381 | . substr( $password, 0, 3 ) . "...\n" ); |
381 | 382 | $this->installPrint( $this->lastError() . "\n" ); |
| 383 | + |
| 384 | + wfProfileOut( __METHOD__ ); |
382 | 385 | return null; |
383 | 386 | } |
384 | 387 | |
Index: branches/wmf/1.17wmf1/includes/db/LoadBalancer.php |
— | — | @@ -428,6 +428,7 @@ |
429 | 429 | if ( $i === false ) { |
430 | 430 | $this->mLastError = 'No working slave server: ' . $this->mLastError; |
431 | 431 | $this->reportConnectionError( $this->mErrorConnection ); |
| 432 | + wfProfileOut( __METHOD__ ); |
432 | 433 | return false; |
433 | 434 | } |
434 | 435 | } |
Index: branches/wmf/1.17wmf1/includes/Export.php |
— | — | @@ -177,8 +177,8 @@ |
178 | 178 | "</id>" . |
179 | 179 | "</contributor>"; |
180 | 180 | } |
| 181 | + $this->author_list .= "</contributors>"; |
181 | 182 | wfProfileOut( __METHOD__ ); |
182 | | - $this->author_list .= "</contributors>"; |
183 | 183 | } |
184 | 184 | |
185 | 185 | protected function dumpFrom( $cond = '' ) { |
Index: branches/wmf/1.17wmf1/includes/EditPage.php |
— | — | @@ -659,10 +659,10 @@ |
660 | 660 | // Custom edit intro for new sections |
661 | 661 | $this->section === 'new' ? 'MediaWiki:addsection-editintro' : '' ); |
662 | 662 | |
663 | | - wfProfileOut( __METHOD__ ); |
664 | | - |
665 | 663 | // Allow extensions to modify form data |
666 | 664 | wfRunHooks( 'EditPage::importFormData', array( $this, $request ) ); |
| 665 | + |
| 666 | + wfProfileOut( __METHOD__ ); |
667 | 667 | } |
668 | 668 | |
669 | 669 | /** |
— | — | @@ -788,6 +788,8 @@ |
789 | 789 | |
790 | 790 | if ( !wfRunHooks( 'EditPage::attemptSave', array( $this ) ) ) { |
791 | 791 | wfDebug( "Hook 'EditPage::attemptSave' aborted article saving\n" ); |
| 792 | + wfProfileOut( __METHOD__ . '-checks' ); |
| 793 | + wfProfileOut( __METHOD__ ); |
792 | 794 | return self::AS_HOOK_ERROR; |
793 | 795 | } |
794 | 796 | |
— | — | @@ -795,11 +797,12 @@ |
796 | 798 | if ( $this->mTitle->getNamespace() == NS_FILE && |
797 | 799 | Title::newFromRedirect( $this->textbox1 ) instanceof Title && |
798 | 800 | !$wgUser->isAllowed( 'upload' ) ) { |
799 | | - if ( $wgUser->isAnon() ) { |
800 | | - return self::AS_IMAGE_REDIRECT_ANON; |
801 | | - } else { |
802 | | - return self::AS_IMAGE_REDIRECT_LOGGED; |
803 | | - } |
| 801 | + $isAnon = $wgUser->isAnon(); |
| 802 | + |
| 803 | + wfProfileOut( __METHOD__ . '-checks' ); |
| 804 | + wfProfileOut( __METHOD__ ); |
| 805 | + |
| 806 | + return $isAnon ? self::AS_IMAGE_REDIRECT_ANON : self::AS_IMAGE_REDIRECT_LOGGED; |
804 | 807 | } |
805 | 808 | |
806 | 809 | # Check for spam |
— | — | @@ -1220,8 +1223,10 @@ |
1221 | 1224 | # Enabled article-related sidebar, toplinks, etc. |
1222 | 1225 | $wgOut->setArticleRelated( true ); |
1223 | 1226 | |
1224 | | - if ( $this->showHeader() === false ) |
| 1227 | + if ( $this->showHeader() === false ) { |
| 1228 | + wfProfileOut( __METHOD__ ); |
1225 | 1229 | return; |
| 1230 | + } |
1226 | 1231 | |
1227 | 1232 | $action = htmlspecialchars( $this->getActionURL( $wgTitle ) ); |
1228 | 1233 | |
— | — | @@ -1873,8 +1878,10 @@ |
1874 | 1879 | if ( $wgRawHtml && !$this->mTokenOk ) { |
1875 | 1880 | // Could be an offsite preview attempt. This is very unsafe if |
1876 | 1881 | // HTML is enabled, as it could be an attack. |
1877 | | - return $wgOut->parse( "<div class='previewnote'>" . |
| 1882 | + $parsedNote = $wgOut->parse( "<div class='previewnote'>" . |
1878 | 1883 | wfMsg( 'session_fail_preview_html' ) . "</div>" ); |
| 1884 | + wfProfileOut( __METHOD__ ); |
| 1885 | + return $parsedNote; |
1879 | 1886 | } |
1880 | 1887 | |
1881 | 1888 | # don't parse user css/js, show message about preview |
Index: branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoader.php |
— | — | @@ -443,6 +443,7 @@ |
444 | 444 | return '/* No modules requested. Max made me put this here */'; |
445 | 445 | } |
446 | 446 | |
| 447 | + wfProfileIn( __METHOD__ ); |
447 | 448 | // Pre-fetch blobs |
448 | 449 | if ( $context->shouldIncludeMessages() ) { |
449 | 450 | try { |
— | — | @@ -523,15 +524,16 @@ |
524 | 525 | } |
525 | 526 | } |
526 | 527 | |
527 | | - if ( $context->getDebug() ) { |
528 | | - return $exceptions . $out; |
529 | | - } else { |
| 528 | + if ( !$context->getDebug() ) { |
530 | 529 | if ( $context->getOnly() === 'styles' ) { |
531 | | - return $exceptions . $this->filter( 'minify-css', $out ); |
| 530 | + $out = $this->filter( 'minify-css', $out ); |
532 | 531 | } else { |
533 | | - return $exceptions . $this->filter( 'minify-js', $out ); |
| 532 | + $out = $this->filter( 'minify-js', $out ); |
534 | 533 | } |
535 | 534 | } |
| 535 | + |
| 536 | + wfProfileOut( __METHOD__ ); |
| 537 | + return $exceptions . $out; |
536 | 538 | } |
537 | 539 | |
538 | 540 | /* Static Methods */ |
Property changes on: branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
539 | 541 | Merged /trunk/phase3/includes/resourceloader/ResourceLoader.php:r81729,81890-81894,81896-81898,81900 |
Index: branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -363,6 +363,7 @@ |
364 | 364 | $this->modifiedTime[$context->getHash()] = max( |
365 | 365 | $filesMtime, |
366 | 366 | $this->getMsgBlobMtime( $context->getLanguage() ) ); |
| 367 | + |
367 | 368 | wfProfileOut( __METHOD__ ); |
368 | 369 | return $this->modifiedTime[$context->getHash()]; |
369 | 370 | } |
Index: branches/wmf/1.17wmf1/includes/media/SVGMetadataExtractor.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | */ |
50 | 50 | function __construct( $source ) { |
51 | 51 | $this->reader = new XMLReader(); |
52 | | - $this->reader->open( $source ); |
| 52 | + $this->reader->open( $source, null, LIBXML_NOERROR | LIBXML_NOWARNING ); |
53 | 53 | |
54 | 54 | $this->metadata['width'] = self::DEFAULT_WIDTH; |
55 | 55 | $this->metadata['height'] = self::DEFAULT_HEIGHT; |
Index: branches/wmf/1.17wmf1/includes/Title.php |
— | — | @@ -2098,8 +2098,6 @@ |
2099 | 2099 | Title::purgeExpiredRestrictions(); |
2100 | 2100 | } |
2101 | 2101 | |
2102 | | - wfProfileOut( __METHOD__ ); |
2103 | | - |
2104 | 2102 | if ( $getPages ) { |
2105 | 2103 | $this->mCascadeSources = $sources; |
2106 | 2104 | $this->mCascadingRestrictions = $pagerestrictions; |
— | — | @@ -2107,6 +2105,7 @@ |
2108 | 2106 | $this->mHasCascadingRestrictions = $sources; |
2109 | 2107 | } |
2110 | 2108 | |
| 2109 | + wfProfileOut( __METHOD__ ); |
2111 | 2110 | return array( $sources, $pagerestrictions ); |
2112 | 2111 | } |
2113 | 2112 | |
Property changes on: branches/wmf/1.17wmf1/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2114 | 2113 | Merged /trunk/phase3/includes/Title.php:r81729,81890-81894,81896-81898,81900 |
Index: branches/wmf/1.17wmf1/includes/job/RefreshLinksJob.php |
— | — | @@ -99,6 +99,8 @@ |
100 | 100 | $jobs[] = new RefreshLinksJob( $title, '' ); |
101 | 101 | } |
102 | 102 | Job::batchInsert( $jobs ); |
| 103 | + |
| 104 | + wfProfileOut( __METHOD__ ); |
103 | 105 | return true; |
104 | 106 | } |
105 | 107 | # Re-parse each page that transcludes this page and update their tracking links... |
Index: branches/wmf/1.17wmf1/includes/specials/SpecialAllmessages.php |
— | — | @@ -202,8 +202,8 @@ |
203 | 203 | |
204 | 204 | // Normalise message names so they look like page titles |
205 | 205 | $messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames ); |
206 | | - wfProfileIn( __METHOD__ ); |
207 | 206 | |
| 207 | + wfProfileOut( __METHOD__ ); |
208 | 208 | return $messageNames; |
209 | 209 | } |
210 | 210 | |
Index: branches/wmf/1.17wmf1/includes/DjVuImage.php |
— | — | @@ -226,6 +226,8 @@ |
227 | 227 | */ |
228 | 228 | function retrieveMetaData() { |
229 | 229 | global $wgDjvuToXML, $wgDjvuDump, $wgDjvuTxt; |
| 230 | + wfProfileIn( __METHOD__ ); |
| 231 | + |
230 | 232 | if ( isset( $wgDjvuDump ) ) { |
231 | 233 | # djvudump is faster as of version 3.5 |
232 | 234 | # http://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583 |
— | — | @@ -272,6 +274,7 @@ |
273 | 275 | $xml = $xml . $txt. '</mw-djvu>' ; |
274 | 276 | } |
275 | 277 | } |
| 278 | + wfProfileOut( __METHOD__ ); |
276 | 279 | return $xml; |
277 | 280 | } |
278 | 281 | |
Index: branches/wmf/1.17wmf1/thumb.php |
— | — | @@ -59,11 +59,13 @@ |
60 | 60 | $bits = explode( '!', $fileName, 2 ); |
61 | 61 | if( !isset($bits[1]) ) { |
62 | 62 | wfThumbError( 404, wfMsg( 'badtitletext' ) ); |
| 63 | + wfProfileOut( __METHOD__ ); |
63 | 64 | return; |
64 | 65 | } |
65 | 66 | $title = Title::makeTitleSafe( NS_FILE, $bits[1] ); |
66 | 67 | if( is_null($title) ) { |
67 | 68 | wfThumbError( 404, wfMsg( 'badtitletext' ) ); |
| 69 | + wfProfileOut( __METHOD__ ); |
68 | 70 | return; |
69 | 71 | } |
70 | 72 | $img = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $title, $fileName ); |
— | — | @@ -86,6 +88,7 @@ |
87 | 89 | if ( !$img->getTitle() || !$img->getTitle()->userCanRead() ) { |
88 | 90 | wfThumbError( 403, 'Access denied. You do not have permission to access ' . |
89 | 91 | 'the source file.' ); |
| 92 | + wfProfileOut( __METHOD__ ); |
90 | 93 | return; |
91 | 94 | } |
92 | 95 | $headers[] = 'Cache-Control: private'; |
— | — | @@ -94,15 +97,18 @@ |
95 | 98 | |
96 | 99 | if ( !$img ) { |
97 | 100 | wfThumbError( 404, wfMsg( 'badtitletext' ) ); |
| 101 | + wfProfileOut( __METHOD__ ); |
98 | 102 | return; |
99 | 103 | } |
100 | 104 | if ( !$img->exists() ) { |
101 | 105 | wfThumbError( 404, 'The source file for the specified thumbnail does not exist.' ); |
| 106 | + wfProfileOut( __METHOD__ ); |
102 | 107 | return; |
103 | 108 | } |
104 | 109 | $sourcePath = $img->getPath(); |
105 | 110 | if ( $sourcePath === false ) { |
106 | 111 | wfThumbError( 500, 'The source file is not locally accessible.' ); |
| 112 | + wfProfileOut( __METHOD__ ); |
107 | 113 | return; |
108 | 114 | } |
109 | 115 | |
— | — | @@ -118,6 +124,7 @@ |
119 | 125 | wfRestoreWarnings(); |
120 | 126 | if ( $stat['mtime'] <= $imsUnix ) { |
121 | 127 | header( 'HTTP/1.1 304 Not Modified' ); |
| 128 | + wfProfileOut( __METHOD__ ); |
122 | 129 | return; |
123 | 130 | } |
124 | 131 | } |
— | — | @@ -129,11 +136,13 @@ |
130 | 137 | |
131 | 138 | if ( is_file( $thumbPath ) ) { |
132 | 139 | wfStreamFile( $thumbPath, $headers ); |
| 140 | + wfProfileOut( __METHOD__ ); |
133 | 141 | return; |
134 | 142 | } |
135 | 143 | } |
136 | 144 | } catch ( MWException $e ) { |
137 | 145 | wfThumbError( 500, $e->getHTML() ); |
| 146 | + wfProfileOut( __METHOD__ ); |
138 | 147 | return; |
139 | 148 | } |
140 | 149 | |
Index: branches/wmf/1.17wmf1/languages/LanguageConverter.php |
— | — | @@ -345,6 +345,7 @@ |
346 | 346 | if ( !$toVariant ) { |
347 | 347 | $toVariant = $this->getPreferredVariant(); |
348 | 348 | if ( !$toVariant ) { |
| 349 | + wfProfileOut( __METHOD__ ); |
349 | 350 | return $text; |
350 | 351 | } |
351 | 352 | } |
Property changes on: branches/wmf/1.17wmf1/languages/LanguageConverter.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
352 | 353 | Merged /trunk/phase3/languages/LanguageConverter.php:r81729,81890-81894,81896-81898,81900 |