Merge pull request #15254 from Tithugues/feature/use-magic-variables-when-possible
Use magic variables when possible
This commit is contained in:
commit
4adc7a2c4c
@ -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']) {
|
||||
|
||||
@ -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') {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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'])
|
||||
|
||||
@ -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"'
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user