Index: includes/EditPage.php =================================================================== --- includes/EditPage.php (revision 86761) +++ includes/EditPage.php (working copy) @@ -57,6 +57,7 @@ var $isCssJsSubpage = false; var $isCssSubpage = false; var $isJsSubpage = false; + var $isNew = false; // new page or new section var $deletedSinceEdit; var $formtype; var $firsttime; @@ -415,10 +416,11 @@ $this->isConflict = false; // css / js subpages of user pages get a special treatment - $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage(); - $this->isCssSubpage = $this->mTitle->isCssSubpage(); - $this->isJsSubpage = $this->mTitle->isJsSubpage(); + $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage(); + $this->isCssSubpage = $this->mTitle->isCssSubpage(); + $this->isJsSubpage = $this->mTitle->isJsSubpage(); $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage(); + $this->isNew = !$this->mTitle->exists() || $this->section == 'new'; # Show applicable editing introductions if ( $this->formtype == 'initial' || $this->firsttime ) @@ -1128,7 +1130,7 @@ $flags = EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY | ( $new ? EDIT_NEW : EDIT_UPDATE ) | - ( $this->minoredit ? EDIT_MINOR : 0 ) | + ( ( $this->minoredit && !$this->isNew ) ? EDIT_MINOR : 0 ) | ( $bot ? EDIT_FORCE_BOT : 0 ); $status = $this->mArticle->doEdit( $text, $this->summary, $flags ); @@ -1237,7 +1239,7 @@ # Already watched $this->watchthis = true; } - if ( $wgUser->getOption( 'minordefault' ) ) $this->minoredit = true; + if ( $wgUser->getOption( 'minordefault' ) && !$this->isNew ) $this->minoredit = true; if ( $this->textbox1 === false ) return false; wfProxyCheck(); return true; @@ -2440,19 +2442,22 @@ $checkboxes = array(); - $checkboxes['minor'] = ''; - $minorLabel = wfMsgExt( 'minoredit', array( 'parseinline' ) ); - if ( $wgUser->isAllowed( 'minoredit' ) ) { - $attribs = array( - 'tabindex' => ++$tabindex, - 'accesskey' => wfMsg( 'accesskey-minoredit' ), - 'id' => 'wpMinoredit', - ); - $checkboxes['minor'] = - Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) . - " "; + // don't show the minor edit checkbox if it's a new page or section + if ( !$this->isNew ) { + $checkboxes['minor'] = ''; + $minorLabel = wfMsgExt( 'minoredit', array( 'parseinline' ) ); + if ( $wgUser->isAllowed( 'minoredit' ) ) { + $attribs = array( + 'tabindex' => ++$tabindex, + 'accesskey' => wfMsg( 'accesskey-minoredit' ), + 'id' => 'wpMinoredit', + ); + $checkboxes['minor'] = + Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) . + " "; + } } $watchLabel = wfMsgExt( 'watchthis', array( 'parseinline' ) );