Rename DBA::server_info to DBA::serverInfo

This commit is contained in:
Hypolite Petovan 2018-07-20 22:04:43 -04:00
parent 4db98eb43d
commit 1f2c0b98b5
2 changed files with 4 additions and 4 deletions

View File

@ -164,7 +164,7 @@ class DBA
* *
* @return string * @return string
*/ */
public static function server_info() { public static function serverInfo() {
if (self::$server_info == '') { if (self::$server_info == '') {
switch (self::$driver) { switch (self::$driver) {
case 'pdo': case 'pdo':
@ -289,7 +289,7 @@ class DBA
* @return string The input SQL string modified if necessary. * @return string The input SQL string modified if necessary.
*/ */
public static function anyValueFallback($sql) { public static function anyValueFallback($sql) {
$server_info = self::server_info(); $server_info = self::serverInfo();
if (version_compare($server_info, '5.7.5', '<') || if (version_compare($server_info, '5.7.5', '<') ||
(stripos($server_info, 'MariaDB') !== false)) { (stripos($server_info, 'MariaDB') !== false)) {
$sql = str_ireplace('ANY_VALUE(', 'MIN(', $sql); $sql = str_ireplace('ANY_VALUE(', 'MIN(', $sql);

View File

@ -236,8 +236,8 @@ class DBStructure
} }
// MySQL >= 5.7.4 doesn't support the IGNORE keyword in ALTER TABLE statements // MySQL >= 5.7.4 doesn't support the IGNORE keyword in ALTER TABLE statements
if ((version_compare(DBA::server_info(), '5.7.4') >= 0) && if ((version_compare(DBA::serverInfo(), '5.7.4') >= 0) &&
!(strpos(DBA::server_info(), 'MariaDB') !== false)) { !(strpos(DBA::serverInfo(), 'MariaDB') !== false)) {
$ignore = ''; $ignore = '';
} else { } else {
$ignore = ' IGNORE'; $ignore = ' IGNORE';