Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/86998


Change subject: Added comment about not using ignoreErrors()
......................................................................

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
---
M includes/DefaultSettings.php
M includes/db/Database.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/86998/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5b1d4b3..89e6c87 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1623,7 +1623,6 @@
  *                  - 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 27e6dad..4b25bd3 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -360,6 +360,8 @@
         * 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 @@
         * @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

-- 
To view, visit https://gerrit.wikimedia.org/r/86998
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I838183222518e0d008dee47ec8df6b3f3dc578e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to