Skip to content

Commit

Permalink
Fix hide-if
Browse files Browse the repository at this point in the history
Seems to have been broken since wikimedia/mediawiki@9c9514a (MediaWiki 1.38)
  • Loading branch information
Universal-Omega authored Mar 6, 2024
1 parent 428be82 commit f0ef993
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions includes/FormFactory/ManageWikiFormFactoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static function buildDescriptorCore(
],
'inactive-exempt-reason' => [
'if' => $config->get( 'CreateWikiUseInactiveWikis' ) && $config->get( 'CreateWikiInactiveExemptReasonOptions' ),
'hide-if' => [ '!==', 'wpinactive-exempt', '1' ],
'hide-if' => [ '!==', 'inactive-exempt', '1' ],
'type' => 'selectorother',
'default' => $wiki->getInactiveExemptReason(),
'access' => !$permissionManager->userHasRight( $context->getUser(), 'managewiki-restricted' ),
Expand Down Expand Up @@ -715,21 +715,21 @@ private static function buildDescriptorPermissions(
],
'default' => ( $aP === null ) ? '&' : $aP[0],
'disabled' => !$ceMW,
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'section' => 'autopromote'
],
'once' => [
'type' => 'check',
'label-message' => 'managewiki-permissions-autopromote-once',
'default' => is_int( array_search( 'once', (array)$aP ) ),
'disabled' => !$ceMW,
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'section' => 'autopromote'
],
'editcount' => [
'type' => 'int',
'label-message' => 'managewiki-permissions-autopromote-editcount',
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'min' => 0,
'default' => $aPArray[APCOND_EDITCOUNT] ?? 0,
'disabled' => !$ceMW,
Expand All @@ -738,7 +738,7 @@ private static function buildDescriptorPermissions(
'age' => [
'type' => 'int',
'label-message' => 'managewiki-permissions-autopromote-age',
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'min' => 0,
'default' => isset( $aPArray[APCOND_AGE] ) ? $aPArray[APCOND_AGE] / 86400 : 0,
'disabled' => !$ceMW,
Expand All @@ -747,23 +747,23 @@ private static function buildDescriptorPermissions(
'emailconfirmed' => [
'type' => 'check',
'label-message' => 'managewiki-permissions-autopromote-email',
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'default' => is_int( array_search( APCOND_EMAILCONFIRMED, (array)$aP ) ),
'disabled' => !$ceMW,
'section' => 'autopromote'
],
'blocked' => [
'type' => 'check',
'label-message' => 'managewiki-permissions-autopromote-blocked',
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'default' => is_int( array_search( APCOND_BLOCKED, (array)$aP ) ),
'disabled' => !$ceMW,
'section' => 'autopromote'
],
'bot' => [
'type' => 'check',
'label-message' => 'managewiki-permissions-autopromote-bot',
'hide-if' => [ '!==', 'wpenable', '1' ],
'hide-if' => [ '!==', 'enable', '1' ],
'default' => is_int( array_search( APCOND_ISBOT, (array)$aP ) ),
'disabled' => !$ceMW,
'section' => 'autopromote'
Expand All @@ -772,7 +772,7 @@ private static function buildDescriptorPermissions(
'type' => 'multiselect',
'label-message' => 'managewiki-permissions-autopromote-groups',
'options' => $rowsBuilt,
'hide-if' => [ 'OR', [ '!==', 'wpenable', '1' ], [ '===', 'wpconds', '|' ] ],
'hide-if' => [ 'OR', [ '!==', 'enable', '1' ], [ '===', 'conds', '|' ] ],
'default' => $aPArray[APCOND_INGROUPS] ?? [],
'disabled' => !$ceMW,
'section' => 'autopromote'
Expand Down

0 comments on commit f0ef993

Please sign in to comment.