mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-23 09:51:33 +01:00
Replace "! empty($conf->global->$" with "getDolGlobalString($"
This commit is contained in:
@@ -3224,7 +3224,7 @@ class Facture extends CommonInvoice
|
|||||||
// Check for mandatory prof id (but only if country is other than ours)
|
// Check for mandatory prof id (but only if country is other than ours)
|
||||||
if ($mysoc->country_id > 0 && $this->thirdparty->country_id == $mysoc->country_id) {
|
if ($mysoc->country_id > 0 && $this->thirdparty->country_id == $mysoc->country_id) {
|
||||||
$idprof_mandatory = 'SOCIETE_'.$key.'_INVOICE_MANDATORY';
|
$idprof_mandatory = 'SOCIETE_'.$key.'_INVOICE_MANDATORY';
|
||||||
if (!$vallabel && !empty($conf->global->$idprof_mandatory)) {
|
if (!$vallabel && getDolGlobalString($idprof_mandatory)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$this->error = $langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId'.$i, $this->thirdparty->country_code)).' ('.$langs->trans("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
|
$this->error = $langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId'.$i, $this->thirdparty->country_code)).' ('.$langs->trans("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']';
|
||||||
dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
|
dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
|
||||||
|
|||||||
@@ -1035,10 +1035,10 @@ class CMailFile
|
|||||||
// If we use SSL/TLS
|
// If we use SSL/TLS
|
||||||
$server = getDolGlobalString($keyforsmtpserver);
|
$server = getDolGlobalString($keyforsmtpserver);
|
||||||
$secure = '';
|
$secure = '';
|
||||||
if (!empty($conf->global->$keyfortls) && function_exists('openssl_open')) {
|
if (getDolGlobalString($keyfortls) && function_exists('openssl_open')) {
|
||||||
$secure = 'ssl';
|
$secure = 'ssl';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->$keyforstarttls) && function_exists('openssl_open')) {
|
if (getDolGlobalString($keyforstarttls) && function_exists('openssl_open')) {
|
||||||
$secure = 'tls';
|
$secure = 'tls';
|
||||||
}
|
}
|
||||||
$server = ($secure ? $secure.'://' : '').$server;
|
$server = ($secure ? $secure.'://' : '').$server;
|
||||||
@@ -1050,11 +1050,11 @@ class CMailFile
|
|||||||
|
|
||||||
$loginid = '';
|
$loginid = '';
|
||||||
$loginpass = '';
|
$loginpass = '';
|
||||||
if (!empty($conf->global->$keyforsmtpid)) {
|
if (getDolGlobalString($keyforsmtpid)) {
|
||||||
$loginid = getDolGlobalString($keyforsmtpid);
|
$loginid = getDolGlobalString($keyforsmtpid);
|
||||||
$this->smtps->setID($loginid);
|
$this->smtps->setID($loginid);
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->$keyforsmtppw)) {
|
if (getDolGlobalString($keyforsmtppw)) {
|
||||||
$loginpass = getDolGlobalString($keyforsmtppw);
|
$loginpass = getDolGlobalString($keyforsmtppw);
|
||||||
$this->smtps->setPW($loginpass);
|
$this->smtps->setPW($loginpass);
|
||||||
}
|
}
|
||||||
@@ -1199,19 +1199,19 @@ class CMailFile
|
|||||||
// If we use SSL/TLS
|
// If we use SSL/TLS
|
||||||
$server = getDolGlobalString($keyforsmtpserver);
|
$server = getDolGlobalString($keyforsmtpserver);
|
||||||
$secure = '';
|
$secure = '';
|
||||||
if (!empty($conf->global->$keyfortls) && function_exists('openssl_open')) {
|
if (getDolGlobalString($keyfortls) && function_exists('openssl_open')) {
|
||||||
$secure = 'ssl';
|
$secure = 'ssl';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->$keyforstarttls) && function_exists('openssl_open')) {
|
if (getDolGlobalString($keyforstarttls) && function_exists('openssl_open')) {
|
||||||
$secure = 'tls';
|
$secure = 'tls';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->transport = new Swift_SmtpTransport($server, getDolGlobalString($keyforsmtpport), $secure);
|
$this->transport = new Swift_SmtpTransport($server, getDolGlobalString($keyforsmtpport), $secure);
|
||||||
|
|
||||||
if (!empty($conf->global->$keyforsmtpid)) {
|
if (getDolGlobalString($keyforsmtpid)) {
|
||||||
$this->transport->setUsername($conf->global->$keyforsmtpid);
|
$this->transport->setUsername($conf->global->$keyforsmtpid);
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->$keyforsmtppw) && getDolGlobalString($keyforsmtpauthtype) != "XOAUTH2") {
|
if (getDolGlobalString($keyforsmtppw) && getDolGlobalString($keyforsmtpauthtype) != "XOAUTH2") {
|
||||||
$this->transport->setPassword($conf->global->$keyforsmtppw);
|
$this->transport->setPassword($conf->global->$keyforsmtppw);
|
||||||
}
|
}
|
||||||
if (getDolGlobalString($keyforsmtpauthtype) === "XOAUTH2") {
|
if (getDolGlobalString($keyforsmtpauthtype) === "XOAUTH2") {
|
||||||
@@ -1864,7 +1864,7 @@ class CMailFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we use SSL/TLS
|
// If we use SSL/TLS
|
||||||
if (!empty($conf->global->$keyfortls) && function_exists('openssl_open')) {
|
if (getDolGlobalString($keyfortls) && function_exists('openssl_open')) {
|
||||||
$host = 'ssl://'.$host;
|
$host = 'ssl://'.$host;
|
||||||
}
|
}
|
||||||
// tls smtp start with no encryption
|
// tls smtp start with no encryption
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ class Translate
|
|||||||
// Kept for backward compatibility.
|
// Kept for backward compatibility.
|
||||||
if (empty($loadfromfileonly)) {
|
if (empty($loadfromfileonly)) {
|
||||||
$overwritekey = 'MAIN_OVERWRITE_TRANS_' . $this->defaultlang;
|
$overwritekey = 'MAIN_OVERWRITE_TRANS_' . $this->defaultlang;
|
||||||
if (!empty($conf->global->$overwritekey)) { // Overwrite translation with key1:newstring1,key2:newstring2
|
if (getDolGlobalString($overwritekey)) { // Overwrite translation with key1:newstring1,key2:newstring2
|
||||||
// Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX
|
// Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX
|
||||||
$tmparray = explode(',', getDolGlobalString($overwritekey));
|
$tmparray = explode(',', getDolGlobalString($overwritekey));
|
||||||
foreach ($tmparray as $tmp) {
|
foreach ($tmparray as $tmp) {
|
||||||
@@ -683,7 +683,7 @@ class Translate
|
|||||||
|
|
||||||
// Make some string replacement after translation
|
// Make some string replacement after translation
|
||||||
$replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang;
|
$replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang;
|
||||||
if (!empty($conf->global->$replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2
|
if (getDolGlobalString($replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2
|
||||||
$tmparray = explode(';', getDolGlobalString($replacekey));
|
$tmparray = explode(';', getDolGlobalString($replacekey));
|
||||||
foreach ($tmparray as $tmp) {
|
foreach ($tmparray as $tmp) {
|
||||||
$tmparray2 = explode(':', $tmp);
|
$tmparray2 = explode(':', $tmp);
|
||||||
@@ -777,7 +777,7 @@ class Translate
|
|||||||
|
|
||||||
// Make some string replacement after translation
|
// Make some string replacement after translation
|
||||||
$replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang;
|
$replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang;
|
||||||
if (!empty($conf->global->$replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2
|
if (getDolGlobalString($replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2
|
||||||
$tmparray = explode(';', getDolGlobalString($replacekey));
|
$tmparray = explode(';', getDolGlobalString($replacekey));
|
||||||
foreach ($tmparray as $tmp) {
|
foreach ($tmparray as $tmp) {
|
||||||
$tmparray2 = explode(':', $tmp);
|
$tmparray2 = explode(':', $tmp);
|
||||||
|
|||||||
@@ -697,8 +697,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
|
|||||||
</script>'."\n";
|
</script>'."\n";
|
||||||
|
|
||||||
$out .= '<div id="confirm_'.$code.'" title="" style="display: none;"></div>';
|
$out .= '<div id="confirm_'.$code.'" title="" style="display: none;"></div>';
|
||||||
$out .= '<span id="set_'.$code.'" class="valignmiddle inline-block linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').'">'.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
$out .= '<span id="set_'.$code.'" class="valignmiddle inline-block linkobject '.(getDolGlobalString($code) ? 'hideobject' : '').'">'.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||||
$out .= '<span id="del_'.$code.'" class="valignmiddle inline-block linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').'">'.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
$out .= '<span id="del_'.$code.'" class="valignmiddle inline-block linkobject '.(getDolGlobalString($code) ? '' : 'hideobject').'">'.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||||
$out .= "\n";
|
$out .= "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1029,7 +1029,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||||||
$dims = $pdf->getPageDimensions();
|
$dims = $pdf->getPageDimensions();
|
||||||
|
|
||||||
// Line of free text
|
// Line of free text
|
||||||
if (empty($hidefreetext) && !empty($conf->global->$paramfreetext)) {
|
if (empty($hidefreetext) && getDolGlobalString($paramfreetext)) {
|
||||||
$substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object);
|
$substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
// More substitution keys
|
// More substitution keys
|
||||||
$substitutionarray['__FROM_NAME__'] = $fromcompany->name;
|
$substitutionarray['__FROM_NAME__'] = $fromcompany->name;
|
||||||
@@ -1633,7 +1633,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||||||
// Check if description must be output
|
// Check if description must be output
|
||||||
if (!empty($object->element)) {
|
if (!empty($object->element)) {
|
||||||
$tmpkey = 'MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_'.strtoupper($object->element);
|
$tmpkey = 'MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_'.strtoupper($object->element);
|
||||||
if (!empty($conf->global->$tmpkey)) {
|
if (getDolGlobalString($tmpkey)) {
|
||||||
$hidedesc = 1;
|
$hidedesc = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t
|
|||||||
while ($i <= $MAXFTP) {
|
while ($i <= $MAXFTP) {
|
||||||
$paramkey = 'FTP_NAME_'.$i;
|
$paramkey = 'FTP_NAME_'.$i;
|
||||||
//print $paramkey;
|
//print $paramkey;
|
||||||
if (!empty($conf->global->$paramkey)) {
|
if (getDolGlobalString($paramkey)) {
|
||||||
$link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
|
$link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
|
||||||
|
|
||||||
$newmenu->add($link, dol_trunc($conf->global->$paramkey, 24));
|
$newmenu->add($link, dol_trunc($conf->global->$paramkey, 24));
|
||||||
|
|||||||
@@ -873,7 +873,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
while ($i <= $MAXFTP) {
|
while ($i <= $MAXFTP) {
|
||||||
$paramkey = 'FTP_NAME_'.$i;
|
$paramkey = 'FTP_NAME_'.$i;
|
||||||
//print $paramkey;
|
//print $paramkey;
|
||||||
if (!empty($conf->global->$paramkey)) {
|
if (getDolGlobalString($paramkey)) {
|
||||||
$link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
|
$link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
|
||||||
$newmenu->add($link, dol_trunc($conf->global->$paramkey, 24));
|
$newmenu->add($link, dol_trunc($conf->global->$paramkey, 24));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ class doc_generic_asset_odt extends ModelePDFAsset
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'ORDER_FREE_TEXT';
|
$paramfreetext = 'ORDER_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'BOM_FREE_TEXT';
|
$paramfreetext = 'BOM_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT';
|
$paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'ORDER_FREE_TEXT';
|
$paramfreetext = 'ORDER_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'CONTRACT_FREE_TEXT';
|
$paramfreetext = 'CONTRACT_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $tmparray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $tmparray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'EXPEDITION_FREE_TEXT';
|
$paramfreetext = 'EXPEDITION_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'INVOICE_FREE_TEXT';
|
$paramfreetext = 'INVOICE_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ class doc_generic_mo_odt extends ModelePDFMo
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'MRP_MO_FREE_TEXT';
|
$paramfreetext = 'MRP_MO_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ class doc_generic_product_odt extends ModelePDFProduct
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'PRODUCT_FREE_TEXT';
|
$paramfreetext = 'PRODUCT_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'PROPOSAL_FREE_TEXT';
|
$paramfreetext = 'PROPOSAL_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'RECEPTION_FREE_TEXT';
|
$paramfreetext = 'RECEPTION_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ class doc_generic_stock_odt extends ModelePDFStock
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'stock_FREE_TEXT';
|
$paramfreetext = 'stock_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'INVOICE_FREE_TEXT';
|
$paramfreetext = 'INVOICE_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'ORDER_FREE_TEXT';
|
$paramfreetext = 'ORDER_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'SUPPLIER_PROPOSAL_FREE_TEXT';
|
$paramfreetext = 'SUPPLIER_PROPOSAL_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
|||||||
// Line of free text
|
// Line of free text
|
||||||
$newfreetext = '';
|
$newfreetext = '';
|
||||||
$paramfreetext = 'user_FREE_TEXT';
|
$paramfreetext = 'user_FREE_TEXT';
|
||||||
if (!empty($conf->global->$paramfreetext)) {
|
if (getDolGlobalString($paramfreetext)) {
|
||||||
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
$newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,11 +61,11 @@ $select_pricing_rules = array(
|
|||||||
'PRODUIT_CUSTOMER_PRICES' => $langs->trans('PriceByCustomer'), // Different price for each customer
|
'PRODUIT_CUSTOMER_PRICES' => $langs->trans('PriceByCustomer'), // Different price for each customer
|
||||||
);
|
);
|
||||||
$keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY';
|
$keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY';
|
||||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 || !empty($conf->global->$keyforparam)) {
|
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 || getDolGlobalString($keyforparam)) {
|
||||||
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice
|
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice
|
||||||
}
|
}
|
||||||
$keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
|
$keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
|
||||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->$keyforparam)) {
|
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || getDolGlobalString($keyforparam)) {
|
||||||
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans('MultiPricesAbility').'+'.$langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')';
|
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans('MultiPricesAbility').'+'.$langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ print '<div id="dolpaymentdiv" class="center">'."\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ print '<table id="dolpublictable" summary="Payment form" class="center">'."\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_SIGN_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_SIGN_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_SIGN_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_SIGN_LOGO');
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ print '<!-- Form to view jobs -->'."\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_OPENSURVEY_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_OPENSURVEY_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_OPENSURVEY_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_OPENSURVEY_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_OPENSURVEY_LOGO_');
|
$logosmall = getDolGlobalString('ONLINE_OPENSURVEY_LOGO_');
|
||||||
|
|||||||
@@ -345,9 +345,9 @@ if (empty($validpaymentmethod)) {
|
|||||||
$creditor = $mysoc->name;
|
$creditor = $mysoc->name;
|
||||||
$paramcreditor = 'ONLINE_PAYMENT_CREDITOR';
|
$paramcreditor = 'ONLINE_PAYMENT_CREDITOR';
|
||||||
$paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix;
|
$paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix;
|
||||||
if (!empty($conf->global->$paramcreditorlong)) {
|
if (getDolGlobalString($paramcreditorlong)) {
|
||||||
$creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show
|
$creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show
|
||||||
} elseif (!empty($conf->global->$paramcreditor)) {
|
} elseif (getDolGlobalString($paramcreditor)) {
|
||||||
$creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show
|
$creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -897,7 +897,7 @@ print "\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ if (empty($doactionsthenredirect)) {
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
||||||
@@ -275,7 +275,7 @@ if (empty($doactionsthenredirect)) {
|
|||||||
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>";
|
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>";
|
||||||
|
|
||||||
$key = 'ONLINE_PAYMENT_MESSAGE_KO';
|
$key = 'ONLINE_PAYMENT_MESSAGE_KO';
|
||||||
if (!empty($conf->global->$key)) {
|
if (getDolGlobalString($key)) {
|
||||||
print $conf->global->$key;
|
print $conf->global->$key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ if (empty($doactionsthenredirect)) {
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ print "\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ print '<!-- Form to view jobs -->'."\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO_');
|
$logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO_');
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ print '<!-- Form to view job -->'."\n";
|
|||||||
$logosmall = $mysoc->logo_small;
|
$logosmall = $mysoc->logo_small;
|
||||||
$logo = $mysoc->logo;
|
$logo = $mysoc->logo;
|
||||||
$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
|
$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
|
||||||
if (!empty($conf->global->$paramlogo)) {
|
if (getDolGlobalString($paramlogo)) {
|
||||||
$logosmall = getDolGlobalString($paramlogo);
|
$logosmall = getDolGlobalString($paramlogo);
|
||||||
} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
|
} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
|
||||||
$logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO');
|
$logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO');
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ class FormWebPortal extends Form
|
|||||||
$textifempty = ' ';
|
$textifempty = ' ';
|
||||||
|
|
||||||
//if (!empty($conf->use_javascript_ajax) || $forcecombo) $textifempty='';
|
//if (!empty($conf->use_javascript_ajax) || $forcecombo) $textifempty='';
|
||||||
if (!empty($conf->global->$confkeyforautocompletemode)) {
|
if (getDolGlobalString($confkeyforautocompletemode)) {
|
||||||
if ($showempty && !is_numeric($showempty)) {
|
if ($showempty && !is_numeric($showempty)) {
|
||||||
$textifempty = $langs->trans($showempty);
|
$textifempty = $langs->trans($showempty);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user