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:
85930f1
)
Alrighty, now we properly remove old blocks before inserting the new one. (Bug 10080...
author
Chad Horohoe
<demon@users.mediawiki.org>
Mon, 9 Jun 2008 22:03:29 +0000
(22:03 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Mon, 9 Jun 2008 22:03:29 +0000
(22:03 +0000)
includes/SpecialBlockip.php
patch
|
blob
|
history
diff --git
a/includes/SpecialBlockip.php
b/includes/SpecialBlockip.php
index
ec1fdd7
..
620fd80
100644
(file)
--- a/
includes/SpecialBlockip.php
+++ b/
includes/SpecialBlockip.php
@@
-388,12
+388,11
@@
class IPBlockForm {
if ( wfRunHooks('BlockIp', array(&$block, &$wgUser)) ) {
- if ( !$block->insert() ) {
- // Block already exists. Silently delete the existing block and insert it again
- $oldblock = Block::newFromDB( $this->BlockAddress );
- $oldblock->delete();
- $block->insert();
+ if ( $oldblock = Block::newFromDB( $this->BlockAddress ) ) {
+ $oldblock->delete(); // Block already exists. Silently delete it
}
+ $block->insert();
+
wfRunHooks('BlockIpComplete', array($block, $wgUser));