diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 65363f468e80e66c4d2a11ddf88c19bd4a3455f5..1a9ef385bf723130b6ad79bd64ecd5a52df43795 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -77,7 +77,7 @@ if ($action == 'update') llxHeader(); $form = new Form($db); -if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db); +if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans('ConfigLoan'),$linkback,'title_setup'); diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 59796919a8b2555d8b72e66e568e2dabfa470043..a8f98f02c3b2eb245090a17c19a29f7f43b295ab 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -113,7 +113,7 @@ if ($action == 'update') { llxHeader(); $form=new Form($db); -if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db); +if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans('TaxSetup'),$linkback,'title_setup'); diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 75653783c7c494da24cf4361c61f79b28caf207d..422e7be984d21972a04177820b1d16389f36ff22 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -133,7 +133,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='',$oker $error=0; $i=0; $buffer = ''; - $arraysql = Array(); + $arraysql = array(); // Get version of database $versionarray=$db->getVersionArray(); diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index b0849bb913eb34f5c64b3b06c6821ed19392b8f6..13956f688aa92dd59720c3d03e41ffe624054a38 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -27,9 +27,9 @@ /* ******************************************************************** */ /* COLORS */ /* ******************************************************************** */ -$bar_color=Array(0,0,0); -$bg_color=Array(255,255,255); -$text_color=Array(0,0,0); +$bar_color=array(0,0,0); +$bg_color=array(255,255,255); +$text_color=array(0,0,0); /* ******************************************************************** */ diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index a35520998bfada522aa036e14208f04d0312e85d..4d31308b4b3c2662abc57d45c4a2e5a0bcd68574 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -356,20 +356,20 @@ function utf82utf16($utf8) } switch(strlen($utf8)) { - case 1: - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return $utf8; - - case 2: - // return a UTF-16 character from a 2-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); - - case 3: - // return a UTF-16 character from a 3-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); } // ignoring UTF-32 for now, sorry diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 69e48248d57fe66e5e9faf42f54162f48a89c664..fc659565c56affbee926ea5e52cfd3fc3105ce5e 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -201,7 +201,7 @@ else if ($action == 'setart885') { $dir = "../../core/modules/dons/"; $form=new Form($db); -if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db); +if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); llxHeader('',$langs->trans("DonationsSetup"),'DonConfiguration'); $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a6b431c4273100ee2975995fed390f7ecd30b336..9f91765b92dee4fec58b7e5c9b0bb3bfde00e2f1 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -848,7 +848,7 @@ llxHeader('', $title, $helpurl); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db); +if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); // Load object modBarCodeProduct $res=0; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 4c67a25962efdcbd5c995b87b13f012bc8082f2f..18f53a304b24e5519c73b87105c1add37fa9d7ee 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3585,15 +3585,15 @@ class Product extends CommonObject { switch ($type) { - case 0: - return $this->LibStatut($this->status,$mode,$type); - case 1: - return $this->LibStatut($this->status_buy,$mode,$type); - case 2: - return $this->LibStatut($this->status_batch,$mode,$type); - default: - //Simulate previous behavior but should return an error string - return $this->LibStatut($this->status_buy,$mode,$type); + case 0: + return $this->LibStatut($this->status,$mode,$type); + case 1: + return $this->LibStatut($this->status_buy,$mode,$type); + case 2: + return $this->LibStatut($this->status_batch,$mode,$type); + default: + //Simulate previous behavior but should return an error string + return $this->LibStatut($this->status_buy,$mode,$type); } }