raise timeout for CdbTest::testCdb()
[lhc/web/wiklou.git] / includes / api / ApiEditPage.php
index 81b3ef2..74d3e14 100644 (file)
@@ -68,12 +68,12 @@ class ApiEditPage extends ApiBase {
                                $redirValues = array();
                                foreach ( $titles as $id => $newTitle ) {
 
-                                       if ( !isset( $titles[ $id - 1 ] ) ) {
-                                               $titles[ $id - 1 ] = $oldTitle;
+                                       if ( !isset( $titles[$id - 1] ) ) {
+                                               $titles[$id - 1] = $oldTitle;
                                        }
 
                                        $redirValues[] = array(
-                                               'from' => $titles[ $id - 1 ]->getPrefixedText(),
+                                               'from' => $titles[$id - 1]->getPrefixedText(),
                                                'to' => $newTitle->getPrefixedText()
                                        );
 
@@ -407,6 +407,7 @@ class ApiEditPage extends ApiBase {
                                } else {
                                        $r['oldrevid'] = intval( $oldRevId );
                                        $r['newrevid'] = intval( $newRevId );
+                                       $pageObj->clear();
                                        $r['newtimestamp'] = wfTimestamp( TS_ISO_8601,
                                                $pageObj->getTimestamp() );
                                }
@@ -648,8 +649,4 @@ class ApiEditPage extends ApiBase {
        public function getHelpUrls() {
                return 'https://www.mediawiki.org/wiki/API:Edit';
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }