Skip to content

Commit

Permalink
fix pagename validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
FO-nTTaX committed Jan 24, 2024
1 parent 1eb640c commit 98bd01e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SpecialPage/SpecialResourceLoaderArticles.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function addPageCB( $formData ) {
$store = false;
} elseif (
(
( substr( $formData[ 'Page' ], -4 ) !== '.css' || substr( $formData[ 'Page' ], -5 ) !== '.less' )
!( substr( $formData[ 'Page' ], -4 ) === '.css' || substr( $formData[ 'Page' ], -5 ) === '.less' )
&& $formData[ 'Type' ] === 'style'
)
|| ( substr( $formData[ 'Page' ], -3 ) !== '.js' && $formData[ 'Type' ] === 'script' )
Expand Down Expand Up @@ -240,7 +240,7 @@ public function editPageCB( $formData ) {
$store = false;
} elseif (
(
( substr( $formData[ 'Page' ], -4 ) !== '.css' || substr( $formData[ 'Page' ], -5 ) !== '.less' )
!( substr( $formData[ 'Page' ], -4 ) === '.css' || substr( $formData[ 'Page' ], -5 ) === '.less' )
&& $formData[ 'Type' ] === 'style'
)
|| ( substr( $formData[ 'Page' ], -3 ) !== '.js' && $formData[ 'Type' ] === 'script' )
Expand Down

0 comments on commit 98bd01e

Please sign in to comment.