Merge "Add a test for named vs. positional parameter whitespace stripping"
[lhc/web/wiklou.git] / includes / WikiPage.php
index bdec273..df3086a 100644 (file)
@@ -1447,7 +1447,7 @@ class WikiPage extends Page implements IDBAccessObject {
 
        /**
         * @param $section null|bool|int or a section number (0, 1, 2, T1, T2...)
-        * @param $content Content: new content of the section
+        * @param $sectionContent Content: new content of the section
         * @param $sectionTitle String: new section's subject, only if $section is 'new'
         * @param $edittime String: revision timestamp or null to use the current revision
         *
@@ -1708,6 +1708,7 @@ class WikiPage extends Page implements IDBAccessObject {
 
                        $revision = new Revision( array(
                                'page'       => $this->getId(),
+                               'title'      => $this->getTitle(), // for determining the default content model
                                'comment'    => $summary,
                                'minor_edit' => $isminor,
                                'text'       => $serialized,
@@ -1835,6 +1836,7 @@ class WikiPage extends Page implements IDBAccessObject {
                        # Save the revision text...
                        $revision = new Revision( array(
                                'page'       => $newid,
+                               'title'      => $this->getTitle(), // for determining the default content model
                                'comment'    => $summary,
                                'minor_edit' => $isminor,
                                'text'       => $serialized,
@@ -2161,6 +2163,7 @@ class WikiPage extends Page implements IDBAccessObject {
 
                $dbw = wfGetDB( DB_MASTER );
                $revision = new Revision( array(
+                       'title'      => $this->getTitle(), // for determining the default content model
                        'page'       => $this->getId(),
                        'text'       => $serialized,
                        'length'     => $content->getSize(),
@@ -2450,6 +2453,7 @@ class WikiPage extends Page implements IDBAccessObject {
         * @param $reason string delete reason for deletion log
         * @param $suppress boolean suppress all revisions and log the deletion in
         *        the suppression log instead of the deletion log
+        * @param $id int article ID
         * @param $commit boolean defaults to true, triggers transaction end
         * @param &$error Array of errors to append to
         * @param $user User The deleting user