Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
1a3bace4e6
@ -143,6 +143,8 @@ abstract class CommonDocGenerator
|
||||
$object->state=getState($object->state_code,0);
|
||||
}
|
||||
|
||||
$object->load_ban();
|
||||
|
||||
$array_thirdparty = array(
|
||||
'company_name'=>$object->name,
|
||||
'company_email'=>$object->email,
|
||||
@ -171,7 +173,9 @@ abstract class CommonDocGenerator
|
||||
'company_idprof5'=>$object->idprof5,
|
||||
'company_idprof6'=>$object->idprof6,
|
||||
'company_note_public'=>$object->note_public,
|
||||
'company_note_private'=>$object->note_private
|
||||
'company_note_private'=>$object->note_private,
|
||||
'company_iban'=>$object->bank_account->iban,
|
||||
'company_bic'=>$object->bank_account->bic
|
||||
);
|
||||
|
||||
// Retrieve extrafields
|
||||
|
||||
@ -412,7 +412,7 @@ class Conf
|
||||
$this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : $this->global->MAIN_UPLOAD_DOC * 1024);
|
||||
|
||||
// Define list of limited modules
|
||||
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
||||
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
||||
|
||||
// Timeouts
|
||||
if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10;
|
||||
|
||||
@ -437,13 +437,18 @@ function dol_string_nospecial($str,$newstr='_',$badchars='')
|
||||
/**
|
||||
* Returns text escaped for inclusion into javascript code
|
||||
*
|
||||
* @param string $stringtoescape String to escape
|
||||
* @return string Escaped string
|
||||
* @param string $stringtoescape String to escape
|
||||
* @param string $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string"
|
||||
* @return string Escaped string. Both ' and " are escaped into ' if they are escaped.
|
||||
*/
|
||||
function dol_escape_js($stringtoescape)
|
||||
function dol_escape_js($stringtoescape, $mode=0)
|
||||
{
|
||||
// escape quotes and backslashes, newlines, etc.
|
||||
$substitjs=array("'"=>"\\'",'\\'=>'\\\\',"'"=>"\\'",'"'=>"\\'","\r"=>'\\r',"\n"=>'\\n','</'=>'<\/');
|
||||
$substitjs=array("'"=>"\\'",'\\'=>'\\\\',"\r"=>'\\r',"\n"=>'\\n');
|
||||
//$substitjs['</']='<\/'; // We removed this. Should be useless.
|
||||
if (empty($mode)) { $substitjs["'"]="\\'"; $substitjs['"']="\\'"; }
|
||||
else if ($mode == 1) $substitjs["'"]="\\'";
|
||||
else if ($mode == 2) { $substitjs['"']='\\"'; }
|
||||
return strtr($stringtoescape, $substitjs);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user