Skip to content

Commit

Permalink
Unset 'permissions' if we are in CLI mode when toggling extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Nov 19, 2023
1 parent 10f56e3 commit 78d364a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions includes/Helpers/ManageWikiExtensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ public function commit() {
continue;
}

// Unset 'permissions' if we are in CLI mode
// So that we can toggle restricted extensions in CLI
if ( PHP_SAPI === 'cli' && isset( $extConfig['requires']['permissions'] ) ) {
unset( $extConfig['requires']['permissions'] );
}

// Define a 'current' extension as one with no changes entry
$enabledExt = !isset( $this->changes[$name] );
// Now we need to check if we fulfil the requirements to enable this extension
Expand Down

0 comments on commit 78d364a

Please sign in to comment.