* (bug 15475) DatabaseBase::setFlag(), DatabaseBase::clearFlag() and DatabaseBase...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 24 Aug 2009 08:54:28 +0000 (08:54 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 24 Aug 2009 08:54:28 +0000 (08:54 +0000)
RELEASE-NOTES
includes/db/Database.php

index 862a239..3da113c 100644 (file)
@@ -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 ==
 
index 33c7d04..4461da8 100644 (file)
@@ -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);
        }