Merge remote-tracking branch 'origin/3.4' into develop
Conflicts: htdocs/societe/class/societe.class.php
This commit is contained in:
commit
2f1340a6c6
@ -125,7 +125,7 @@ function analyse_sql_and_script(&$var, $type)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print 'Access refused by SQL/Script injection protection in main.inc.php';
|
print 'Access refused by SQL/Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,6 @@ class Societe extends CommonObject
|
|||||||
var $country_code;
|
var $country_code;
|
||||||
var $country;
|
var $country;
|
||||||
|
|
||||||
var $tel; // deprecated
|
|
||||||
var $phone;
|
var $phone;
|
||||||
var $fax;
|
var $fax;
|
||||||
var $email;
|
var $email;
|
||||||
@ -402,7 +401,7 @@ class Societe extends CommonObject
|
|||||||
$this->zip = $this->zip?trim($this->zip):trim($this->zip);
|
$this->zip = $this->zip?trim($this->zip):trim($this->zip);
|
||||||
$this->town = $this->town?trim($this->town):trim($this->town);
|
$this->town = $this->town?trim($this->town):trim($this->town);
|
||||||
$this->state_id = trim($this->state_id);
|
$this->state_id = trim($this->state_id);
|
||||||
$this->country_id = ($this->country_id > 0)?$this->country_id:$this->country_id;
|
$this->country_id = ($this->country_id > 0)?$this->country_id:0;
|
||||||
$this->phone = trim($this->phone);
|
$this->phone = trim($this->phone);
|
||||||
$this->phone = preg_replace("/\s/","",$this->phone);
|
$this->phone = preg_replace("/\s/","",$this->phone);
|
||||||
$this->phone = preg_replace("/\./","",$this->phone);
|
$this->phone = preg_replace("/\./","",$this->phone);
|
||||||
|
|||||||
@ -174,6 +174,7 @@ if (empty($reshook))
|
|||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
|
||||||
|
|
||||||
if (GETPOST('deletephoto')) $object->logo = '';
|
if (GETPOST('deletephoto')) $object->logo = '';
|
||||||
else if (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']);
|
else if (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']);
|
||||||
|
|
||||||
@ -200,7 +201,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We set country_id, country_code and country for the selected country
|
// We set country_id, country_code and country for the selected country
|
||||||
$object->country_id=GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id;
|
$object->country_id=GETPOST('country_id')!=''?GETPOST('country_id'):$mysoc->country_id;
|
||||||
if ($object->country_id)
|
if ($object->country_id)
|
||||||
{
|
{
|
||||||
$tmparray=getCountry($object->country_id,'all');
|
$tmparray=getCountry($object->country_id,'all');
|
||||||
@ -827,7 +828,7 @@ else
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
|
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
|
||||||
print $form->select_country($object->country_id,'country_id');
|
print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1245,7 +1246,7 @@ else
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||||
print $form->select_country($object->country_id,'country_id');
|
print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1548,9 +1549,12 @@ else
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'" class="nowrap">';
|
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'" class="nowrap">';
|
||||||
|
if ($object->country_code)
|
||||||
|
{
|
||||||
$img=picto_from_langcode($object->country_code);
|
$img=picto_from_langcode($object->country_code);
|
||||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||||
else print ($img?$img.' ':'').$object->country;
|
else print ($img?$img.' ':'').$object->country;
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// State
|
// State
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user