From: Brion Vibber Date: Fri, 19 Jan 2007 09:50:19 +0000 (+0000) Subject: Fix for MySQL strict mode; explicitly set the deprecated page_restrictions field... X-Git-Tag: 1.31.0-rc.0~54302 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=4c436c36149b577fc650cdc9f6a5b0e5ddbf6209;p=lhc%2Fweb%2Fwiklou.git Fix for MySQL strict mode; explicitly set the deprecated page_restrictions field when inserting a new page record. 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) --- diff --git a/includes/Article.php b/includes/Article.php index 1b91814d1d..45b0747336 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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(),