|
@@ 1928-1932 (lines=5) @@
|
| 1925 |
|
$errors[] = $user->isAnon() ? [ 'nocreatetext' ] : [ 'nocreate-loggedin' ]; |
| 1926 |
|
} |
| 1927 |
|
} elseif ( $action == 'move' ) { |
| 1928 |
|
if ( !$user->isAllowed( 'move-rootuserpages' ) |
| 1929 |
|
&& $this->mNamespace == NS_USER && !$this->isSubpage() ) { |
| 1930 |
|
// Show user page-specific message only if the user can move other pages |
| 1931 |
|
$errors[] = [ 'cant-move-user-page' ]; |
| 1932 |
|
} |
| 1933 |
|
|
| 1934 |
|
// Check if user is allowed to move files if it's a file |
| 1935 |
|
if ( $this->mNamespace == NS_FILE && !$user->isAllowed( 'movefile' ) ) { |
|
@@ 1959-1963 (lines=5) @@
|
| 1956 |
|
if ( !$user->isAllowed( 'move' ) ) { |
| 1957 |
|
// User can't move anything |
| 1958 |
|
$errors[] = [ 'movenotallowed' ]; |
| 1959 |
|
} elseif ( !$user->isAllowed( 'move-rootuserpages' ) |
| 1960 |
|
&& $this->mNamespace == NS_USER && !$this->isSubpage() ) { |
| 1961 |
|
// Show user page-specific message only if the user can move other pages |
| 1962 |
|
$errors[] = [ 'cant-move-to-user-page' ]; |
| 1963 |
|
} elseif ( !$user->isAllowed( 'move-categorypages' ) |
| 1964 |
|
&& $this->mNamespace == NS_CATEGORY ) { |
| 1965 |
|
// Show category page-specific message only if the user can move other pages |
| 1966 |
|
$errors[] = [ 'cant-move-to-category-page' ]; |