From: Aaron Schulz Date: Tue, 1 Oct 2013 20:07:59 +0000 (-0700) Subject: Added comment about not using ignoreErrors() X-Git-Tag: 1.31.0-rc.0~18633^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=cef0b81cdc39f98fe7a3342b42ed43da03f4e22d;p=lhc%2Fweb%2Fwiklou.git Added comment about not using ignoreErrors() * Using this makes it easy to forget to restore the old value, which then complicates anything that inserts to the DB. * Also removed mention of the flag from some places. Change-Id: I838183222518e0d008dee47ec8df6b3f3dc578e9 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5b1d4b3089..89e6c875b6 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1623,7 +1623,6 @@ $wgSharedTables = array( 'user', 'user_properties' ); * - DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended) * - DBO_DEBUG -- equivalent of $wgDebugDumpSql * - DBO_TRX -- wrap entire request in a transaction - * - DBO_IGNORE -- ignore errors (not useful in LocalSettings.php) * - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php) * - DBO_PERSISTENT -- enables persistent database connections * - DBO_SSL -- uses SSL/TLS encryption in database connections, if available diff --git a/includes/db/Database.php b/includes/db/Database.php index 27e6dadb06..4b25bd34fd 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -360,6 +360,8 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * code should use lastErrno() and lastError() to handle the * situation as appropriate. * + * Do not use this function outside of the Database classes. + * * @param $ignoreErrors bool|null * * @return bool The previous value of the flag. @@ -582,7 +584,6 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * @param $flag Integer: DBO_* constants from Defines.php: * - DBO_DEBUG: output some debug info (same as debug()) * - DBO_NOBUFFER: don't buffer results (inverse of bufferResults()) - * - DBO_IGNORE: ignore errors (same as ignoreErrors()) * - DBO_TRX: automatically start transactions * - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode * and removes it in command line mode