Replace `mb_strpos()` usage with `str_starts_with`
authorAlexander Ebert <ebert@woltlab.com>
Thu, 17 Aug 2023 16:07:27 +0000 (18:07 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 17 Aug 2023 16:07:27 +0000 (18:07 +0200)
See https://www.woltlab.com/community/thread/301190-mb-strpos-is-not-an-allowed-template-modifier/

wcfsetup/install/files/acp/templates/userGroupBooleanOptionType.tpl

index 72b31929b065c2b3801baeaa64baaaf9e89bf44d..c356c56ef8d46ba61aa07f25d14250a5c7935a59 100644 (file)
@@ -7,7 +7,7 @@
                <input type="radio" id="{$option->optionName}_no"{if $value == 0} checked{/if} name="values[{$option->optionName}]" value="0"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
                <label for="{$option->optionName}_no" class="red">{icon name='xmark'} {lang}wcf.acp.option.type.boolean.no{/lang}</label>
        </li>
-       {if $option->optionName|mb_strpos:'admin.' !== 0 && ($group === null || (!$group->isEveryone() && !$group->isUsers()))}
+       {if $option->optionName|str_starts_with:'admin.' && ($group === null || (!$group->isEveryone() && !$group->isUsers()))}
                <li>
                        <input type="radio" id="{$option->optionName}_never"{if $value == -1} checked{/if} name="values[{$option->optionName}]" value="-1"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
                        <label for="{$option->optionName}_never" class="yellow">{icon name='ban'} {lang}wcf.acp.option.type.boolean.never{/lang}</label>