Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -795,6 +795,8 @@ |
796 | 796 | |
797 | 797 | if ( !wfRunHooks( 'EditPage::attemptSave', array( $this ) ) ) { |
798 | 798 | wfDebug( "Hook 'EditPage::attemptSave' aborted article saving\n" ); |
| 799 | + wfProfileOut( __METHOD__ . '-checks' ); |
| 800 | + wfProfileOut( __METHOD__ ); |
799 | 801 | return self::AS_HOOK_ERROR; |
800 | 802 | } |
801 | 803 | |
— | — | @@ -802,11 +804,12 @@ |
803 | 805 | if ( $this->mTitle->getNamespace() == NS_FILE && |
804 | 806 | Title::newFromRedirect( $this->textbox1 ) instanceof Title && |
805 | 807 | !$wgUser->isAllowed( 'upload' ) ) { |
806 | | - if ( $wgUser->isAnon() ) { |
807 | | - return self::AS_IMAGE_REDIRECT_ANON; |
808 | | - } else { |
809 | | - return self::AS_IMAGE_REDIRECT_LOGGED; |
810 | | - } |
| 808 | + $isAnon = $wgUser->isAnon(); |
| 809 | + |
| 810 | + wfProfileOut( __METHOD__ . '-checks' ); |
| 811 | + wfProfileOut( __METHOD__ ); |
| 812 | + |
| 813 | + return $isAnon ? self::AS_IMAGE_REDIRECT_ANON : self::AS_IMAGE_REDIRECT_LOGGED; |
811 | 814 | } |
812 | 815 | |
813 | 816 | # Check for spam |
— | — | @@ -1255,8 +1258,10 @@ |
1256 | 1259 | # Enabled article-related sidebar, toplinks, etc. |
1257 | 1260 | $wgOut->setArticleRelated( true ); |
1258 | 1261 | |
1259 | | - if ( $this->showHeader() === false ) |
| 1262 | + if ( $this->showHeader() === false ) { |
| 1263 | + wfProfileOut( __METHOD__ ); |
1260 | 1264 | return; |
| 1265 | + } |
1261 | 1266 | |
1262 | 1267 | $action = htmlspecialchars( $this->getActionURL( $wgTitle ) ); |
1263 | 1268 | |
— | — | @@ -1910,8 +1915,10 @@ |
1911 | 1916 | if ( $wgRawHtml && !$this->mTokenOk ) { |
1912 | 1917 | // Could be an offsite preview attempt. This is very unsafe if |
1913 | 1918 | // HTML is enabled, as it could be an attack. |
1914 | | - return $wgOut->parse( "<div class='previewnote'>" . |
| 1919 | + $parsedNote = $wgOut->parse( "<div class='previewnote'>" . |
1915 | 1920 | wfMsg( 'session_fail_preview_html' ) . "</div>" ); |
| 1921 | + wfProfileOut( __METHOD__ ); |
| 1922 | + return $parsedNote; |
1916 | 1923 | } |
1917 | 1924 | |
1918 | 1925 | # don't parse user css/js, show message about preview |