create Article, EditPage and ExternalEdit via ContentHandler
[lhc/web/wiklou.git] / includes / api / ApiEditPage.php
index cd07e30..3b74dac 100644 (file)
@@ -240,7 +240,9 @@ class ApiEditPage extends ApiBase {
                // TODO: Make them not or check if they still do
                $wgTitle = $titleObj;
 
-               $ep = new EditPage( $articleObj );
+        $handler = ContentHandler::getForTitle( $titleObj );
+               $ep = $handler->createEditPage( $articleObj );
+
                $ep->setContextTitle( $titleObj );
                $ep->importFormData( $req );