Fix for MySQL strict mode; explicitly set the deprecated page_restrictions field...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 19 Jan 2007 09:50:19 +0000 (09:50 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 19 Jan 2007 09:50:19 +0000 (09:50 +0000)
Also removed the now-useless $restrictions parameter from Article::insertOn(); it was optional and wasn't used anywhere anyway.
Aaaand while in there, cleaned up an unnecessary reference parameter (old php 4 compat)

includes/Article.php

index 1b91814..45b0747 100644 (file)
@@ -973,11 +973,10 @@ class Article {
         * Best if all done inside a transaction.
         *
         * @param Database $dbw
-        * @param string   $restrictions
         * @return int     The newly created page_id key
         * @private
         */
-       function insertOn( &$dbw, $restrictions = '' ) {
+       function insertOn( $dbw ) {
                wfProfileIn( __METHOD__ );
 
                $page_id = $dbw->nextSequenceValue( 'page_page_id_seq' );
@@ -986,6 +985,7 @@ class Article {
                        'page_namespace'    => $this->mTitle->getNamespace(),
                        'page_title'        => $this->mTitle->getDBkey(),
                        'page_counter'      => 0,
+                       'page_restrictions' => '',
                        'page_is_redirect'  => 0, # Will set this shortly...
                        'page_is_new'       => 1,
                        'page_random'       => wfRandom(),