WMDE-Fisch has uploaded a new change for review. https://gerrit.wikimedia.org/r/318101
Change subject: Move condition to not show form one level up ...................................................................... Move condition to not show form one level up This condition to abort the show form process was more or less hidden in the header method. The returned boolean was used nowhere else. Change-Id: I91335deac0547c24d107305a2ded503c9ab15090 --- M includes/EditPage.php 1 file changed, 12 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/318101/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 4aa87d6..047c2e8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2620,9 +2620,20 @@ $this->setHeaders(); - if ( $this->showHeader() === false ) { + $this->addTalkPageText(); + $this->addEditNotices(); + + if( !$this->isConflict && + $this->section != '' && + !$this->isSectionEditSupported() ) { + // We use $this->section to much before this and getVal('wgSection') directly in other places + // at this point we can't reset $this->section to '' to fallback to non-section editing. + // Someone is welcome to try refactoring though + $wgOut->showErrorPage( 'sectioneditnotsupported-title', 'sectioneditnotsupported-text' ); return; } + + $this->showHeader(); $wgOut->addHTML( $this->editFormPageTop ); @@ -2885,22 +2896,10 @@ global $wgOut, $wgUser, $wgMaxArticleSize, $wgLang; global $wgAllowUserCss, $wgAllowUserJs; - $this->addTalkPageText(); - - $this->addEditNotices(); - if ( $this->isConflict ) { $wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' ); $this->editRevId = $this->page->getLatest(); } else { - if ( $this->section != '' && !$this->isSectionEditSupported() ) { - // We use $this->section to much before this and getVal('wgSection') directly in other places - // at this point we can't reset $this->section to '' to fallback to non-section editing. - // Someone is welcome to try refactoring though - $wgOut->showErrorPage( 'sectioneditnotsupported-title', 'sectioneditnotsupported-text' ); - return false; - } - if ( $this->section != '' && $this->section != 'new' ) { if ( !$this->summary && !$this->preview && !$this->diff ) { $sectionTitle = self::extractSectionTitle( $this->textbox1 ); // FIXME: use Content object @@ -3087,8 +3086,6 @@ } # Add header copyright warning $this->showHeaderCopyrightWarning(); - - return true; } /** -- To view, visit https://gerrit.wikimedia.org/r/318101 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91335deac0547c24d107305a2ded503c9ab15090 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: WMDE-Fisch <christoph.jau...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits