Merge "EditPage::newSectionSummary should return a value in all code paths"
[lhc/web/wiklou.git] / includes / api / ApiUndelete.php
index 7d6a7e4..df245cd 100644 (file)
@@ -56,7 +56,7 @@ class ApiUndelete extends ApiBase {
                        $params['timestamps'][$i] = wfTimestamp( TS_MW, $ts );
                }
 
-               $pa = new PageArchive( $titleObj );
+               $pa = new PageArchive( $titleObj, $this->getConfig() );
                $retval = $pa->undelete(
                        ( isset( $params['timestamps'] ) ? $params['timestamps'] : array() ),
                        $params['reason'],
@@ -142,17 +142,6 @@ class ApiUndelete extends ApiBase {
                );
        }
 
-       public function getResultProperties() {
-               return array(
-                       '' => array(
-                               'title' => 'string',
-                               'revisions' => 'integer',
-                               'filerevisions' => 'integer',
-                               'reason' => 'string'
-                       )
-               );
-       }
-
        public function getDescription() {
                return array(
                        'Restore certain revisions of a deleted page. A list of deleted revisions ',
@@ -161,15 +150,6 @@ class ApiUndelete extends ApiBase {
                );
        }
 
-       public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(), array(
-                       array( 'permdenied-undelete' ),
-                       array( 'blockedtext' ),
-                       array( 'invalidtitle', 'title' ),
-                       array( 'cannotundelete' ),
-               ) );
-       }
-
        public function needsToken() {
                return true;
        }