Completed
Branch develop (eec7c5)
by
unknown
24:48
created
htdocs/compta/facture/list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 $search_product_category = GETPOST('search_product_category', 'intcomma');
180 180
 $search_fac_rec_source_title = GETPOST("search_fac_rec_source_title", 'alpha');
181 181
 $search_fk_fac_rec_source = GETPOST('search_fk_fac_rec_source', 'int');
182
-$search_import_key  = trim(GETPOST("search_import_key", "alpha"));
182
+$search_import_key = trim(GETPOST("search_import_key", "alpha"));
183 183
 
184 184
 $search_option = GETPOST('search_option');
185 185
 if ($search_option == 'late') {
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 	$sql .= natural_search('facrec.titre', $search_fac_rec_source_title);
1014 1014
 }
1015 1015
 if ($search_fk_fac_rec_source) {
1016
-	$sql .= ' AND f.fk_fac_rec_source = ' . (int) $search_fk_fac_rec_source;
1016
+	$sql .= ' AND f.fk_fac_rec_source = '.(int) $search_fk_fac_rec_source;
1017 1017
 }
1018 1018
 if ($search_import_key) {
1019 1019
 	$sql .= natural_search("s.import_key", $search_import_key);
@@ -1047,7 +1047,7 @@  discard block
 block discarded – undo
1047 1047
 			if ($searchCategoryInvoiceOperator == 0) {
1048 1048
 				$searchCategoryInvoiceSqlList[] = " EXISTS (SELECT ck.fk_invoice FROM ".MAIN_DB_PREFIX."categorie_invoice as ck WHERE f.rowid = ck.fk_invoice AND ck.fk_categorie = ".((int) $searchCategoryInvoice).")";
1049 1049
 			} else {
1050
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryInvoice);
1050
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryInvoice);
1051 1051
 			}
1052 1052
 		}
1053 1053
 	}
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 			if ($searchCategoryProductOperator == 0) {
1079 1079
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."facturedet as fd WHERE fd.fk_facture = f.rowid AND fd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
1080 1080
 			} else {
1081
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
1081
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
1082 1082
 			}
1083 1083
 		}
1084 1084
 	}
@@ -1108,7 +1108,7 @@  discard block
 block discarded – undo
1108 1108
 			if ($searchCategoryCustomerOperator == 0) {
1109 1109
 				$searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategoryCustomer).")";
1110 1110
 			} else {
1111
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer);
1111
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer);
1112 1112
 			}
1113 1113
 		}
1114 1114
 	}
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
 	$param .= '&search_fac_rec_source_title='.urlencode($search_fac_rec_source_title);
1420 1420
 }
1421 1421
 if ($search_fk_fac_rec_source) {
1422
-	$param .= '&search_fk_fac_rec_source=' . (int) $search_fk_fac_rec_source;
1422
+	$param .= '&search_fk_fac_rec_source='.(int) $search_fk_fac_rec_source;
1423 1423
 }
1424 1424
 if ($search_import_key != '') {
1425 1425
 	$param .= '&search_import_key='.urlencode($search_import_key);
@@ -2233,7 +2233,7 @@  discard block
 block discarded – undo
2233 2233
 
2234 2234
 		$facturestatic->id = $obj->id;
2235 2235
 		$facturestatic->ref = $obj->ref;
2236
-		$facturestatic->ref_client = $obj->ref_client;		// deprecated
2236
+		$facturestatic->ref_client = $obj->ref_client; // deprecated
2237 2237
 		$facturestatic->ref_customer = $obj->ref_client;
2238 2238
 		$facturestatic->type = $obj->type;
2239 2239
 		$facturestatic->subtype = $obj->subtype;
Please login to merge, or discard this patch.
htdocs/webportal/admin/setup_theme.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 
26 26
 // Load Dolibarr environment
27 27
 require_once "../../main.inc.php";
28
-require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
29
-require_once DOL_DOCUMENT_ROOT . "/webportal/lib/webportal.lib.php";
28
+require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
29
+require_once DOL_DOCUMENT_ROOT."/webportal/lib/webportal.lib.php";
30 30
 
31 31
 /**
32 32
  * @var Conf $conf
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 // Parameters
46 46
 $action = GETPOST('action', 'aZ09');
47 47
 $backtopage = GETPOST('backtopage', 'alpha');
48
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
48
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
49 49
 
50 50
 $value = GETPOST('value', 'alpha');
51 51
 $label = GETPOST('label', 'alpha');
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 $useFormSetup = 1;
64 64
 
65 65
 if (!class_exists('FormSetup')) {
66
-	require_once DOL_DOCUMENT_ROOT . '/core/class/html.formsetup.class.php';
66
+	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php';
67 67
 }
68 68
 
69 69
 $formSetup = new FormSetup($db);
70 70
 
71
-require_once __DIR__ . '/../class/webPortalTheme.class.php';
71
+require_once __DIR__.'/../class/webPortalTheme.class.php';
72 72
 $webPortalTheme = new WebPortalTheme();
73 73
 
74 74
 // Setup conf for secondary color
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 $options = [
81 81
 	'default' => [
82 82
 		'id' => 'default-login-theme',
83
-		'label' => '<img src="'. DOL_URL_ROOT . '/public/webportal/img/login-tpl/default.svg" alt="'.dolPrintHTMLForAttribute($langs->trans('UseDefaultLoginForm')).'" />',
83
+		'label' => '<img src="'.DOL_URL_ROOT.'/public/webportal/img/login-tpl/default.svg" alt="'.dolPrintHTMLForAttribute($langs->trans('UseDefaultLoginForm')).'" />',
84 84
 		'labelIsHtml' => true
85 85
 	],
86 86
 	'right' => [
87 87
 		'id' => 'right-login-theme',
88
-		'label' => '<img src="'. DOL_URL_ROOT . '/public/webportal/img/login-tpl/right.svg" alt="'.dolPrintHTMLForAttribute($langs->trans('UseRightLoginForm')).'" />',
88
+		'label' => '<img src="'.DOL_URL_ROOT.'/public/webportal/img/login-tpl/right.svg" alt="'.dolPrintHTMLForAttribute($langs->trans('UseRightLoginForm')).'" />',
89 89
 		'labelIsHtml' => true
90 90
 	],
91 91
 ];
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
  * Actions
122 122
  */
123 123
 
124
-include DOL_DOCUMENT_ROOT . '/core/actions_setmoduleoptions.inc.php';
124
+include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
125 125
 
126 126
 // Force always edit mode
127 127
 if (empty($action) || $action == 'update') {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 llxHeader('', $langs->trans($title), $help_url);
142 142
 
143 143
 // Subheader
144
-$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
144
+$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
145 145
 
146 146
 print load_fiche_titre($langs->trans($title), $linkback, 'title_setup');
147 147
 
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
 } elseif (!empty($formSetup->items)) {
157 157
 	print $formSetup->generateOutput();
158 158
 	print '<div class="tabsAction">';
159
-	print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&token=' . newToken() . '">' . $langs->trans("Modify") . '</a>';
159
+	print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
160 160
 	print '</div>';
161 161
 } else {
162
-	print '<br>' . $langs->trans("NothingToSetup");
162
+	print '<br>'.$langs->trans("NothingToSetup");
163 163
 }
164 164
 
165 165
 
Please login to merge, or discard this patch.
test/phpunit/DateLibTest.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *		\remarks	To run this script as CLI:  phpunit filename.php
26 26
  */
27 27
 
28
-global $conf,$user,$langs,$db;
28
+global $conf, $user, $langs, $db;
29 29
 //define('TEST_DB_FORCE_TYPE','mysql');	// This is to force using mysql driver
30 30
 //require_once 'PHPUnit/Autoload.php';
31 31
 require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	public function testNumBetweenDay()
62 62
 	{
63
-		global $conf,$user,$langs,$db;
63
+		global $conf, $user, $langs, $db;
64 64
 		$conf = $this->savconf;
65 65
 		$user = $this->savuser;
66 66
 		$langs = $this->savlangs;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function testNumPublicHoliday()
114 114
 	{
115
-		global $conf,$user,$langs,$db;
115
+		global $conf, $user, $langs, $db;
116 116
 		$conf = $this->savconf;
117 117
 		$user = $this->savuser;
118 118
 		$langs = $this->savlangs;
@@ -125,16 +125,16 @@  discard block
 block discarded – undo
125 125
 
126 126
 		$result = num_public_holiday($date1, $date2, 'FR', 1);
127 127
 		print __METHOD__." for Tuesday 1 - Wednesday 2 jan 2013 for FR result=".$result."\n";
128
-		$this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for FR');   // 1 closed days (country france)
128
+		$this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for FR'); // 1 closed days (country france)
129 129
 
130 130
 		$result = num_public_holiday($date1, $date2, 'XX', 1);
131 131
 		print __METHOD__." for Tuesday 1 - Wednesday 2 jan 2013 for XX result=".$result."\n";
132
-		$this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for XX');   // 1 closed days (country unknown)
132
+		$this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for XX'); // 1 closed days (country unknown)
133 133
 
134 134
 		print '----'."\n";
135 135
 		$result = num_public_holiday($date2, $date3, 'FR', 1);
136 136
 		print __METHOD__." for Wednesday 2 - Thursday 3 jan 2013 for FR result=".$result."\n";
137
-		$this->assertEquals(0, $result, 'NumPublicHoliday for Wednesday 2 - Thursday 3 jan 2013 for FR');   // no closed days
137
+		$this->assertEquals(0, $result, 'NumPublicHoliday for Wednesday 2 - Thursday 3 jan 2013 for FR'); // no closed days
138 138
 
139 139
 		// Check with easter monday
140 140
 		$date1 = dol_mktime(0, 0, 0, 4, 21, 2019, 'gmt');
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$result = num_public_holiday($date1, $date2, 'XX', 1);
144 144
 		print __METHOD__." result=".$result."\n";
145
-		$this->assertEquals(1, $result, 'NumPublicHoliday including eastermonday for XX');   // 2 opened day, 1 closed days (sunday)
145
+		$this->assertEquals(1, $result, 'NumPublicHoliday including eastermonday for XX'); // 2 opened day, 1 closed days (sunday)
146 146
 
147 147
 		$result = num_public_holiday($date1, $date2, 'FR', 1);
148 148
 		print __METHOD__." result=".$result."\n";
149
-		$this->assertEquals(2, $result, 'NumPublicHoliday including eastermonday for FR');   // 1 opened day, 2 closed days (sunday + easter monday)
149
+		$this->assertEquals(2, $result, 'NumPublicHoliday including eastermonday for FR'); // 1 opened day, 2 closed days (sunday + easter monday)
150 150
 
151 151
 		// Check for sunday/saturday - Friday 4 - Sunday 6 jan 2013
152 152
 		$date1 = dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt');
@@ -154,23 +154,23 @@  discard block
 block discarded – undo
154 154
 
155 155
 		$result = num_public_holiday($date1, $date2, 'FR', 1);
156 156
 		print __METHOD__." result=".$result."\n";
157
-		$this->assertEquals(2, $result, 'NumPublicHoliday for FR');   // 1 opened day, 2 closed days
157
+		$this->assertEquals(2, $result, 'NumPublicHoliday for FR'); // 1 opened day, 2 closed days
158 158
 
159 159
 		$result = num_public_holiday($date1, $date2, 'FR', 1, 1, 1);
160 160
 		print __METHOD__." result=".$result."\n";
161
-		$this->assertEquals(2, $result, 'NumPublicHoliday for FR');   // 1 opened day, 2 closed days
161
+		$this->assertEquals(2, $result, 'NumPublicHoliday for FR'); // 1 opened day, 2 closed days
162 162
 
163 163
 		$result = num_public_holiday($date1, $date2, 'FR', 1, 1, 0);
164 164
 		print __METHOD__." result=".$result."\n";
165
-		$this->assertEquals(1, $result, 'NumPublicHoliday for FR');   // 2 opened day, 1 closed days
165
+		$this->assertEquals(1, $result, 'NumPublicHoliday for FR'); // 2 opened day, 1 closed days
166 166
 
167 167
 		$result = num_public_holiday($date1, $date2, 'FR', 1, 0, 0);
168 168
 		print __METHOD__." result=".$result."\n";
169
-		$this->assertEquals(0, $result, 'NumPublicHoliday for FR');   // 3 opened day, 0 closed days
169
+		$this->assertEquals(0, $result, 'NumPublicHoliday for FR'); // 3 opened day, 0 closed days
170 170
 
171 171
 		$result = num_public_holiday($date1, $date2, 'XX', 1);
172 172
 		print __METHOD__." result=".$result."\n";
173
-		$this->assertEquals(2, $result, 'NumPublicHoliday for XX');   // 1 opened day, 2 closed days (even if country unknown)
173
+		$this->assertEquals(2, $result, 'NumPublicHoliday for XX'); // 1 opened day, 2 closed days (even if country unknown)
174 174
 	}
175 175
 
176 176
 	/**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function testNumOpenDay()
182 182
 	{
183
-		global $conf,$user,$langs,$db;
183
+		global $conf, $user, $langs, $db;
184 184
 		$conf = $this->savconf;
185 185
 		$user = $this->savuser;
186 186
 		$langs = $this->savlangs;
@@ -196,50 +196,50 @@  discard block
 block discarded – undo
196 196
 
197 197
 
198 198
 		// With same hours - Tuesday/Wednesday jan 2013
199
-		$date1 = dol_mktime(0, 0, 0, 1, 1, 2013, 'gmt');	// tuesday
200
-		$date2 = dol_mktime(0, 0, 0, 1, 2, 2013, 'gmt');	// wednesday
201
-		$date3 = dol_mktime(0, 0, 0, 1, 3, 2013, 'gmt');	// thursday
199
+		$date1 = dol_mktime(0, 0, 0, 1, 1, 2013, 'gmt'); // tuesday
200
+		$date2 = dol_mktime(0, 0, 0, 1, 2, 2013, 'gmt'); // wednesday
201
+		$date3 = dol_mktime(0, 0, 0, 1, 3, 2013, 'gmt'); // thursday
202 202
 
203 203
 		$result = num_open_day($date1, $date2, 0, 1, 0, 'FR');
204 204
 		print __METHOD__." result=".$result."\n";
205
-		$this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for FR');   // 1 opened days (country france)
205
+		$this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for FR'); // 1 opened days (country france)
206 206
 
207 207
 		$result = num_open_day($date1, $date2, 0, 1, 0, 'XX');
208 208
 		print __METHOD__." result=".$result."\n";
209
-		$this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for XX');   // 1 opened days (country unknown)
209
+		$this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for XX'); // 1 opened days (country unknown)
210 210
 
211 211
 		$result = num_open_day($date2, $date3, 0, 1, 0, 'FR');
212 212
 		print __METHOD__." result=".$result."\n";
213
-		$this->assertEquals(2, $result, 'NumOpenDay Wednesday 2 - Thursday 3 jan 2013 for FR');   // 2 opened days
213
+		$this->assertEquals(2, $result, 'NumOpenDay Wednesday 2 - Thursday 3 jan 2013 for FR'); // 2 opened days
214 214
 
215 215
 		// With same hours - Friday/Sunday jan 2013
216
-		$date1 = dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt');	// friday
217
-		$date2 = dol_mktime(0, 0, 0, 1, 6, 2013, 'gmt');	// sunday
216
+		$date1 = dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt'); // friday
217
+		$date2 = dol_mktime(0, 0, 0, 1, 6, 2013, 'gmt'); // sunday
218 218
 
219 219
 		$result = num_open_day($date1, $date2, 0, 1, 0, 'FR');
220 220
 		print __METHOD__." result=".$result."\n";
221
-		$this->assertEquals(1, $result, 'NumOpenDay for FR');   // 1 opened day, 2 closed
221
+		$this->assertEquals(1, $result, 'NumOpenDay for FR'); // 1 opened day, 2 closed
222 222
 
223 223
 		$result = num_open_day($date1, $date2, 'XX', 1);
224 224
 		print __METHOD__." result=".$result."\n";
225
-		$this->assertEquals(1, $result, 'NumOpenDay for XX');   // 1 opened day, 2 closes (even if country unknown)
225
+		$this->assertEquals(1, $result, 'NumOpenDay for XX'); // 1 opened day, 2 closes (even if country unknown)
226 226
 
227 227
 		// Test option MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY and MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY
228 228
 		$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY = 0;
229 229
 		$result = num_open_day($date1, $date2, 0, 1, 0, 'FR');
230 230
 		print __METHOD__." result=".$result."\n";
231
-		$this->assertEquals(2, $result, 'NumOpenDay for FR when saturday is a working day');   //2 opened day, 1 closed
231
+		$this->assertEquals(2, $result, 'NumOpenDay for FR when saturday is a working day'); //2 opened day, 1 closed
232 232
 
233 233
 		$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY = 0;
234 234
 		$result = num_open_day($date1, $date2, 'XX', 1);
235 235
 		print __METHOD__." result=".$result."\n";
236
-		$this->assertEquals(3, $result, 'NumOpenDay for XX when saturday + sunday are working days');   // 3 opened day, 0 closes (even if country unknown)
236
+		$this->assertEquals(3, $result, 'NumOpenDay for XX when saturday + sunday are working days'); // 3 opened day, 0 closes (even if country unknown)
237 237
 
238 238
 		// Define specific dates for these tests
239
-		$date_friday_4 = dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt');   // Friday
239
+		$date_friday_4 = dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt'); // Friday
240 240
 		$date_saturday_5 = dol_mktime(0, 0, 0, 1, 5, 2013, 'gmt'); // Saturday
241
-		$date_monday_7 = dol_mktime(0, 0, 0, 1, 7, 2013, 'gmt');   // Monday
242
-		$date_friday_11 = dol_mktime(0, 0, 0, 1, 11, 2013, 'gmt');  // Following Friday
241
+		$date_monday_7 = dol_mktime(0, 0, 0, 1, 7, 2013, 'gmt'); // Monday
242
+		$date_friday_11 = dol_mktime(0, 0, 0, 1, 11, 2013, 'gmt'); // Following Friday
243 243
 
244 244
 		// Case 1: Weekend Boundary (Friday morning -> Saturday morning)
245 245
 		// Expected: 1 day. No half-day deduction for end date on a non-working day.
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function testConvertTime2Seconds()
281 281
 	{
282
-		global $conf,$user,$langs,$db;
282
+		global $conf, $user, $langs, $db;
283 283
 		$conf = $this->savconf;
284 284
 		$user = $this->savuser;
285 285
 		$langs = $this->savlangs;
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	 */
300 300
 	public function testConvertSecondToTime()
301 301
 	{
302
-		global $conf,$user,$langs,$db;
302
+		global $conf, $user, $langs, $db;
303 303
 		$conf = $this->savconf;
304 304
 		$user = $this->savuser;
305 305
 		$langs = $this->savlangs;
@@ -323,14 +323,14 @@  discard block
 block discarded – undo
323 323
 	 */
324 324
 	public function testDolPrintDate()
325 325
 	{
326
-		global $conf,$user,$langs,$db;
326
+		global $conf, $user, $langs, $db;
327 327
 		$conf = $this->savconf;
328 328
 		$user = $this->savuser;
329 329
 		$langs = $this->savlangs;
330 330
 		$db = $this->savdb;
331 331
 
332 332
 		// Check %Y-%m-%d %H:%M:%S format
333
-		$result = dol_print_date('1970-01-01', '%Y-%m-%d %H:%M:%S', true);	// A case for compatibility check
333
+		$result = dol_print_date('1970-01-01', '%Y-%m-%d %H:%M:%S', true); // A case for compatibility check
334 334
 		print __METHOD__." result=".$result."\n";
335 335
 		$this->assertEquals('1970-01-01 00:00:00', $result);
336 336
 
@@ -346,22 +346,22 @@  discard block
 block discarded – undo
346 346
 		$this->assertEquals('1970-01-01T00:00:00Z', $result);
347 347
 
348 348
 		// Check %Y-%m-%d %H:%M:%S format
349
-		$result = dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', true);	// http://www.epochconverter.com/
349
+		$result = dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/
350 350
 		print __METHOD__." result=".$result."\n";
351 351
 		$this->assertEquals('2500-01-01 00:00:00', $result);
352 352
 
353 353
 		// Check %Y-%m-%d %H:%M:%S format
354
-		$result = dol_print_date(-1830384000, '%Y-%m-%d %H:%M:%S', true);	// http://www.epochconverter.com/
354
+		$result = dol_print_date(-1830384000, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/
355 355
 		print __METHOD__." result=".$result."\n";
356
-		$this->assertEquals('1912-01-01 00:00:00', $result);	// dol_print_date use TZ (good) but epoch converter does not use it.
356
+		$this->assertEquals('1912-01-01 00:00:00', $result); // dol_print_date use TZ (good) but epoch converter does not use it.
357 357
 
358 358
 		// Check %Y-%m-%d %H:%M:%S format
359
-		$result = dol_print_date(-11676096000, '%Y-%m-%d %H:%M:%S', true);	// http://www.epochconverter.com/
359
+		$result = dol_print_date(-11676096000, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/
360 360
 		print __METHOD__." result=".$result."\n";
361 361
 		$this->assertEquals('1600-01-01 00:00:00', $result);
362 362
 
363 363
 		// test with negative timezone
364
-		$result = dol_print_date(-1, '%Y-%m-%d %H:%M:%S', true);	// http://www.epochconverter.com/
364
+		$result = dol_print_date(-1, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/
365 365
 		print __METHOD__." result=".$result."\n";
366 366
 		$this->assertEquals('1969-12-31 23:59:59', $result);
367 367
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 	 */
415 415
 	public function testDolTimePlusDuree()
416 416
 	{
417
-		global $conf,$user,$langs,$db;
417
+		global $conf, $user, $langs, $db;
418 418
 		$conf = $this->savconf;
419 419
 		$user = $this->savuser;
420 420
 		$langs = $this->savlangs;
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 	 */
445 445
 	public function testDolStringToTime()
446 446
 	{
447
-		global $conf,$user,$langs,$db;
447
+		global $conf, $user, $langs, $db;
448 448
 		$conf = $this->savconf;
449 449
 		$user = $this->savuser;
450 450
 		$langs = $this->savlangs;
@@ -490,16 +490,16 @@  discard block
 block discarded – undo
490 490
 		$day = 3;
491 491
 		$month = 2;
492 492
 		$year = 2015;
493
-		$conf->global->MAIN_START_WEEK = 1;	// start on monday
493
+		$conf->global->MAIN_START_WEEK = 1; // start on monday
494 494
 		$prev = dol_get_first_day_week($day, $month, $year);
495
-		$this->assertEquals(2, (int) $prev['first_day']);		// monday for month 2, year 2014 is the 2
495
+		$this->assertEquals(2, (int) $prev['first_day']); // monday for month 2, year 2014 is the 2
496 496
 
497 497
 		$day = 3;
498 498
 		$month = 2;
499 499
 		$year = 2015;
500
-		$conf->global->MAIN_START_WEEK = 0;	// start on sunday
500
+		$conf->global->MAIN_START_WEEK = 0; // start on sunday
501 501
 		$prev = dol_get_first_day_week($day, $month, $year);
502
-		$this->assertEquals(1, (int) $prev['first_day']);		// sunday for month 2, year 2015 is the 1st
502
+		$this->assertEquals(1, (int) $prev['first_day']); // sunday for month 2, year 2015 is the 1st
503 503
 
504 504
 		return 1;
505 505
 	}
@@ -514,15 +514,15 @@  discard block
 block discarded – undo
514 514
 	{
515 515
 		global $conf;
516 516
 
517
-		$now = 1800 + (24 * 3600 * 10);	// The 11th of january 1970 at 0:30 in UTC
517
+		$now = 1800 + (24 * 3600 * 10); // The 11th of january 1970 at 0:30 in UTC
518 518
 		$result = dol_get_first_hour($now, 'gmt');
519 519
 		print __METHOD__." now = ".$now.", dol_print_date(now, 'dayhourrfc', 'gmt') = ".dol_print_date($now, 'dayhourrfc', 'gmt').", result = ".$result.", dol_print_date(result, 'dayhourrfc', 'gmt') = ".dol_print_date($result, 'dayhourrfc', 'gmt')."\n";
520
-		$this->assertEquals('1970-01-11T00:00:00Z', dol_print_date($result, 'dayhourrfc', 'gmt'));		// monday for month 2, year 2014 is the 2
520
+		$this->assertEquals('1970-01-11T00:00:00Z', dol_print_date($result, 'dayhourrfc', 'gmt')); // monday for month 2, year 2014 is the 2
521 521
 
522
-		$now = 23.5 * 3600 + (24 * 3600 * 10);	// The 11th of january 1970 at 23:30 in UTC
522
+		$now = 23.5 * 3600 + (24 * 3600 * 10); // The 11th of january 1970 at 23:30 in UTC
523 523
 		$result = dol_get_first_hour($now, 'gmt');
524 524
 		print __METHOD__." now = ".$now.", dol_print_date(now, 'dayhourrfc', 'gmt') = ".dol_print_date($now, 'dayhourrfc', 'gmt').", result = ".$result.", dol_print_date(result, 'dayhourrfc', 'gmt') = ".dol_print_date($result, 'dayhourrfc', 'gmt')."\n";
525
-		$this->assertEquals('1970-01-11T00:00:00Z', dol_print_date($result, 'dayhourrfc', 'gmt'));		// monday for month 2, year 2014 is the 2
525
+		$this->assertEquals('1970-01-11T00:00:00Z', dol_print_date($result, 'dayhourrfc', 'gmt')); // monday for month 2, year 2014 is the 2
526 526
 
527 527
 		return 1;
528 528
 	}
Please login to merge, or discard this patch.