Removed 'VersionCheck' profix from proxy variables

This commit is contained in:
Mohamed Ashraf 2013-06-29 14:49:02 +02:00
parent 396184c85a
commit fe37de2640
6 changed files with 41 additions and 39 deletions

View File

@ -1037,17 +1037,18 @@ Generic settings
This setting can be adjusted by your vendor.
.. config:option:: $cfg['VersionCheckProxyUrl']
.. config:option:: $cfg['ProxyUrl']
:type: string
:default: ""
The url of the proxy to be used when retrieving the information about
the latest version of phpMyAdmin. You need this if the server where
phpMyAdmin is installed does not have direct access to the internet.
The url of the proxy to be used when phpmyadmin needs to access the outside
intenet such as when retrieving the latest version info or submitting error
reports. You need this if the server where phpMyAdmin is installed does not
have direct access to the internet.
The format is: "hostname:portnumber"
.. config:option:: $cfg['VersionCheckProxyUser']
.. config:option:: $cfg['ProxyUser']
:type: string
:default: ""
@ -1057,7 +1058,7 @@ Generic settings
Authentication will be performed. No other types of authentication
are currently supported.
.. config:option:: $cfg['VersionCheckProxyPass']
.. config:option:: $cfg['ProxyPass']
:type: string
:default: ""

View File

@ -133,14 +133,14 @@ function send_error_report($report) {
'header' => 'Content-type: application/json',
'content' => $data_string
);
if (strlen($cfg['VersionCheckProxyUrl'])) {
if (strlen($cfg['ProxyUrl'])) {
$context['http'] = array(
'proxy' => $cfg['VersionCheckProxyUrl'],
'proxy' => $cfg['ProxyUrl'],
'request_fulluri' => true
);
if (strlen($cfg['VersionCheckProxyUser'])) {
if (strlen($cfg['ProxyUser'])) {
$auth = base64_encode(
$cfg['VersionCheckProxyUser'] . ':' . $cfg['VersionCheckProxyPass']
$cfg['ProxyUser'] . ':' . $cfg['ProxyPass']
);
$context['http']['header'] = 'Proxy-Authorization: Basic ' . $auth;
}
@ -152,13 +152,13 @@ function send_error_report($report) {
);
} else if (function_exists('curl_init')) {
$curl_handle = curl_init($submission_url);
if (strlen($cfg['VersionCheckProxyUrl'])) {
curl_setopt($curl_handle, CURLOPT_PROXY, $cfg['VersionCheckProxyUrl']);
if (strlen($cfg['VersionCheckProxyUser'])) {
if (strlen($cfg['ProxyUrl'])) {
curl_setopt($curl_handle, CURLOPT_PROXY, $cfg['ProxyUrl']);
if (strlen($cfg['ProxyUser'])) {
curl_setopt(
$curl_handle,
CURLOPT_PROXYUSERPWD,
$cfg['VersionCheckProxyUser'] . ':' . $cfg['VersionCheckProxyPass']
$cfg['ProxyUser'] . ':' . $cfg['ProxyPass']
);
}
}

View File

@ -570,13 +570,14 @@ $cfg['VersionCheck'] = VERSION_CHECK_DEFAULT;
/**
* The url of the proxy to be used when retrieving the information about
* the latest version of phpMyAdmin. You need this if the server where
* phpMyAdmin is installed does not have direct access to the internet.
* the latest version of phpMyAdmin or error reporting. You need this if
* the server where phpMyAdmin is installed does not have direct access to
* the internet.
* The format is: "hostname:portnumber"
*
* @global string $cfg['VersionCheckProxyUrl']
* @global string $cfg['ProxyUrl']
*/
$cfg['VersionCheckProxyUrl'] = "";
$cfg['ProxyUrl'] = "";
/**
* The username for authenticating with the proxy. By default, no
@ -584,16 +585,16 @@ $cfg['VersionCheckProxyUrl'] = "";
* Authentication will be performed. No other types of authentication
* are currently supported.
*
* @global string $cfg['VersionCheckProxyUser']
* @global string $cfg['ProxyUser']
*/
$cfg['VersionCheckProxyUser'] = "";
$cfg['ProxyUser'] = "";
/**
* The password for authenticating with the proxy.
*
* @global string $cfg['VersionCheckProxyPass']
* @global string $cfg['ProxyPass']
*/
$cfg['VersionCheckProxyPass'] = "";
$cfg['ProxyPass'] = "";
/**
* maximum number of db's displayed in database list

View File

@ -521,12 +521,12 @@ $strConfigUserprefsDeveloperTab_name = __('Enable the Developer tab in settings'
$strConfigVersionCheckLink = __('Check for latest version');
$strConfigVersionCheck_desc = __('Enables check for latest version on main phpMyAdmin page');
$strConfigVersionCheck_name = __('Version check');
$strConfigVersionCheckProxyUrl_desc = __('The url of the proxy to be used when retrieving the information about the latest version of phpMyAdmin. You need this if the server where phpMyAdmin is installed does not have direct access to the internet. The format is: "hostname:portnumber"');
$strConfigVersionCheckProxyUrl_name = __('Version check proxy url');
$strConfigVersionCheckProxyUser_desc = __('The username for authenticating with the proxy. By default, no authentication is performed. If a username is supplied, Basic Authentication will be performed. No other types of authentication are currently supported.');
$strConfigVersionCheckProxyUser_name = __('Version check proxy username');
$strConfigVersionCheckProxyPass_desc = __('The password for authenticating with the proxy');
$strConfigVersionCheckProxyPass_name = __('Version check proxy password');
$strConfigProxyUrl_desc = __('The url of the proxy to be used when retrieving the information about the latest version of phpMyAdmin or when submitting error reports. You need this if the server where phpMyAdmin is installed does not have direct access to the internet. The format is: "hostname:portnumber"');
$strConfigProxyUrl_name = __('Proxy url');
$strConfigProxyUser_desc = __('The username for authenticating with the proxy. By default, no authentication is performed. If a username is supplied, Basic Authentication will be performed. No other types of authentication are currently supported.');
$strConfigProxyUser_name = __('Proxy username');
$strConfigProxyPass_desc = __('The password for authenticating with the proxy');
$strConfigProxyPass_name = __('Proxy password');
$strConfigZipDump_desc = __('Enable [a@http://en.wikipedia.org/wiki/ZIP_(file_format)]ZIP[/a] compression for import and export operations');
$strConfigZipDump_name = __('ZIP');

View File

@ -140,10 +140,10 @@ $forms['Features']['Other_core_settings'] = array(
'DisableMultiTableMaintenance',
'UseDbSearch',
'VersionCheck',
'VersionCheckProxyUrl',
'VersionCheckProxyUser',
'VersionCheckProxyPass',
'ErrorReporting'
'ProxyUrl',
'ProxyUser',
'ProxyPass',
);
$forms['Sql_queries']['Sql_queries'] = array(
'ShowSQL',

View File

@ -21,16 +21,16 @@ if (isset($_SESSION['cache']['version_check'])
$save = true;
$file = 'http://www.phpmyadmin.net/home_page/version.json';
if (ini_get('allow_url_fopen')) {
if (strlen($cfg['VersionCheckProxyUrl'])) {
if (strlen($cfg['ProxyUrl'])) {
$context = array(
'http' => array(
'proxy' => $cfg['VersionCheckProxyUrl'],
'proxy' => $cfg['ProxyUrl'],
'request_fulluri' => true
)
);
if (strlen($cfg['VersionCheckProxyUser'])) {
if (strlen($cfg['ProxyUser'])) {
$auth = base64_encode(
$cfg['VersionCheckProxyUser'] . ':' . $cfg['VersionCheckProxyPass']
$cfg['ProxyUser'] . ':' . $cfg['ProxyPass']
);
$context['http']['header'] = 'Proxy-Authorization: Basic ' . $auth;
}
@ -44,13 +44,13 @@ if (isset($_SESSION['cache']['version_check'])
}
} else if (function_exists('curl_init')) {
$curl_handle = curl_init($file);
if (strlen($cfg['VersionCheckProxyUrl'])) {
curl_setopt($curl_handle, CURLOPT_PROXY, $cfg['VersionCheckProxyUrl']);
if (strlen($cfg['VersionCheckProxyUser'])) {
if (strlen($cfg['ProxyUrl'])) {
curl_setopt($curl_handle, CURLOPT_PROXY, $cfg['ProxyUrl']);
if (strlen($cfg['ProxyUser'])) {
curl_setopt(
$curl_handle,
CURLOPT_PROXYUSERPWD,
$cfg['VersionCheckProxyUser'] . ':' . $cfg['VersionCheckProxyPass']
$cfg['ProxyUser'] . ':' . $cfg['ProxyPass']
);
}
}