Completed
Branch develop (cf6175)
by
unknown
18:52
created
htdocs/core/lib/date.lib.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -682,7 +682,7 @@
 block discarded – undo
682 682
 {
683 683
 	$base = new DateTime("$year-03-21", new DateTimeZone("UTC"));
684 684
 	$days = easter_days($year); // Return number of days between 21 march and easter day.
685
-	$tmp = $base->add(new DateInterval("P{$days}D"));
685
+	$tmp = $base->add(new DateInterval("p{$days}d"));
686 686
 	return $tmp->getTimestamp();
687 687
 }
688 688
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -295,11 +295,11 @@  discard block
 block discarded – undo
295 295
 				$sTime .= dol_print_date($iSecond, 'hourduration', true);
296 296
 			}
297 297
 		} elseif ($format == 'allhourminsec') {
298
-			return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond/3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))).':'.sprintf("%02d", ((int) ($iSecond % 60)));
298
+			return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond / 3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))).':'.sprintf("%02d", ((int) ($iSecond % 60)));
299 299
 		} elseif ($format == 'allhourmin') {
300
-			return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond/3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600)/60)));
300
+			return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond / 3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60)));
301 301
 		} elseif ($format == 'allhour') {
302
-			return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond/3600)));
302
+			return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond / 3600)));
303 303
 		}
304 304
 	} elseif ($format == 'hour') {	// only hour part
305 305
 		$sTime = dol_print_date($iSecond, '%H', true);
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 		$sql = "SELECT code, entity, fk_country, dayrule, year, month, day, active";
804 804
 		$sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday";
805 805
 		$sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")";
806
-		$sql .= " AND entity IN (0," .getEntity('holiday') .")";
806
+		$sql .= " AND entity IN (0,".getEntity('holiday').")";
807 807
 
808 808
 		$resql = $db->query($sql);
809 809
 		if ($resql) {
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
 				$jour_1sunsept = date("d", $date_1sunsept);
948 948
 				$mois_1sunsept = date("m", $date_1sunsept);
949 949
 				if ($jour_1sunsept == $jour && $mois_1sunsept == $mois) {
950
-					$ferie=true;
950
+					$ferie = true;
951 951
 				}
952 952
 				// Geneva fast in Switzerland
953 953
 			}
Please login to merge, or discard this patch.
htdocs/core/modules/modHRM.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 
129 129
 		// Array to add new pages in new tabs
130 130
 		$this->tabs = array();
131
-		$this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user');  					// To add a new tab identified by code tabname1
131
+		$this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user'); // To add a new tab identified by code tabname1
132 132
 		//$this->tabs[] = array('data'=>'job:+tabname1:Poste:mylangfile@hrm:1:/hrm/poste_list.php?fk_job=__ID__');  					// To add a new tab identified by code tabname1
133 133
 		// Example:
134 134
 		// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@hrm:$user->rights->hrm->read:/hrm/mynewtab1.php?id=__ID__');  					// To add a new tab identified by code tabname1
Please login to merge, or discard this patch.
htdocs/core/extrafieldsinexport.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 			case 'sellist':
49 49
 				$tmp = '';
50 50
 				$tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
51
-				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) &&  $tmpparam['options'] && is_array($tmpparam['options'])) {
51
+				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
52 52
 					$tmpkeys = array_keys($tmpparam['options']);
53 53
 					$tmp = array_shift($tmpkeys);
54 54
 				}
Please login to merge, or discard this patch.
htdocs/document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  */
139 139
 
140 140
 // If we have a hash public (hashp), we guess the original_file.
141
-$ecmfile='';
141
+$ecmfile = '';
142 142
 if (!empty($hashp)) {
143 143
 	include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
144 144
 	$ecmfile = new EcmFiles($db);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 }
197 197
 
198 198
 // Security: Delete string ../ or ..\ into $original_file
199
-$original_file = preg_replace('/\.\.+/', '..', $original_file);	// Replace '... or more' with '..'
199
+$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..'
200 200
 $original_file = str_replace('../', '/', $original_file);
201 201
 $original_file = str_replace('..\\', '/', $original_file);
202 202
 
Please login to merge, or discard this patch.
htdocs/core/class/html.formldap.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,8 @@
 block discarded – undo
124 124
 			$htmlname = 'activesynchro';
125 125
 		}
126 126
 
127
-		$dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP") . (($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : "");
128
-		$ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr") . (($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : "");
127
+		$dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP").(($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : "");
128
+		$ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr").(($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : "");
129 129
 
130 130
 		$arraylist = array(
131 131
 			Ldap::SYNCHRO_NONE				=> $langs->trans("No"),
Please login to merge, or discard this patch.
htdocs/product/inventory/ajax/searchfrombarcode.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	$result = $db->query($sql);
79 79
 	if ($result) {
80 80
 		$nbline = $db->num_rows($result);
81
-		for ($i=0; $i < $nbline; $i++) {
81
+		for ($i = 0; $i < $nbline; $i++) {
82 82
 			$object = $db->fetch_object($result);
83 83
 			if (($mode == "barcode" && $barcode == $object->barcode) || ($mode == "lotserial" && $barcode == $object->batch)) {
84 84
 				$warehouse->fetch(0, $product["Warehouse"]);
@@ -88,22 +88,22 @@  discard block
 block discarded – undo
88 88
 					$fk_product = $object->fk_product;
89 89
 					$reelqty = $object->reel;
90 90
 
91
-					$objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty);
91
+					$objectreturn = array('fk_warehouse'=>$warehouseid, 'fk_product'=>$fk_product, 'reelqty'=>$reelqty);
92 92
 				}
93 93
 			}
94 94
 		}
95 95
 		if ($warehousefound < 1) {
96
-			$response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode);
96
+			$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>'No warehouse found for barcode'.$barcode);
97 97
 		} elseif ($warehousefound > 1) {
98
-			$response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found');
98
+			$response = array('status'=>'error', 'errorcode'=>'TooManyWarehouse', 'message'=>'Too many warehouse found');
99 99
 		} else {
100
-			$response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn);
100
+			$response = array('status'=>'success', 'message'=>'Warehouse found', 'object'=>$objectreturn);
101 101
 		}
102 102
 	} else {
103
-		$response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode");
103
+		$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>"No results found for barcode");
104 104
 	}
105 105
 } else {
106
-	$response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action");
106
+	$response = array('status'=>'error', 'errorcode'=>'ActionError', 'message'=>"Error on action");
107 107
 }
108 108
 
109 109
 if ($action == "addnewlineproduct") {
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
 		$result = $inventoryline->create($user);
124 124
 		if ($result > 0) {
125
-			$response = array('status'=>'success','message'=>'Success on creating line','id_line'=>$result);
125
+			$response = array('status'=>'success', 'message'=>'Success on creating line', 'id_line'=>$result);
126 126
 		} else {
127
-			$response = array('status'=>'error','errorcode'=>'ErrorCreation','message'=>"Error on line creation");
127
+			$response = array('status'=>'error', 'errorcode'=>'ErrorCreation', 'message'=>"Error on line creation");
128 128
 		}
129 129
 	} else {
130
-		$response = array('status'=>'error','errorcode'=>'NoIdForInventory','message'=>"No id for inventory");
130
+		$response = array('status'=>'error', 'errorcode'=>'NoIdForInventory', 'message'=>"No id for inventory");
131 131
 	}
132 132
 }
133 133
 
Please login to merge, or discard this patch.
htdocs/core/multicompany_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 $title = $langs->trans("Multicompanies");
82 82
 
83 83
 // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests
84
-$head = '<!-- Multicompany selection -->'."\n";	// This is used by DoliDroid to know page is a multicompany selection page
84
+$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page
85 85
 $arrayofjs = array();
86 86
 $arrayofcss = array();
87 87
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/bookmarks_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $title = $langs->trans("Bookmarks");
59 59
 
60 60
 // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
61
-$head = '<!-- Bookmarks -->'."\n";	// This is used by DoliDroid to know page is a bookmark selection page
61
+$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page
62 62
 $arrayofjs = array();
63 63
 $arrayofcss = array();
64 64
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/get_menudiv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 $title = $langs->trans("Menu");
85 85
 
86 86
 // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
87
-$head = '<!-- Menu -->'."\n";	// This is used by DoliDroid to know page is a menu page
87
+$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page
88 88
 $arrayofjs = array();
89 89
 $arrayofcss = array();
90 90
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.