From 41a2f8676c01e9f073a532455971c7f41d65a088 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 24 Aug 2009 08:54:28 +0000 Subject: [PATCH] * (bug 15475) DatabaseBase::setFlag(), DatabaseBase::clearFlag() and DatabaseBase::getFlag() now have documentation --- RELEASE-NOTES | 2 ++ includes/db/Database.php | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 862a239357..3da113cf5a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -430,6 +430,8 @@ this. Was used when mwEmbed was going to be an extension. * (bug 20364) Fixed regression in GIF metadata loading * (bug 20299) MediaWiki:Move-subpages and MediaWiki:Move-talk-subpages can now use wikitext +* (bug 15475) DatabaseBase::setFlag(), DatabaseBase::clearFlag() and + DatabaseBase::getFlag() now have documentation == API changes in 1.16 == diff --git a/includes/db/Database.php b/includes/db/Database.php index 33c7d04eb0..4461da80cb 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -234,14 +234,37 @@ abstract class DatabaseBase { */ function isOpen() { return $this->mOpened; } + /** + * Set a flag for this connection + * + * @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 + * - DBO_PERSISTENT: use persistant database connection + */ function setFlag( $flag ) { $this->mFlags |= $flag; } + /** + * Clear a flag for this connection + * + * @param $flag: same as setFlag()'s $flag param + */ function clearFlag( $flag ) { $this->mFlags &= ~$flag; } + /** + * Returns a boolean whether the flag $flag is set for this connection + * + * @param $flag: same as setFlag()'s $flag param + * @return Boolean + */ function getFlag( $flag ) { return !!($this->mFlags & $flag); } -- 2.20.1