From: jenkins-bot Date: Wed, 3 Jul 2019 15:57:29 +0000 (+0000) Subject: Merge "Revert "rdbms: codify DatabaseDomain table "_" prefix convention"" X-Git-Tag: 1.34.0-rc.0~1185 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=f448db231faa7794c1ef29114884c9efc1925f10;hp=2850ce9305cc1e2097ae54c43097cf8cc65e3a41;p=lhc%2Fweb%2Fwiklou.git Merge "Revert "rdbms: codify DatabaseDomain table "_" prefix convention"" --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a32af365d0..9b5a38ba02 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1958,7 +1958,8 @@ $wgSearchTypeAlternatives = null; /** * Table name prefix. - * This should be alphanumeric, contain neither spaces nor hyphens, and end in "_" + * Should be alphanumeric plus underscores, and not contain spaces nor hyphens. + * Suggested format ends with an underscore. */ $wgDBprefix = ''; diff --git a/includes/libs/rdbms/database/domain/DatabaseDomain.php b/includes/libs/rdbms/database/domain/DatabaseDomain.php index 5dd4b49fba..c1eceb0a83 100644 --- a/includes/libs/rdbms/database/domain/DatabaseDomain.php +++ b/includes/libs/rdbms/database/domain/DatabaseDomain.php @@ -53,9 +53,7 @@ class DatabaseDomain { } $this->schema = $schema; if ( !is_string( $prefix ) ) { - throw new InvalidArgumentException( 'Prefix must be a string.' ); - } elseif ( $prefix !== '' && substr( $prefix, -1, 1 ) !== '_' ) { - throw new InvalidArgumentException( 'A non-empty prefix must end with "_".' ); + throw new InvalidArgumentException( "Prefix must be a string." ); } $this->prefix = $prefix; }