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:
db0d813
)
Do the "user is allowed to edit" check when checking for protect rights with the...
author
Alexandre Emsenhuber
<ialex@users.mediawiki.org>
Sat, 10 Dec 2011 15:44:44 +0000
(15:44 +0000)
committer
Alexandre Emsenhuber
<ialex@users.mediawiki.org>
Sat, 10 Dec 2011 15:44:44 +0000
(15:44 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
b7360eb
..
28589c7
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-1522,7
+1522,7
@@
class Title {
*/
private function checkActionPermissions( $action, $user, $errors, $doExpensiveQueries, $short ) {
if ( $action == 'protect' ) {
- if (
$this->getUserPermissionsErrors( 'edit', $user ) != array(
) ) {
+ if (
count( $this->getUserPermissionsErrorsInternal( 'edit', $user, $doExpensiveQueries, true )
) ) {
// If they can't edit, they shouldn't protect.
$errors[] = array( 'protect-cantedit' );
}