|
@@ 2108-2112 (lines=5) @@
|
| 2105 |
|
# XXX: right 'editusercssjs' is deprecated, for backward compatibility only |
| 2106 |
|
if ( $action != 'patrol' && !$user->isAllowed( 'editusercssjs' ) ) { |
| 2107 |
|
if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) { |
| 2108 |
|
if ( $this->isCssSubpage() && !$user->isAllowedAny( 'editmyusercss', 'editusercss' ) ) { |
| 2109 |
|
$errors[] = [ 'mycustomcssprotected', $action ]; |
| 2110 |
|
} elseif ( $this->isJsSubpage() && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) ) { |
| 2111 |
|
$errors[] = [ 'mycustomjsprotected', $action ]; |
| 2112 |
|
} |
| 2113 |
|
} else { |
| 2114 |
|
if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) { |
| 2115 |
|
$errors[] = [ 'customcssprotected', $action ]; |
|
@@ 2113-2119 (lines=7) @@
|
| 2110 |
|
} elseif ( $this->isJsSubpage() && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) ) { |
| 2111 |
|
$errors[] = [ 'mycustomjsprotected', $action ]; |
| 2112 |
|
} |
| 2113 |
|
} else { |
| 2114 |
|
if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) { |
| 2115 |
|
$errors[] = [ 'customcssprotected', $action ]; |
| 2116 |
|
} elseif ( $this->isJsSubpage() && !$user->isAllowed( 'edituserjs' ) ) { |
| 2117 |
|
$errors[] = [ 'customjsprotected', $action ]; |
| 2118 |
|
} |
| 2119 |
|
} |
| 2120 |
|
} |
| 2121 |
|
|
| 2122 |
|
return $errors; |