Broaden allowed characters in media provider name
authorMatthias Schmidt <gravatronics@live.com>
Sun, 14 Oct 2018 10:22:06 +0000 (12:22 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 14 Oct 2018 10:22:06 +0000 (12:22 +0200)
See #2545

wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php
wcfsetup/install/lang/en.xml

index 5860f40605ff7f3364f4f9f32b0e66abd7f4132a..b6cfab01dd350ca8f558c9ca810717da85c5718a 100644 (file)
@@ -116,7 +116,7 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat
                                ->label('wcf.acp.pip.mediaProvider.name')
                                ->description('wcf.acp.pip.mediaProvider.name.description')
                                ->addValidator(new FormFieldValidator('format', function(TextFormField $formField) {
-                                       if (!preg_match('~^[a-z][A-z]+$~', $formField->getSaveValue())) {
+                                       if (!preg_match('~^[a-z][A-z0-9-]+$~', $formField->getSaveValue())) {
                                                $formField->addValidationError(
                                                        new FormFieldValidationError(
                                                                'format',
index 4e5f47ce97ca4bef0ee14790958b988e4c9156ba..f562cfa9496d4f73934d0099d0231c85480d1991 100644 (file)
@@ -1941,7 +1941,7 @@ If you have <strong>already bought the licenses for the listed apps</strong>, th
                <item name="wcf.acp.pip.acpSearchProvider.showOrder"><![CDATA[Position]]></item>
                <item name="wcf.acp.pip.acpSearchProvider.showOrder.description"><![CDATA[The entered value determines in which order the different types of search results are shown.]]></item>
                <item name="wcf.acp.pip.mediaProvider.name"><![CDATA[Provider Name]]></item>
-               <item name="wcf.acp.pip.mediaProvider.name.description"><![CDATA[The name of the media provider may only contain letters and must begin with a lowercase letter.]]></item>
+               <item name="wcf.acp.pip.mediaProvider.name.description"><![CDATA[The name of the media provider may only contain letters, numbers and dashes and must begin with a lowercase letter.]]></item>
                <item name="wcf.acp.pip.mediaProvider.name.error.format"><![CDATA[The entered name is invalid.]]></item>
                <item name="wcf.acp.pip.mediaProvider.regex"><![CDATA[Regular Expressions]]></item>
                <item name="wcf.acp.pip.mediaProvider.regex.description"><![CDATA[The entered regular expressions (without delimiters) are used to check if this media provider is responsible for a given link. Each line is treated as its own regular expression.]]></item>