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:
05971d6
)
Fix chaining of UserCan extension return results
author
Domas Mituzas
<midom@users.mediawiki.org>
Wed, 5 Apr 2006 09:16:28 +0000
(09:16 +0000)
committer
Domas Mituzas
<midom@users.mediawiki.org>
Wed, 5 Apr 2006 09:16:28 +0000
(09:16 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
0408f51
..
ba1539e
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-966,12
+966,11
@@
class Title {
global $wgUser;
global $wgUser;
- $result = true;
- if ( !wfRunHooks( 'userCan', array( &$this, &$wgUser, $action, &$result ) ) ) {
+ $result = null;
+ wfRunHooks( 'userCan', array( &$this, &$wgUser, $action, &$result ) );
+ if ( $result !== null ) {
wfProfileOut( $fname );
wfProfileOut( $fname );
- // Allow advisory rights checking
- if ( $result !== null )
- return $result;
+ return $result;
}
if( NS_SPECIAL == $this->mNamespace ) {
}
if( NS_SPECIAL == $this->mNamespace ) {
@@
-1077,8
+1076,8
@@
class Title {
function userCanRead() {
global $wgUser;
function userCanRead() {
global $wgUser;
-
$result = true
;
-
if ( !wfRunHooks( 'userCan', array( &$this, &$wgUser, "read", &$result ) )
) {
+
wfRunHooks( 'userCan', array( &$this, &$wgUser, 'read', &$result ) )
;
+
if ( $result !== null
) {
return $result;
}
return $result;
}