Laurent Destailleur 1 éve
szülő
commit
8646b826e0

+ 1 - 1
htdocs/adherents/vcard.php

@@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/vcard.class.php';
 $id = GETPOST('id', 'int');
 $ref = GETPOST('ref', 'alphanohtml');
 
-$object = new adherent($db);
+$object = new Adherent($db);
 
 // Fetch object
 if ($id > 0 || !empty($ref)) {

+ 1 - 1
htdocs/admin/emailcollector_card.php

@@ -754,7 +754,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 	$fk_element = 'position';
 	$i = 0;
 	foreach ($object->actions as $ruleaction) {
-		$ruleactionobj = new EmailcollectorAction($db);
+		$ruleactionobj = new EmailCollectorAction($db);
 		$ruleactionobj->fetch($ruleaction['id']);
 
 		print '<tr class="drag drop oddeven" id="row-'.$ruleaction['id'].'">';

+ 2 - 1
htdocs/admin/hrm.php

@@ -286,7 +286,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
 								}
 								print '</td>';
 
-								$mytmpinstance = new $myTmpObjectKey($db);
+								$nameofclass = ucfirst($myTmpObjectKey);
+								$mytmpinstance = new $nameofclass($db);
 								$mytmpinstance->initAsSpecimen();
 
 								// Info

+ 2 - 1
htdocs/admin/stocktransfer.php

@@ -294,7 +294,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
 								}
 								print '</td>';
 
-								$mytmpinstance = new $myTmpObjectKey($db);
+								$nameofclass = ucfirst($myTmpObjectKey);
+								$mytmpinstance = new $nameofclass($db);
 								$mytmpinstance->initAsSpecimen();
 
 								// Info

+ 2 - 1
htdocs/admin/workstation.php

@@ -299,7 +299,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
 								}
 								print '</td>';
 
-								$mytmpinstance = new $myTmpObjectKey($db);
+								$nameofclass = ucfirst($myTmpObjectKey);
+								$mytmpinstance = new $nameofclass($db);
 								$mytmpinstance->initAsSpecimen();
 
 								// Info

+ 1 - 1
htdocs/compta/bank/treso.php

@@ -68,7 +68,7 @@ $facturestatic = new Facture($db);
 $facturefournstatic = new FactureFournisseur($db);
 $socialcontribstatic = new ChargeSociales($db);
 $salarystatic = new Salary($db);
-$vatstatic = new TVA($db);
+$vatstatic = new Tva($db);
 
 $form = new Form($db);
 

+ 1 - 1
htdocs/compta/charges/index.php

@@ -86,7 +86,7 @@ if (!$sortorder) {
  */
 
 $tva_static = new Tva($db);
-$ptva_static = new PaymentVat($db);
+$ptva_static = new PaymentVAT($db);
 $socialcontrib = new ChargeSociales($db);
 $payment_sc_static = new PaymentSocialContribution($db);
 $sal_static = new Salary($db);

+ 1 - 1
htdocs/compta/facture/card.php

@@ -3782,7 +3782,7 @@ if ($action == 'create') {
 	if (empty($reshook)) {
 		if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_INVOICE) && !empty($soc->id)) {
 			// copy from thirdparty
-			$tpExtrafields = new Extrafields($db);
+			$tpExtrafields = new ExtraFields($db);
 			$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
 			if ($soc->fetch_optionals() > 0) {
 				$object->array_options = array_merge($object->array_options, $soc->array_options);

+ 1 - 1
htdocs/compta/payment_vat/card.php

@@ -124,7 +124,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->tax->char
 
 llxHeader();
 
-$tva = new TVA($db);
+$tva = new Tva($db);
 $form = new Form($db);
 
 $h = 0;

+ 1 - 1
htdocs/core/boxes/box_boms.php

@@ -78,7 +78,7 @@ class box_boms extends ModeleBoxes
 		include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
 		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
 
-		$bomstatic = new Bom($this->db);
+		$bomstatic = new BOM($this->db);
 		$productstatic = new Product($this->db);
 		$userstatic = new User($this->db);
 

+ 8 - 8
htdocs/core/class/lessc.class.php

@@ -2660,9 +2660,9 @@ class lessc_parser
 				array_keys(self::$precedence)
 			)).')';
 
-				$commentSingle = lessc::preg_quote(self::$commentSingle);
-				$commentMultiLeft = lessc::preg_quote(self::$commentMultiLeft);
-				$commentMultiRight = lessc::preg_quote(self::$commentMultiRight);
+				$commentSingle = Lessc::preg_quote(self::$commentSingle);
+				$commentMultiLeft = Lessc::preg_quote(self::$commentMultiLeft);
+				$commentMultiRight = Lessc::preg_quote(self::$commentMultiRight);
 
 				self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight;
 				self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais';
@@ -2959,7 +2959,7 @@ class lessc_parser
 			return false;
 		}
 
-		$exps = lessc::compressList($values, ' ');
+		$exps = Lessc::compressList($values, ' ');
 		return true;
 	}
 
@@ -3080,7 +3080,7 @@ class lessc_parser
 			return false;
 		}
 
-		$value = lessc::compressList($values, ', ');
+		$value = Lessc::compressList($values, ', ');
 		return true;
 	}
 
@@ -3373,7 +3373,7 @@ class lessc_parser
 
 		// look for either ending delim , escape, or string interpolation
 		$patt = '([^\n]*?)(@\{|\\\\|'.
-			lessc::preg_quote($delim).')';
+			Lessc::preg_quote($delim).')';
 
 			$oldWhite = $this->eatWhiteDefault;
 			$this->eatWhiteDefault = false;
@@ -3971,7 +3971,7 @@ class lessc_parser
 		}
 
 		if (!isset(self::$literalCache[$what])) {
-			self::$literalCache[$what] = lessc::preg_quote($what);
+			self::$literalCache[$what] = Lessc::preg_quote($what);
 		}
 
 		$m = array();
@@ -4019,7 +4019,7 @@ class lessc_parser
 			$validChars = $allowNewline ? "." : "[^\n]";
 		}
 		$m = array();
-		if (!$this->match('('.$validChars.'*?)'.lessc::preg_quote($what), $m, !$until)) {
+		if (!$this->match('('.$validChars.'*?)'.Lessc::preg_quote($what), $m, !$until)) {
 			return false;
 		}
 		if ($until) {

+ 1 - 1
htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php

@@ -239,7 +239,7 @@ class doc_generic_bom_odt extends ModelePDFBom
 			// If $object is id instead of object
 			if (!is_object($object)) {
 				$id = $object;
-				$object = new Bom($this->db);
+				$object = new BOM($this->db);
 				$result = $object->fetch($id);
 				if ($result < 0) {
 					dol_print_error($this->db, $object->error);

+ 1 - 1
htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php

@@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
 /**
  *	Class to build sending documents with model Eagle
  */
-class pdf_eagle extends ModelePdfStockTransfer
+class pdf_eagle extends ModelePDFStockTransfer
 {
 	/**
 	 * @var DoliDb Database handler

+ 2 - 2
htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php

@@ -127,7 +127,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
 					$result = $ldap->update($dn, $info, $user, $olddn, $newrdn, $newparent);
 
 					if ($result > 0 && !empty($object->context['newgroupid'])) {      // We are in context of adding a new group to user
-						$usergroup = new Usergroup($this->db);
+						$usergroup = new UserGroup($this->db);
 
 						$usergroup->fetch($object->context['newgroupid']);
 
@@ -149,7 +149,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
 					}
 
 					if ($result > 0 && !empty($object->context['oldgroupid'])) {      // We are in context of removing a group from user
-						$usergroup = new Usergroup($this->db);
+						$usergroup = new UserGroup($this->db);
 
 						$usergroup->fetch($object->context['oldgroupid']);
 

+ 1 - 1
htdocs/ecm/file_card.php

@@ -91,7 +91,7 @@ $filepath = $relativepath.$urlfile;
 $filepathtodocument = $relativetodocument.$urlfile;
 
 // Try to load object from index
-$object = new ECMFiles($db);
+$object = new EcmFiles($db);
 $extrafields = new ExtraFields($db);
 // fetch optionals attributes and labels
 $extrafields->fetch_name_optionals_label($object->table_element);

+ 1 - 1
htdocs/ecm/file_note.php

@@ -95,7 +95,7 @@ $filepath = $relativepath.$urlfile;
 $filepathtodocument = $relativetodocument.$urlfile;
 
 // Try to load object from index
-$object = new ECMFiles($db);
+$object = new EcmFiles($db);
 $extrafields = new ExtraFields($db);
 // fetch optionals attributes and labels
 $extrafields->fetch_name_optionals_label($object->table_element);

+ 1 - 2
htdocs/hrm/class/evaluationdet.class.php

@@ -163,7 +163,6 @@ class Evaluationline extends CommonObject
 	// public $lines = array();
 
 
-
 	/**
 	 * Constructor
 	 *
@@ -888,7 +887,7 @@ class Evaluationline extends CommonObject
 	{
 		$this->lines = array();
 
-		$objectline = new EvaluationLine($this->db);
+		$objectline = new Evaluationline($this->db);
 		$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_evaluationdet = '.$this->id));
 
 		if (is_numeric($result)) {

+ 1 - 1
htdocs/install/upgrade2.php

@@ -2056,7 +2056,7 @@ function migrate_modeles($db, $langs, $conf)
 
 	if (isModEnabled("expedition")) {
 		include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php';
-		$modellist = ModelePDFExpedition::liste_modeles($db);
+		$modellist = ModelePdfExpedition::liste_modeles($db);
 		if (count($modellist) == 0) {
 			// Aucun model par defaut.
 			$sql = " insert into ".MAIN_DB_PREFIX."document_model(nom,type) values('rouget','shipping')";

+ 1 - 1
htdocs/mrp/class/mo.class.php

@@ -694,7 +694,7 @@ class Mo extends CommonObject
 
 			if ($this->fk_bom > 0) {	// If a BOM is defined, we know what to produce.
 				include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
-				$bom = new Bom($this->db);
+				$bom = new BOM($this->db);
 				$bom->fetch($this->fk_bom);
 				if ($bom->bomtype == 1) {
 					$role = 'toproduce';

+ 1 - 1
htdocs/mrp/mo_list.php

@@ -596,7 +596,7 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar
 }
 
 
-$bom = new Bom($db);
+$bom = new BOM($db);
 $product = new Product($db);
 
 // Loop on record

+ 2 - 2
htdocs/mrp/mo_production.php

@@ -715,7 +715,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 
 		$bomcost = 0;
 		if ($object->fk_bom > 0) {
-			$bom = new Bom($db);
+			$bom = new BOM($db);
 			$res = $bom->fetch($object->fk_bom);
 			if ($res > 0) {
 				$bom->calculateCosts();
@@ -948,7 +948,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 					// Stock
 					if (isModEnabled('stock')) {
 						print '<td class="nowraponall right">';
-						if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $tmpproduct->type != PRODUCT::TYPE_SERVICE) {
+						if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $tmpproduct->type != Product::TYPE_SERVICE) {
 							if (!$line->disable_stock_change && $tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) {
 								print img_warning($langs->trans('StockTooLow')) . ' ';
 							}

+ 3 - 3
scripts/withdrawals/build_withdrawal_file.php

@@ -57,10 +57,10 @@ dol_syslog($script_file." launched with arg ".join(',', $argv));
 
 $datetimeprev = dol_now();
 
-$month = strftime("%m", $datetimeprev);
-$year = strftime("%Y", $datetimeprev);
+$month = dol_print_date($datetimeprev, "%m");
+$year = dol_print_date($datetimeprev, "%Y");
 
-$user = new user($db);
+$user = new User($db);
 $user->fetch($conf->global->PRELEVEMENT_USER);
 
 if (!isset($argv[1])) { // Check parameters