Add a function that returns a list of categories the page is a member of
[lhc/web/wiklou.git] / includes / EditPage.php
index 96cc908..1b59430 100644 (file)
@@ -521,6 +521,8 @@ class EditPage {
                $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'templatesUsed' ),
                        Linker::formatTemplates( $this->getTemplates() ) ) );
 
+               $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
+
                if ( $this->mTitle->exists() ) {
                        $wgOut->returnToMain( null, $this->mTitle );
                }
@@ -1400,6 +1402,13 @@ class EditPage {
 
                # Check for spam
                $match = self::matchSummarySpamRegex( $this->summary );
+               if ( $match === false && $this->section == 'new' ) {
+                       if ( $this->sectiontitle !== '' ) {
+                               $match = self::matchSpamRegex( $this->sectiontitle );
+                       } else {
+                               $match = self::matchSpamRegex( $this->summary );
+                       }
+               }
                if ( $match === false ) {
                        $match = self::matchSpamRegex( $this->textbox1 );
                }
@@ -2270,6 +2279,8 @@ class EditPage {
                $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'hiddencats' ),
                        Linker::formatHiddenCategories( $this->mArticle->getHiddenCategories() ) ) );
 
+               $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
+
                if ( $this->isConflict ) {
                        try {
                                $this->showConflict();
@@ -2313,7 +2324,7 @@ class EditPage {
                }
 
                // Add edit notices
-               $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices() ) );
+               $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices( $this->oldid ) ) );
 
                if ( $this->isConflict ) {
                        $wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );