Merge "config: Change ConfigException to extend LogicException"
[lhc/web/wiklou.git] / includes / actions / EditAction.php
index 9b70994..df48f88 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- * action=edit handler
- *
- * Copyright © 2012 Timo Tijhof
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  *
  * @file
  * @ingroup Actions
- * @author Timo Tijhof
  */
 
 /**
- * Page edition handler
+ * Page edition handler (action=edit)
  *
  * This is a wrapper that will call the EditPage class or a custom editor from an extension.
  *
@@ -46,16 +41,17 @@ class EditAction extends FormlessAction {
                $out = $this->getOutput();
                $out->setRobotPolicy( 'noindex,nofollow' );
                if ( $this->getContext()->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
-                       $out->addModuleStyles( array(
+                       $out->addModuleStyles( [
                                'mediawiki.ui.input',
                                'mediawiki.ui.checkbox',
-                       ) );
+                       ] );
                }
                $page = $this->page;
                $user = $this->getUser();
 
-               if ( Hooks::run( 'CustomEditor', array( $page, $user ) ) ) {
+               if ( Hooks::run( 'CustomEditor', [ $page, $user ] ) ) {
                        $editor = new EditPage( $page );
+                       $editor->setContextTitle( $this->getTitle() );
                        $editor->edit();
                }
        }