Completed
Branch develop (091b9c)
by
unknown
19:44
created
htdocs/adherents/type_translation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 
75 75
 	// update of object
76 76
 	if ($forcelangprod == $current_lang) {
77
-		$object->label		 = GETPOST("libelle", 'alphanohtml');
77
+		$object->label = GETPOST("libelle", 'alphanohtml');
78 78
 		$object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
79 79
 		//$object->other		 = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
80 80
 	} else {
Please login to merge, or discard this patch.
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   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 		$newtimeyear = (int) dol_print_date($newtime, '%Y');
188 188
 		$newtimemonth = (int) dol_print_date($newtime, '%m');
189
-		$newtimetotalmonths = (($newtimeyear * 12) +  $newtimemonth);
189
+		$newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth);
190 190
 
191 191
 		if ($monthsexpected < $newtimetotalmonths) {
192 192
 			$newtimehours = (int) dol_print_date($newtime, '%H');
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 		$sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active";
802 802
 		$sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday";
803 803
 		$sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")";
804
-		$sql .= " AND entity IN (0," .getEntity('holiday') .")";
804
+		$sql .= " AND entity IN (0,".getEntity('holiday').")";
805 805
 
806 806
 		$resql = $db->query($sql);
807 807
 		if ($resql) {
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 		$jour  = (int) gmdate("d", $timestampStart);
833 833
 		$mois  = (int) gmdate("m", $timestampStart);
834 834
 		$annee = (int) gmdate("Y", $timestampStart);
835
-		$jour_semaine = (int) gmdate("w", $timestampStart);		// sunday = 0, monday = 1, ...
835
+		$jour_semaine = (int) gmdate("w", $timestampStart); // sunday = 0, monday = 1, ...
836 836
 
837 837
 		//print "jour=".$jour." month=".$mois." year=".$annee." includesaturday=".$includesaturday." includesunday=".$includesunday."\n";
838 838
 		foreach ($arrayOfPublicHolidays as $entrypublicholiday) {
@@ -1053,13 +1053,13 @@  discard block
 block discarded – undo
1053 1053
 
1054 1054
 	$country_id = dol_getIdFromCode($db, $country_code, 'c_country', 'code', 'rowid');
1055 1055
 
1056
-	if (empty($conf->cache['arrayOfActivePublicHolidays_' . $country_id])) {
1056
+	if (empty($conf->cache['arrayOfActivePublicHolidays_'.$country_id])) {
1057 1057
 		// Loop on public holiday defined into hrm_public_holiday for the day, month and year analyzed
1058 1058
 		$tmpArrayOfPublicHolidays = array();
1059 1059
 		$sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active";
1060
-		$sql .= " FROM " . MAIN_DB_PREFIX . "c_hrm_public_holiday";
1061
-		$sql .= " WHERE active = 1 and fk_country IN (0" . ($country_id > 0 ? ", " . $country_id : 0) . ")";
1062
-		$sql .= " AND entity IN (0," . getEntity('holiday') . ")";
1060
+		$sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday";
1061
+		$sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")";
1062
+		$sql .= " AND entity IN (0,".getEntity('holiday').")";
1063 1063
 
1064 1064
 		$resql = $db->query($sql);
1065 1065
 		if ($resql) {
@@ -1072,14 +1072,14 @@  discard block
 block discarded – undo
1072 1072
 			}
1073 1073
 		} else {
1074 1074
 			dol_syslog($db->lasterror(), LOG_ERR);
1075
-			return 'Error sql ' . $db->lasterror();
1075
+			return 'Error sql '.$db->lasterror();
1076 1076
 		}
1077 1077
 
1078 1078
 		//var_dump($tmpArrayOfPublicHolidays);
1079
-		$conf->cache['arrayOfActivePublicHolidays_' . $country_id] = $tmpArrayOfPublicHolidays;
1079
+		$conf->cache['arrayOfActivePublicHolidays_'.$country_id] = $tmpArrayOfPublicHolidays;
1080 1080
 	}
1081 1081
 
1082
-	$arrayOfPublicHolidays = $conf->cache['arrayOfActivePublicHolidays_' . $country_id];
1082
+	$arrayOfPublicHolidays = $conf->cache['arrayOfActivePublicHolidays_'.$country_id];
1083 1083
 	$listFeries = [];
1084 1084
 	$i = 0;
1085 1085
 	while ((($lastday == 0 && $timestampStart < $timestampEnd) || ($lastday && $timestampStart <= $timestampEnd))
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/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/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.
htdocs/holiday/month_report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 $sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
150 150
 $sql .= " AND (";
151 151
 $sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
152
-$sql .= " OR";	// For leave over several months
152
+$sql .= " OR"; // For leave over several months
153 153
 $sql .= " (date_format(cp.date_debut, '%Y-%m') < '".$db->escape($year_month)."' AND date_format(cp.date_fin, '%Y-%m') > '".$db->escape($year_month)."') ";
154 154
 $sql .= " )";
155 155
 if (!empty($search_ref)) {
Please login to merge, or discard this patch.
htdocs/core/modules/takepos/mod_takepos_ref_simple.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function getExample()
78 78
 	{
79
-		return $this->prefix.'0-0501-0001';		// TC0-0501-0001
79
+		return $this->prefix.'0-0501-0001'; // TC0-0501-0001
80 80
 	}
81 81
 
82 82
 	/**
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 		$pryymm = '';
93 93
 		$max = '';
94 94
 
95
-		$pos_source = 0;	// POS source = Terminal ID
95
+		$pos_source = 0; // POS source = Terminal ID
96 96
 
97 97
 		// First, we get the max value
98
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
98
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
99 99
 
100 100
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
101 101
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 	{
136 136
 		global $db;
137 137
 
138
-		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0;	// POS source = Terminal ID
138
+		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID
139 139
 
140 140
 		// First, we get the max value
141
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
141
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
142 142
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
143 143
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
144 144
 		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'";
Please login to merge, or discard this patch.
htdocs/core/lib/contact.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 			} else {
81 81
 				dol_print_error($db);
82 82
 			}
83
-			dol_setcache($cachekey, $nbProject, 120);	// If setting cache fails, this is not a problem, so we do not test result.
83
+			dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
84 84
 		}
85 85
 		$head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id;
86 86
 		$head[$tab][1] = $langs->trans("Projects");
Please login to merge, or discard this patch.