Merge pull request #15254 from Tithugues/feature/use-magic-variables-when-possible

Use magic variables when possible
This commit is contained in:
Maurício Meneghini Fauth 2019-05-07 22:33:17 -03:00 committed by GitHub
commit 4adc7a2c4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 8 deletions

View File

@ -191,7 +191,7 @@ class HomeController extends AbstractController
$webServer['database'] = $clientVersion;
$webServer['php_extensions'] = Util::listPHPExtensions();
$webServer['php_version'] = phpversion();
$webServer['php_version'] = PHP_VERSION;
}
}
if ($cfg['ShowPhpInfo']) {

View File

@ -99,7 +99,7 @@ class ErrorReport
"locale" => $_COOKIE['pma_lang'],
"configuration_storage" =>
is_null($relParams['db']) ? "disabled" : "enabled",
"php_version" => phpversion()
"php_version" => PHP_VERSION
];
if ($exceptionType == 'js') {

View File

@ -226,7 +226,7 @@ class ExportLatex extends ExportPlugin
. '% ' . __('Generation Time:') . ' '
. Util::localisedDate() . $crlf
. '% ' . __('Server version:') . ' ' . $GLOBALS['dbi']->getVersionString() . $crlf
. '% ' . __('PHP Version:') . ' ' . phpversion() . $crlf;
. '% ' . __('PHP Version:') . ' ' . PHP_VERSION . $crlf;
return $this->export->outputHandler($head);
}

View File

@ -727,7 +727,7 @@ class ExportSql extends ExportPlugin
. $this->_exportComment(
__('Server version:') . ' ' . $GLOBALS['dbi']->getVersionString()
)
. $this->_exportComment(__('PHP Version:') . ' ' . phpversion())
. $this->_exportComment(__('PHP Version:') . ' ' . PHP_VERSION)
. $this->_possibleCRLF();
if (isset($GLOBALS['sql_header_comment'])

View File

@ -249,7 +249,7 @@ class ExportXml extends ExportPlugin
. '- ' . __('Generation Time:') . ' '
. Util::localisedDate() . $crlf
. '- ' . __('Server version:') . ' ' . $GLOBALS['dbi']->getVersionString() . $crlf
. '- ' . __('PHP Version:') . ' ' . phpversion() . $crlf
. '- ' . __('PHP Version:') . ' ' . PHP_VERSION . $crlf
. '-->' . $crlf . $crlf;
$head .= '<pma_xml_export version="1.0"'

View File

@ -24,7 +24,7 @@ if (! class_exists('TCPDF')) {
/**
* block attempts to directly run this script
*/
if (getcwd() == dirname(__FILE__)) {
if (getcwd() == __DIR__) {
die('Attack stopped');
}

View File

@ -26,7 +26,7 @@ if (! class_exists('TCPDF')) {
/**
* block attempts to directly run this script
*/
if (getcwd() == dirname(__FILE__)) {
if (getcwd() == __DIR__) {
die('Attack stopped');
}

View File

@ -567,7 +567,7 @@ class Response
} else {
$header .= 'Web server is down';
}
if (php_sapi_name() !== 'cgi-fcgi') {
if (PHP_SAPI !== 'cgi-fcgi') {
$this->header($header);
}
}