@@ 2120-2124 (lines=5) @@ | ||
2117 | # XXX: right 'editusercssjs' is deprecated, for backward compatibility only |
|
2118 | if ( $action != 'patrol' && !$user->isAllowed( 'editusercssjs' ) ) { |
|
2119 | if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) { |
|
2120 | if ( $this->isCssSubpage() && !$user->isAllowedAny( 'editmyusercss', 'editusercss' ) ) { |
|
2121 | $errors[] = [ 'mycustomcssprotected', $action ]; |
|
2122 | } elseif ( $this->isJsSubpage() && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) ) { |
|
2123 | $errors[] = [ 'mycustomjsprotected', $action ]; |
|
2124 | } |
|
2125 | } else { |
|
2126 | if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) { |
|
2127 | $errors[] = [ 'customcssprotected', $action ]; |
|
@@ 2125-2131 (lines=7) @@ | ||
2122 | } elseif ( $this->isJsSubpage() && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) ) { |
|
2123 | $errors[] = [ 'mycustomjsprotected', $action ]; |
|
2124 | } |
|
2125 | } else { |
|
2126 | if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) { |
|
2127 | $errors[] = [ 'customcssprotected', $action ]; |
|
2128 | } elseif ( $this->isJsSubpage() && !$user->isAllowed( 'edituserjs' ) ) { |
|
2129 | $errors[] = [ 'customjsprotected', $action ]; |
|
2130 | } |
|
2131 | } |
|
2132 | } |
|
2133 | ||
2134 | return $errors; |