From: daniel Date: Wed, 24 Oct 2012 13:40:17 +0000 (+0200) Subject: (Bug 41298) partial fix: re-applying Id7b331e1b X-Git-Tag: 1.31.0-rc.0~21873^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=691a1d3d5b1992fed4a341d61998c489913303c0;p=lhc%2Fweb%2Fwiklou.git (Bug 41298) partial fix: re-applying Id7b331e1b Changes to EditPage.php apparently got lost during merge. Wonder how that happened, there are no conflicts. Change-Id: I5449d0331f5d60ed0296b69888e10272f47f9d42 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index d7b658fbd6..24b7c6ba94 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -409,10 +409,13 @@ class EditPage { wfProfileOut( __METHOD__ ); return; } - if ( !$this->mTitle->getArticleID() ) + + if ( !$this->mTitle->getArticleID() ) { wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) ); - else + } else { wfRunHooks( 'EditFormInitialText', array( $this ) ); + } + } $this->showEditForm(); @@ -606,8 +609,10 @@ class EditPage { // modified by subclasses wfProfileIn( get_class( $this ) . "::importContentFormData" ); $textbox1 = $this->importContentFormData( $request ); - if ( isset( $textbox1 ) ) + if ( isset( $textbox1 ) ) { $this->textbox1 = $textbox1; + } + wfProfileOut( get_class( $this ) . "::importContentFormData" ); } @@ -2269,10 +2274,13 @@ class EditPage { $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'userinvalidcssjstitle', $this->mTitle->getSkinFromCssJsSubpage() ) ); } if ( $this->formtype !== 'preview' ) { - if ( $this->isCssSubpage ) + if ( $this->isCssSubpage ) { $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'usercssyoucanpreview' ) ); - if ( $this->isJsSubpage ) + } + + if ( $this->isJsSubpage ) { $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'userjsyoucanpreview' ) ); + } } } } @@ -2403,14 +2411,16 @@ class EditPage { * @return String */ protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) { - if ( !$summary || ( !$this->preview && !$this->diff ) ) + if ( !$summary || ( !$this->preview && !$this->diff ) ) { return ""; + } global $wgParser; - if ( $isSubjectPreview ) + if ( $isSubjectPreview ) { $summary = wfMessage( 'newsectionsummary', $wgParser->stripSectionName( $summary ) ) ->inContentLanguage()->text(); + } $message = $isSubjectPreview ? 'subject-preview' : 'summary-preview'; @@ -2429,8 +2439,9 @@ class EditPage { HTML ); - if ( !$this->checkUnicodeCompliantBrowser() ) + if ( !$this->checkUnicodeCompliantBrowser() ) { $wgOut->addHTML( Html::hidden( 'safemode', '1' ) ); + } } protected function showFormAfterText() { @@ -2546,8 +2557,9 @@ HTML $attribs = array( 'id' => 'wikiPreview', 'class' => implode( ' ', $classes ) ); - if ( $this->formtype != 'preview' ) + if ( $this->formtype != 'preview' ) { $attribs['style'] = 'display: none;'; + } $wgOut->addHTML( Xml::openElement( 'div', $attribs ) ); @@ -2852,10 +2864,13 @@ HTML ); // Quick paranoid permission checks... if ( is_object( $data ) ) { - if ( $data->log_deleted & LogPage::DELETED_USER ) + if ( $data->log_deleted & LogPage::DELETED_USER ) { $data->user_name = wfMessage( 'rev-deleted-user' )->escaped(); - if ( $data->log_deleted & LogPage::DELETED_COMMENT ) + } + + if ( $data->log_deleted & LogPage::DELETED_COMMENT ) { $data->log_comment = wfMessage( 'rev-deleted-comment' )->escaped(); + } } return $data; }