Remove PMA_IS_WINDOWS constant
Gets the value from the Config class instead. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
8de8236726
commit
b17700dd09
@ -1028,7 +1028,6 @@ class Config
|
||||
'PMA_MAJOR_VERSION',
|
||||
'PMA_THEME_VERSION',
|
||||
'PMA_THEME_GENERATION',
|
||||
'PMA_IS_WINDOWS',
|
||||
'PMA_IS_GD2',
|
||||
'PMA_USR_OS',
|
||||
'PMA_USR_BROWSER_VER',
|
||||
|
||||
@ -152,7 +152,7 @@ class HomeController extends AbstractController
|
||||
],
|
||||
'values_escaped' => true,
|
||||
];
|
||||
$eol = Core::ifSetOr($_SESSION['eol'], (PMA_IS_WINDOWS ? 'win' : 'unix'));
|
||||
$eol = Core::ifSetOr($_SESSION['eol'], ($GLOBALS['PMA_Config']->get('PMA_IS_WINDOWS') ? 'win' : 'unix'));
|
||||
$eolInput = $formDisplayTemplate->displayInput(
|
||||
'eol',
|
||||
__('End of line'),
|
||||
|
||||
@ -280,11 +280,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Controllers/Setup/HomeController.php
|
||||
|
||||
-
|
||||
message: "#^Ternary operator condition is always false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Controllers/Setup/HomeController.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\>\" between 0 and 0 is always false\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -752,7 +752,6 @@ class ConfigTest extends AbstractTestCase
|
||||
$defines = [
|
||||
'PMA_VERSION',
|
||||
'PMA_MAJOR_VERSION',
|
||||
'PMA_IS_WINDOWS',
|
||||
'PMA_IS_GD2',
|
||||
'PMA_USR_OS',
|
||||
'PMA_USR_BROWSER_VER',
|
||||
|
||||
@ -7,8 +7,6 @@ namespace PhpMyAdmin\Tests;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Header;
|
||||
use ReflectionProperty;
|
||||
use function define;
|
||||
use function defined;
|
||||
|
||||
/**
|
||||
* @group medium
|
||||
@ -24,9 +22,6 @@ class HeaderTest extends AbstractTestCase
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::setLanguage();
|
||||
if (! defined('PMA_IS_WINDOWS')) {
|
||||
define('PMA_IS_WINDOWS', false);
|
||||
}
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['message'] = 'phpmyadminmessage';
|
||||
$GLOBALS['PMA_PHP_SELF'] = Core::getenv('PHP_SELF');
|
||||
|
||||
@ -6,8 +6,6 @@ namespace PhpMyAdmin\Tests;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Menu;
|
||||
use function define;
|
||||
use function defined;
|
||||
|
||||
class MenuTest extends AbstractTestCase
|
||||
{
|
||||
@ -21,9 +19,6 @@ class MenuTest extends AbstractTestCase
|
||||
parent::setTheme();
|
||||
parent::loadDefaultConfig();
|
||||
|
||||
if (! defined('PMA_IS_WINDOWS')) {
|
||||
define('PMA_IS_WINDOWS', false);
|
||||
}
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
|
||||
|
||||
@ -8,8 +8,6 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\File;
|
||||
use PhpMyAdmin\Plugins\Import\ImportShp;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use function define;
|
||||
use function defined;
|
||||
use function extension_loaded;
|
||||
|
||||
/**
|
||||
@ -30,9 +28,6 @@ class ImportShpTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::loadDefaultConfig();
|
||||
if (! defined('PMA_IS_WINDOWS')) {
|
||||
define('PMA_IS_WINDOWS', false);
|
||||
}
|
||||
$GLOBALS['server'] = 0;
|
||||
//setting
|
||||
$GLOBALS['plugin_param'] = 'table';
|
||||
|
||||
@ -11,4 +11,3 @@ define('PROXY_PASS', '');
|
||||
define('PMA_USR_BROWSER_AGENT', 'Other');
|
||||
define('PMA_USR_BROWSER_VER', 1);
|
||||
define('PMA_USR_OS', 'os');
|
||||
define('PMA_IS_WINDOWS', false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user