dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6a11da
)
Adding a getDB function to ApiBase...
author
Sam Reed
<reedy@users.mediawiki.org>
Sun, 11 Dec 2011 20:32:37 +0000
(20:32 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Sun, 11 Dec 2011 20:32:37 +0000
(20:32 +0000)
Not all subclasses will need/want it. It does however make it easier to pretend non ApiQuery derivatives actually are...
includes/api/ApiBase.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiBase.php
b/includes/api/ApiBase.php
index
c2cd22b
..
2129052
100644
(file)
--- a/
includes/api/ApiBase.php
+++ b/
includes/api/ApiBase.php
@@
-1498,6
+1498,13
@@
abstract class ApiBase extends ContextSource {
return $this->mDBTime;
}
+ /**
+ * @return DatabaseBase
+ */
+ public function getDB() {
+ return wfGetDB( DB_SLAVE, 'api' );
+ }
+
/**
* Debugging function that prints a value and an optional backtrace
* @param $value mixed Value to print