diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:31:04 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:58:39 +0200 |
commit | f6d65e533c62f6deb21342d4901ece24497b433e (patch) | |
tree | f28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/content/WikitextContent.php | |
parent | c27b2e832fe25651ef2410fae85b41072aae7519 (diff) |
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/content/WikitextContent.php')
-rw-r--r-- | includes/content/WikitextContent.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index 9a8ab3a6..dbe09f91 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -68,13 +68,11 @@ class WikitextContent extends TextContent { * @see Content::replaceSection() */ public function replaceSection( $sectionId, Content $with, $sectionTitle = '' ) { - wfProfileIn( __METHOD__ ); $myModelId = $this->getModel(); $sectionModelId = $with->getModel(); if ( $sectionModelId != $myModelId ) { - wfProfileOut( __METHOD__ ); throw new MWException( "Incompatible content model for section: " . "document uses $myModelId but " . "section uses $sectionModelId." ); @@ -84,7 +82,6 @@ class WikitextContent extends TextContent { $text = $with->getNativeData(); if ( strval( $sectionId ) === '' ) { - wfProfileOut( __METHOD__ ); return $with; # XXX: copy first? } @@ -93,7 +90,7 @@ class WikitextContent extends TextContent { # Inserting a new section $subject = $sectionTitle ? wfMessage( 'newsectionheaderdefaultlevel' ) ->rawParams( $sectionTitle )->inContentLanguage()->text() . "\n\n" : ''; - if ( wfRunHooks( 'PlaceNewSection', array( $this, $oldtext, $subject, &$text ) ) ) { + if ( Hooks::run( 'PlaceNewSection', array( $this, $oldtext, $subject, &$text ) ) ) { $text = strlen( trim( $oldtext ) ) > 0 ? "{$oldtext}\n\n{$subject}{$text}" : "{$subject}{$text}"; @@ -107,8 +104,6 @@ class WikitextContent extends TextContent { $newContent = new static( $text ); - wfProfileOut( __METHOD__ ); - return $newContent; } |