@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | if (empty($error)) { |
| 255 | - header("Location: card.php?id=" . $object->id); |
|
| 255 | + header("Location: card.php?id=".$object->id); |
|
| 256 | 256 | exit; |
| 257 | 257 | } |
| 258 | 258 | } |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | } else { |
| 308 | 308 | $result = $object->fetch($id); |
| 309 | 309 | |
| 310 | - $object->amount = $amount; |
|
| 310 | + $object->amount = $amount; |
|
| 311 | 311 | |
| 312 | 312 | $result = $object->update($user); |
| 313 | 313 | if ($result <= 0) { |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | |
| 470 | 470 | // Auto create payment |
| 471 | 471 | print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>'; |
| 472 | - print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n"; |
|
| 472 | + print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_payment) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n"; |
|
| 473 | 473 | |
| 474 | 474 | print '<tr class="hide_if_no_auto_create_payment">'; |
| 475 | 475 | print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; |
@@ -609,9 +609,9 @@ discard block |
||
| 609 | 609 | print '</td></tr>'; |
| 610 | 610 | |
| 611 | 611 | if ($action == 'edit') { |
| 612 | - print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>'; |
|
| 612 | + print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>'; |
|
| 613 | 613 | } else { |
| 614 | - print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>'; |
|
| 614 | + print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>'; |
|
| 615 | 615 | } |
| 616 | 616 | |
| 617 | 617 | // Mode of payment |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $this->type_payment = $obj->fk_typepayment; |
| 307 | 307 | $this->num_payment = $obj->num_payment; |
| 308 | 308 | $this->label = $obj->label; |
| 309 | - $this->note = $obj->note_private; // For backward compatibility |
|
| 309 | + $this->note = $obj->note_private; // For backward compatibility |
|
| 310 | 310 | $this->note_private = $obj->note_private; |
| 311 | 311 | $this->subledger_account = $obj->subledger_account; |
| 312 | 312 | $this->accountancy_code = $obj->accountancy_code; |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | $sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : 0); |
| 487 | 487 | $sql .= ", ".((int) $user->id); |
| 488 | 488 | $sql .= ", '".$this->db->idate($now)."'"; |
| 489 | - $sql .= ", NULL"; // Filled later |
|
| 489 | + $sql .= ", NULL"; // Filled later |
|
| 490 | 490 | $sql .= ", ".((int) $conf->entity); |
| 491 | 491 | $sql .= ")"; |
| 492 | 492 | |
@@ -45,8 +45,8 @@ |
||
| 45 | 45 | |
| 46 | 46 | const STATUS_DRAFT = 0; |
| 47 | 47 | const STATUS_NOT_USED = 1; |
| 48 | - const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
| 49 | - const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
| 48 | + const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
| 49 | + const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
| 50 | 50 | const STATUS_REJECTED = 3; |
| 51 | 51 | |
| 52 | 52 | |
@@ -124,8 +124,8 @@ |
||
| 124 | 124 | // Ref customer |
| 125 | 125 | //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', 0, 1); |
| 126 | 126 | //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1); |
| 127 | - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
|
| 128 | - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); |
|
| 127 | + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
|
| 128 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); |
|
| 129 | 129 | // Thirdparty |
| 130 | 130 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
| 131 | 131 | // Project |
@@ -142,12 +142,12 @@ |
||
| 142 | 142 | $messagewarning .= '</div>'; |
| 143 | 143 | |
| 144 | 144 | if ($result <= 0 && $edituser->error == 'USERNOTFOUND') { |
| 145 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 145 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 146 | 146 | $message .= $messagewarning; |
| 147 | 147 | $username = ''; |
| 148 | 148 | } else { |
| 149 | 149 | if (empty($edituser->email)) { |
| 150 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 150 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 151 | 151 | $message .= $messagewarning; |
| 152 | 152 | } else { |
| 153 | 153 | $newpassword = $edituser->setPassword($user, '', 1); |
@@ -199,12 +199,12 @@ discard block |
||
| 199 | 199 | print '<div class="div-table-responsive-no-min">'; |
| 200 | 200 | print '<table class="noborder centpercent">'; |
| 201 | 201 | print '<tr class="liste_titre">'; |
| 202 | -print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '') . "\n"; |
|
| 202 | +print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; |
|
| 203 | 203 | print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); |
| 204 | 204 | print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); |
| 205 | -print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
|
| 205 | +print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
|
| 206 | 206 | if (isModEnabled('multicompany') && !$user->entity) { |
| 207 | - print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
|
| 207 | + print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
|
| 208 | 208 | } |
| 209 | 209 | print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); |
| 210 | 210 | print "</tr>\n"; |
@@ -227,12 +227,12 @@ discard block |
||
| 227 | 227 | // Limit to superadmin |
| 228 | 228 | if (isModEnabled('multicompany') && !$user->entity) { |
| 229 | 229 | print '<td>'; |
| 230 | - print '<input type="text" class="flat" size="1" name="entity" value="' . $conf->entity . '">'; |
|
| 230 | + print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">'; |
|
| 231 | 231 | print '</td>'; |
| 232 | 232 | print '<td class="center">'; |
| 233 | 233 | } else { |
| 234 | 234 | print '<td class="center">'; |
| 235 | - print '<input type="hidden" name="entity" value="' . $conf->entity . '">'; |
|
| 235 | + print '<input type="hidden" name="entity" value="'.$conf->entity.'">'; |
|
| 236 | 236 | } |
| 237 | 237 | print '<input type="submit" class="button button-add small" id="add" name="add" value="'.$langs->trans("Add").'">'; |
| 238 | 238 | print "</td>\n"; |
@@ -56,8 +56,8 @@ |
||
| 56 | 56 | |
| 57 | 57 | // Permissions |
| 58 | 58 | $permissionnote = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); // Used by the include of actions_setnotes.inc.php |
| 59 | -$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
| 60 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
| 59 | +$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
|
| 60 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
|
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | /* |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if (! defined('ODTPHP_PATHTOPCLZIP')) define('ODTPHP_PATHTOPCLZIP','pclzip/'); |
|
| 2 | +if (!defined('ODTPHP_PATHTOPCLZIP')) define('ODTPHP_PATHTOPCLZIP', 'pclzip/'); |
|
| 3 | 3 | require_once ODTPHP_PATHTOPCLZIP.'pclzip.lib.php'; |
| 4 | 4 | require_once 'ZipInterface.php'; |
| 5 | 5 | class PclZipProxyException extends Exception |
@@ -26,13 +26,13 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @throws PclZipProxyException |
| 28 | 28 | */ |
| 29 | - public function __construct($forcedir='') |
|
| 29 | + public function __construct($forcedir = '') |
|
| 30 | 30 | { |
| 31 | - if (! class_exists('PclZip')) { |
|
| 31 | + if (!class_exists('PclZip')) { |
|
| 32 | 32 | throw new PclZipProxyException('PclZip class not loaded - PclZip library |
| 33 | 33 | is required for using PclZipProxy'); ; |
| 34 | 34 | } |
| 35 | - if ($forcedir) $this->tmpdir=preg_replace('|[//\/]$|','',$forcedir); // $this->tmpdir must not contains / at the end |
|
| 35 | + if ($forcedir) $this->tmpdir = preg_replace('|[//\/]$|', '', $forcedir); // $this->tmpdir must not contains / at the end |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | $localname = preg_replace("/(?:\.|\/)*(.*)/", "\\1", $localname); |
| 91 | 91 | $localpath = dirname($localname); |
| 92 | - $tmpfilename = $this->tmpdir . '/' . basename($localname); |
|
| 92 | + $tmpfilename = $this->tmpdir.'/'.basename($localname); |
|
| 93 | 93 | if (false !== file_put_contents($tmpfilename, $contents)) { |
| 94 | 94 | //print "tmpfilename=".$tmpfilename; |
| 95 | 95 | //print "localname=".$localname; |
| 96 | - $res=$this->pclzip->delete(PCLZIP_OPT_BY_NAME, $localname); |
|
| 96 | + $res = $this->pclzip->delete(PCLZIP_OPT_BY_NAME, $localname); |
|
| 97 | 97 | $add = $this->pclzip->add($tmpfilename, |
| 98 | 98 | PCLZIP_OPT_REMOVE_PATH, $this->tmpdir, |
| 99 | 99 | PCLZIP_OPT_ADD_PATH, $localpath); |
@@ -124,10 +124,10 @@ discard block |
||
| 124 | 124 | if (isSet($localname)) { |
| 125 | 125 | $localname = preg_replace("/(?:\.|\/)*(.*)/", "\\1", $localname); |
| 126 | 126 | $localpath = dirname($localname); |
| 127 | - $tmpfilename = $this->tmpdir . '/' . basename($localname); |
|
| 127 | + $tmpfilename = $this->tmpdir.'/'.basename($localname); |
|
| 128 | 128 | } else { |
| 129 | 129 | $localname = basename($filename); |
| 130 | - $tmpfilename = $this->tmpdir . '/' . $localname; |
|
| 130 | + $tmpfilename = $this->tmpdir.'/'.$localname; |
|
| 131 | 131 | $localpath = ''; |
| 132 | 132 | } |
| 133 | 133 | if (file_exists($filename)) { |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct() |
| 26 | 26 | { |
| 27 | - if (! class_exists('ZipArchive')) { |
|
| 27 | + if (!class_exists('ZipArchive')) { |
|
| 28 | 28 | throw new PhpZipProxyException('Zip extension not loaded - check your php settings, PHP5.2 minimum with zip extension |
| 29 | 29 | is required for using PhpZipProxy'); ; |
| 30 | 30 | } |