From e7fea8cec672d4b002ab8fbfbe8691f9c8df7012 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 5 Aug 2004 07:48:20 +0000 Subject: [PATCH] Database::setIgnoreErrors() doesn't seem to exist anymore. Switched to Database::ignoreErrors() --- includes/Article.php | 6 +++--- includes/DatabaseFunctions.php | 2 +- includes/SpecialImport.php | 2 +- includes/SpecialMakesysop.php | 2 +- maintenance/archives/moveCustomMessages.inc | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index f14d904f4e..5ada1873bc 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1848,14 +1848,14 @@ class Article { } # Not important enough to warrant an error page in case of failure - $oldignore = $dbw->setIgnoreErrors( true ); + $oldignore = $dbw->ignoreErrors( true ); $dbw->query( "INSERT INTO $hitcounterTable (hc_id) VALUES ({$id})" ); $checkfreq = intval( $wgHitcounterUpdateFreq/25 + 1 ); if( (rand() % $checkfreq != 0) or ($dbw->lastErrno() != 0) ){ # Most of the time (or on SQL errors), skip row count check - $dbw->setIgnoreErrors( $oldignore ); + $dbw->ignoreErrors( $oldignore ); return; } @@ -1879,7 +1879,7 @@ class Article { ignore_user_abort( $old_user_abort ); wfProfileOut( 'Article::incViewCount-collect' ); } - $dbw->setIgnoreErrors( $oldignore ); + $dbw->ignoreErrors( $oldignore ); } # The onArticle*() functions are supposed to be a kind of hooks diff --git a/includes/DatabaseFunctions.php b/includes/DatabaseFunctions.php index 43594a3a5c..e0a766d0e4 100644 --- a/includes/DatabaseFunctions.php +++ b/includes/DatabaseFunctions.php @@ -63,7 +63,7 @@ function wfIgnoreSQLErrors( $newstate, $dbi = DB_LAST ) { $db =& wfGetDB( $dbi ); if ( $db !== false ) { - return $db->setIgnoreErrors( $newstate ); + return $db->ignoreErrors( $newstate ); } else { return NULL; } diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 153683418f..a11e65c837 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -474,7 +474,7 @@ class WikiImporter { } # Insert the row - $oldIgnore = $dbw->setIgnoreErrors( true ); + $oldIgnore = $dbw->ignoreErrors( true ); $success = $dbw->insert( 'old', array( 'old_namespace' => intval( $this->title->getNamespace() ), diff --git a/includes/SpecialMakesysop.php b/includes/SpecialMakesysop.php index 622dd2673c..0c1aa55076 100644 --- a/includes/SpecialMakesysop.php +++ b/includes/SpecialMakesysop.php @@ -149,7 +149,7 @@ class MakesysopForm { $sql = "SELECT user_id, user_rights FROM $usertable WHERE user_name = '{$username}' FOR UPDATE"; } - $prev = $dbw->setIgnoreErrors( TRUE ); + $prev = $dbw->ignoreErrors( TRUE ); $res = $dbw->query( $sql ); $dbw->setIgnoreSQLErrors( $prev ); diff --git a/maintenance/archives/moveCustomMessages.inc b/maintenance/archives/moveCustomMessages.inc index e4eadd5e70..0bc611910c 100644 --- a/maintenance/archives/moveCustomMessages.inc +++ b/maintenance/archives/moveCustomMessages.inc @@ -19,7 +19,7 @@ function moveCustomMessages( $phase ) { $dbw =& wfGetDB( DB_MASTER ); - $dbw->setIgnoreErrors( true ); + $dbw->ignoreErrors( true ); # Compose DB key array $dbkeys = array(); -- 2.20.1