Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
9276224422
@ -73,15 +73,19 @@ class FormAdmin
|
|||||||
|
|
||||||
$langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 12, 0, $mainlangonly);
|
$langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 12, 0, $mainlangonly);
|
||||||
|
|
||||||
// If the language to select is not inside the list of available language and empty value is not available, we must find
|
// If empty value is not allowed and the language to select is not inside the list of available language and we must find
|
||||||
// an alternative as the language code to pre-select (to avoid to have first element in list pre-selected).
|
// an alternative of the language code to pre-select (to avoid to have first element in list pre-selected).
|
||||||
if ($selected && !array_key_exists($selected, $langs_available) && empty($showempty)) {
|
if ($selected && empty($showempty)) {
|
||||||
$tmparray = explode('_', $selected);
|
if (!is_array($selected) && !array_key_exists($selected, $langs_available)) {
|
||||||
if (!empty($tmparray[1])) {
|
$tmparray = explode('_', $selected);
|
||||||
$selected = getLanguageCodeFromCountryCode($tmparray[1]);
|
if (!empty($tmparray[1])) {
|
||||||
}
|
$selected = getLanguageCodeFromCountryCode($tmparray[1]);
|
||||||
if (empty($selected)) {
|
}
|
||||||
$selected = $langs->defaultlang;
|
if (empty($selected)) {
|
||||||
|
$selected = $langs->defaultlang;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If the preselected value is an array, we do not try to find alternative to preselect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -70,6 +70,18 @@ abstract class DoliDB implements Database
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
public $error;
|
public $error;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the DB prefix
|
||||||
|
*
|
||||||
|
* @return string The DB prefix
|
||||||
|
*/
|
||||||
|
public function prefix()
|
||||||
|
{
|
||||||
|
return (empty($this->prefix_db) ? MAIN_DB_PREFIX : $this->prefix_db);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format a SQL IF
|
* Format a SQL IF
|
||||||
*
|
*
|
||||||
|
|||||||
@ -215,7 +215,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Common check on ip (local and external)
|
// Common check on ip (local and external)
|
||||||
$arrayofmetadataserver = array('100.100.100.200' => 'Alibaba', '192.0.0.192'=> 'Oracle');
|
$arrayofmetadataserver = array('100.100.100.200' => 'Alibaba', '192.0.0.192'=> 'Oracle', '192.80.8.124'=>'Packet');
|
||||||
foreach ($arrayofmetadataserver as $ipofmetadataserver => $nameofmetadataserver) {
|
foreach ($arrayofmetadataserver as $ipofmetadataserver => $nameofmetadataserver) {
|
||||||
if ($iptocheck == $ipofmetadataserver) {
|
if ($iptocheck == $ipofmetadataserver) {
|
||||||
$info['http_code'] = 400;
|
$info['http_code'] = 400;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user