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:
0769301
)
Follow up r64982. Autoblocks aren't automatically set just by storing ipb_enable_auto...
author
Platonides
<platonides@users.mediawiki.org>
Sat, 17 Apr 2010 20:59:05 +0000
(20:59 +0000)
committer
Platonides
<platonides@users.mediawiki.org>
Sat, 17 Apr 2010 20:59:05 +0000
(20:59 +0000)
So do this properly and use Block class to insert the block.
includes/Block.php
patch
|
blob
|
history
diff --git
a/includes/Block.php
b/includes/Block.php
index
2367525
..
7ec7b6f
100644
(file)
--- a/
includes/Block.php
+++ b/
includes/Block.php
@@
-377,9
+377,10
@@
class Block {
*
* @return Boolean: whether or not the insertion was successful.
*/
- public function insert() {
+ public function insert(
$dbw = null
) {
wfDebug( "Block::insert; timestamp {$this->mTimestamp}\n" );
- $dbw = wfGetDB( DB_MASTER );
+ if ( $dbw === null)
+ $dbw = wfGetDB( DB_MASTER );
$this->validateBlockParams();
$this->initialiseRange();