Added comment about not using ignoreErrors()
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 1 Oct 2013 20:07:59 +0000 (13:07 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 1 Oct 2013 20:08:43 +0000 (13:08 -0700)
* 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

includes/DefaultSettings.php
includes/db/Database.php

index 5b1d4b3..89e6c87 100644 (file)
@@ -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
index 27e6dad..4b25bd3 100644 (file)
@@ -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