From 4c436c36149b577fc650cdc9f6a5b0e5ddbf6209 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 19 Jan 2007 09:50:19 +0000 Subject: [PATCH] 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) --- includes/Article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(), -- 2.20.1