@@ -106,7 +106,7 @@ |
||
| 106 | 106 | $produit->tva_tx = "20.0"; |
| 107 | 107 | $ret=$produit->create($user); |
| 108 | 108 | if ($ret < 0) { |
| 109 | - print "Error $ret - ".$produit->error."\n"; |
|
| 109 | + print "error $ret - ".$produit->error."\n"; |
|
| 110 | 110 | } else { |
| 111 | 111 | print " OK with ref ".$produit->ref."\n"; |
| 112 | 112 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $sapi_type = php_sapi_name(); |
| 28 | 28 | $script_file = basename(__FILE__); |
| 29 | -$path=dirname(__FILE__).'/'; |
|
| 29 | +$path = dirname(__FILE__).'/'; |
|
| 30 | 30 | |
| 31 | 31 | // Test si mode batch |
| 32 | 32 | $sapi_type = php_sapi_name(); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | // Recupere root dolibarr |
| 39 | 39 | //$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]); |
| 40 | -require __DIR__. '/../../htdocs/master.inc.php'; |
|
| 40 | +require __DIR__.'/../../htdocs/master.inc.php'; |
|
| 41 | 41 | include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
| 42 | 42 | include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; |
| 43 | 43 | include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | define('GEN_NUMBER_PRODUIT', $argv[1] ?? 100); |
| 54 | 54 | |
| 55 | 55 | |
| 56 | -$ret=$user->fetch('', 'admin'); |
|
| 57 | -if (! $ret > 0) { |
|
| 56 | +$ret = $user->fetch('', 'admin'); |
|
| 57 | +if (!$ret > 0) { |
|
| 58 | 58 | print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; |
| 59 | 59 | exit; |
| 60 | 60 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); |
| 65 | -$resql=$db->query($sql); |
|
| 65 | +$resql = $db->query($sql); |
|
| 66 | 66 | if ($resql) { |
| 67 | 67 | $num = $db->num_rows($resql); |
| 68 | 68 | $i = 0; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); |
| 77 | -$resql=$db->query($sql); |
|
| 77 | +$resql = $db->query($sql); |
|
| 78 | 78 | if ($resql) { |
| 79 | 79 | $num = $db->num_rows($resql); |
| 80 | 80 | $i = 0; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); |
| 91 | -$resql=$db->query($sql); |
|
| 91 | +$resql = $db->query($sql); |
|
| 92 | 92 | if ($resql) { |
| 93 | 93 | $num = $db->num_rows($resql); |
| 94 | 94 | $i = 0; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $produit->description = 'Description '.time().$s; |
| 114 | 114 | $produit->price = mt_rand(1, 999.99); |
| 115 | 115 | $produit->tva_tx = "20.0"; |
| 116 | - $ret=$produit->create($user); |
|
| 116 | + $ret = $produit->create($user); |
|
| 117 | 117 | if ($ret < 0) { |
| 118 | 118 | print "Error $ret - ".$produit->error."\n"; |
| 119 | 119 | } else { |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | } |
| 95 | 95 | $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission |
| 96 | 96 | |
| 97 | -$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 97 | +$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | /* |
@@ -197,7 +197,7 @@ |
||
| 197 | 197 | $maxfilesizearray = getMaxFileSizeArray(); |
| 198 | 198 | $maxmin = $maxfilesizearray['maxmin']; |
| 199 | 199 | if ($maxmin > 0) { |
| 200 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 200 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 201 | 201 | } |
| 202 | 202 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
| 203 | 203 | print '</td></tr>'; |
@@ -134,15 +134,15 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet |
| 136 | 136 | if ($key == $current_lang) { |
| 137 | - $object->label = GETPOST("libelle-" . $key); |
|
| 138 | - $object->description = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml')); |
|
| 139 | - $object->other = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml')); |
|
| 137 | + $object->label = GETPOST("libelle-".$key); |
|
| 138 | + $object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); |
|
| 139 | + $object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); |
|
| 140 | 140 | |
| 141 | 141 | $object->update($object->id, $user); |
| 142 | 142 | } else { |
| 143 | - $object->multilangs[$key]["label"] = GETPOST("libelle-" . $key); |
|
| 144 | - $object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml')); |
|
| 145 | - $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml')); |
|
| 143 | + $object->multilangs[$key]["label"] = GETPOST("libelle-".$key); |
|
| 144 | + $object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); |
|
| 145 | + $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | |
@@ -235,9 +235,9 @@ discard block |
||
| 235 | 235 | if (empty($reshook)) { |
| 236 | 236 | if ($action == '') { |
| 237 | 237 | if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { |
| 238 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Add") . '</a>'; |
|
| 238 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Add").'</a>'; |
|
| 239 | 239 | if ($cnt_trans > 0) { |
| 240 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Modify") . '</a>'; |
|
| 240 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>'; |
|
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | } |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | )); |
| 156 | 156 | |
| 157 | 157 | // Retrieve all extrafields if not already not know (should not happen) |
| 158 | - if (! is_object($extrafields)) { |
|
| 158 | + if (!is_object($extrafields)) { |
|
| 159 | 159 | $extrafields = new ExtraFields($this->db); |
| 160 | 160 | $extrafields->fetch_name_optionals_label($product->table_element); |
| 161 | 161 | } |
@@ -246,7 +246,7 @@ |
||
| 246 | 246 | $supplierinvoicestatic->id = $objp->facid; |
| 247 | 247 | $supplierinvoicestatic->ref = $objp->ref; |
| 248 | 248 | $supplierinvoicestatic->ref_supplier = $objp->ref_supplier; |
| 249 | - $supplierinvoicestatic->libelle = $objp->label; // deprecated |
|
| 249 | + $supplierinvoicestatic->libelle = $objp->label; // deprecated |
|
| 250 | 250 | $supplierinvoicestatic->label = $objp->label; |
| 251 | 251 | $supplierinvoicestatic->total_ht = $objp->total_ht; |
| 252 | 252 | $supplierinvoicestatic->total_ttc = $objp->total_ttc; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php // BEGIN PHP |
| 2 | -$websitekey=basename(__DIR__); |
|
| 3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
| 2 | +$websitekey = basename(__DIR__); |
|
| 3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
| 4 | 4 | require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; |
| 5 | 5 | require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php'; |
| 6 | 6 | ob_start(); |
@@ -56,16 +56,16 @@ |
||
| 56 | 56 | // Editing global variables not related to a specific theme |
| 57 | 57 | $constantes = array( |
| 58 | 58 | 'MEMBER_REMINDER_EMAIL'=>array('type'=>'yesno', 'label'=>$langs->trans('MEMBER_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"))), |
| 59 | - 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
| 60 | - 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array('type'=>'emailtemplate:member','label'=>''), |
|
| 61 | - 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
| 62 | - 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
| 63 | - 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
| 64 | - 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
| 65 | - 'ADHERENT_MAIL_FROM' =>array('type'=>'string','label'=>''), |
|
| 66 | - 'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string','label'=>''), |
|
| 67 | - 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string','label'=>''), |
|
| 68 | - 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext,'label'=>'') |
|
| 59 | + 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
| 60 | + 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
| 61 | + 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
| 62 | + 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
| 63 | + 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
| 64 | + 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
| 65 | + 'ADHERENT_MAIL_FROM' =>array('type'=>'string', 'label'=>''), |
|
| 66 | + 'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string', 'label'=>''), |
|
| 67 | + 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string', 'label'=>''), |
|
| 68 | + 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext, 'label'=>'') |
|
| 69 | 69 | ); |
| 70 | 70 | |
| 71 | 71 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | $head[$h][0] = DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id; |
| 101 | 101 | $head[$h][1] = $langs->trans("Events"); |
| 102 | - if (isModEnabled('agenda')&& ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { |
|
| 102 | + if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { |
|
| 103 | 103 | $nbEvent = 0; |
| 104 | 104 | // Enable caching of thirdparty count actioncomm |
| 105 | 105 | require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } else { |
| 120 | 120 | dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR); |
| 121 | 121 | } |
| 122 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 122 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $head[$h][1] .= '/'; |