Completed
Branch develop (6b48e0)
by
unknown
14:33
created
htdocs/core/boxes/box_graph_product_distribution.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
 		$userid = 0; // No filter on user creation
151 151
 
152 152
 		$WIDTH = ($nbofgraph >= 2 || !empty($conf->dol_optimize_smallscreen)) ? '300' : '320';
153
-		$HEIGHT = '150';	// Height require to have 5+1 entries into legend visible.
153
+		$HEIGHT = '150'; // Height require to have 5+1 entries into legend visible.
154 154
 
155 155
 		if (isModEnabled("propal") && $user->hasRight('propal', 'lire')) {
156 156
 			// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
Please login to merge, or discard this patch.
htdocs/core/boxes/box_scheduled_jobs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *      \brief      Widget of scheduled jobs
25 25
  */
26 26
 
27
-include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php';
27
+include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
28 28
 
29 29
 
30 30
 /**
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 		$this->info_box_head = array('text' => $langs->trans("BoxScheduledJobs", $max));
81 81
 
82 82
 		if ($user->hasRight('cron', 'read')) {
83
-			include_once DOL_DOCUMENT_ROOT . '/cron/class/cronjob.class.php';
83
+			include_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
84 84
 			$cronstatic = new Cronjob($this->db);
85 85
 			$resultarray = array();
86 86
 
87 87
 			$result = 0;
88 88
 			$sql = "SELECT t.rowid, t.datelastrun, t.datenextrun, t.datestart,";
89 89
 			$sql .= " t.label, t.status, t.test, t.lastresult, t.processing";
90
-			$sql .= " FROM " . MAIN_DB_PREFIX . "cronjob as t";
90
+			$sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t";
91 91
 			$sql .= " WHERE status <> ".$cronstatic::STATUS_DISABLED;
92 92
 			$sql .= " AND entity IN (0, ".$conf->entity.")";
93 93
 			$sql .= $this->db->order("t.datelastrun", "DESC");
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 				$this->info_box_contents[0][0] = array(
193 193
 					'td' => '',
194 194
 					'maxlength' => 500,
195
-					'text' => ($this->db->lasterror() . ' sql=' . $sql)
195
+					'text' => ($this->db->lasterror().' sql='.$sql)
196 196
 				);
197 197
 			}
198 198
 		} else {
Please login to merge, or discard this patch.
htdocs/core/boxes/box_dolibarr_state_board.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *	\brief      Module Dolibarr state base
25 25
  */
26 26
 
27
-include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php';
27
+include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
28 28
 
29 29
 
30 30
 /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			$hookmanager->initHooks(array('index'));
81 81
 			$object = new stdClass();
82 82
 			$action = '';
83
-			$parameters =array();
83
+			$parameters = array();
84 84
 			$hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action);
85 85
 			$boxstatItems = array();
86 86
 			$boxstatFromHook = '';
@@ -164,52 +164,52 @@  discard block
 block discarded – undo
164 164
 				'dolresource' => 'Dolresource'
165 165
 			);
166 166
 			$includes = array(
167
-				'users' => DOL_DOCUMENT_ROOT . "/user/class/user.class.php",
168
-				'members' => DOL_DOCUMENT_ROOT . "/adherents/class/adherent.class.php",
169
-				'customers' => DOL_DOCUMENT_ROOT . "/societe/class/client.class.php",
170
-				'prospects' => DOL_DOCUMENT_ROOT . "/societe/class/client.class.php",
171
-				'suppliers' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.class.php",
172
-				'contacts' => DOL_DOCUMENT_ROOT . "/contact/class/contact.class.php",
173
-				'products' => DOL_DOCUMENT_ROOT . "/product/class/product.class.php",
174
-				'services' => DOL_DOCUMENT_ROOT . "/product/class/product.class.php",
175
-				'proposals' => DOL_DOCUMENT_ROOT . "/comm/propal/class/propal.class.php",
176
-				'orders' => DOL_DOCUMENT_ROOT . "/commande/class/commande.class.php",
177
-				'invoices' => DOL_DOCUMENT_ROOT . "/compta/facture/class/facture.class.php",
178
-				'donations' => DOL_DOCUMENT_ROOT . "/don/class/don.class.php",
179
-				'contracts' => DOL_DOCUMENT_ROOT . "/contrat/class/contrat.class.php",
180
-				'interventions' => DOL_DOCUMENT_ROOT . "/fichinter/class/fichinter.class.php",
181
-				'supplier_orders' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.commande.class.php",
182
-				'supplier_invoices' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.facture.class.php",
183
-				'supplier_proposals' => DOL_DOCUMENT_ROOT . "/supplier_proposal/class/supplier_proposal.class.php",
184
-				'projects' => DOL_DOCUMENT_ROOT . "/projet/class/project.class.php",
185
-				'expensereports' => DOL_DOCUMENT_ROOT . "/expensereport/class/expensereport.class.php",
186
-				'holidays' => DOL_DOCUMENT_ROOT . "/holiday/class/holiday.class.php",
187
-				'ticket' => DOL_DOCUMENT_ROOT . "/ticket/class/ticket.class.php",
188
-				'dolresource' => DOL_DOCUMENT_ROOT . "/resource/class/dolresource.class.php"
167
+				'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php",
168
+				'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
169
+				'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
170
+				'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
171
+				'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
172
+				'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php",
173
+				'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php",
174
+				'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php",
175
+				'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
176
+				'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
177
+				'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
178
+				'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php",
179
+				'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php",
180
+				'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php",
181
+				'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
182
+				'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
183
+				'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php",
184
+				'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php",
185
+				'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php",
186
+				'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php",
187
+				'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php",
188
+				'dolresource' => DOL_DOCUMENT_ROOT."/resource/class/dolresource.class.php"
189 189
 			);
190 190
 			$links = array(
191
-				'users' => DOL_URL_ROOT . '/user/list.php',
192
-				'members' => DOL_URL_ROOT . '/adherents/list.php?statut=1&mainmenu=members',
193
-				'customers' => DOL_URL_ROOT . '/societe/list.php?type=c&mainmenu=companies',
194
-				'prospects' => DOL_URL_ROOT . '/societe/list.php?type=p&mainmenu=companies',
195
-				'suppliers' => DOL_URL_ROOT . '/societe/list.php?type=f&mainmenu=companies',
196
-				'contacts' => DOL_URL_ROOT . '/contact/list.php?mainmenu=companies',
197
-				'products' => DOL_URL_ROOT . '/product/list.php?type=0&mainmenu=products',
198
-				'services' => DOL_URL_ROOT . '/product/list.php?type=1&mainmenu=products',
199
-				'proposals' => DOL_URL_ROOT . '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
200
-				'orders' => DOL_URL_ROOT . '/commande/list.php?mainmenu=commercial&leftmenu=orders',
201
-				'invoices' => DOL_URL_ROOT . '/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
202
-				'donations' => DOL_URL_ROOT . '/don/list.php?leftmenu=donations',
203
-				'contracts' => DOL_URL_ROOT . '/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
204
-				'interventions' => DOL_URL_ROOT . '/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
205
-				'supplier_orders' => DOL_URL_ROOT . '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
206
-				'supplier_invoices' => DOL_URL_ROOT . '/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
207
-				'supplier_proposals' => DOL_URL_ROOT . '/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
208
-				'projects' => DOL_URL_ROOT . '/projet/list.php?mainmenu=project',
209
-				'expensereports' => DOL_URL_ROOT . '/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
210
-				'holidays' => DOL_URL_ROOT . '/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
211
-				'ticket' => DOL_URL_ROOT . '/ticket/list.php?leftmenu=ticket',
212
-				'dolresource' => DOL_URL_ROOT . '/resource/list.php?mainmenu=agenda',
191
+				'users' => DOL_URL_ROOT.'/user/list.php',
192
+				'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
193
+				'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
194
+				'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
195
+				'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
196
+				'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
197
+				'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
198
+				'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
199
+				'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
200
+				'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
201
+				'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
202
+				'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations',
203
+				'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
204
+				'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
205
+				'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
206
+				'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
207
+				'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
208
+				'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
209
+				'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
210
+				'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
211
+				'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket',
212
+				'dolresource' => DOL_URL_ROOT.'/resource/list.php?mainmenu=agenda',
213 213
 			);
214 214
 			$titres = array(
215 215
 				'users' => "Users",
@@ -272,10 +272,10 @@  discard block
 block discarded – undo
272 272
 					$langs->load(empty($langfile[$val]) ? $val : $langfile[$val]);
273 273
 
274 274
 					$text = $langs->trans($titres[$val]);
275
-					$boxstatItem .= '<a href="' . $links[$val] . '" class="boxstatsindicator thumbstat nobold nounderline">';
275
+					$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
276 276
 					$boxstatItem .= '<div class="boxstats">';
277
-					$boxstatItem .= '<span class="boxstatstext" title="' . dol_escape_htmltag($text) . '">' . $text . '</span><br>';
278
-					$boxstatItem .= '<span class="boxstatsindicator">' . img_object("", $board->picto, 'class="inline-block"') . ' ' . (!empty($board->nb[$val]) ? $board->nb[$val] : 0) . '</span>';
277
+					$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
278
+					$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.(!empty($board->nb[$val]) ? $board->nb[$val] : 0).'</span>';
279 279
 					$boxstatItem .= '</div>';
280 280
 					$boxstatItem .= '</a>';
281 281
 
Please login to merge, or discard this patch.
htdocs/core/boxes/box_birthdays.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
 			$sql .= " AND u.statut = ".User::STATUS_ENABLED;
103 103
 			$sql .= dolSqlDateFilter('u.dateemployment', 0, $tmparray['mon'], 0);
104 104
 			$sql .= " AND u.dateemployment < '".$this->db->idate(dol_get_first_day($tmparray['year']))."'";
105
-			$sql .= " ORDER BY daya ASC";	// We want to have date of the month sorted by the day without taking into consideration the year
105
+			$sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year
106 106
 			$sql .= $this->db->plimit($max, 0);
107 107
 
108 108
 			dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
Please login to merge, or discard this patch.
htdocs/core/login/functions_dolibarr.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 					}
161 161
 				} else {
162 162
 					dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE);
163
-					sleep(1);	// Anti brut force protection. Must be same delay when password is not valid
163
+					sleep(1); // Anti brut force protection. Must be same delay when password is not valid
164 164
 
165 165
 					// Load translation files required by the page
166 166
 					$langs->loadLangs(array('main', 'errors'));
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			}
175 175
 		} else {
176 176
 			dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO Too many attempts", LOG_NOTICE);
177
-			sleep(1);	// Anti brut force protection. Must be same delay when password is not valid
177
+			sleep(1); // Anti brut force protection. Must be same delay when password is not valid
178 178
 			// Load translation files required by the page
179 179
 			$langs->loadLangs(array('main', 'errors'));
180 180
 			$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorTooManyAttempts");
Please login to merge, or discard this patch.
htdocs/core/login/functions_googleoauth.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,12 +75,12 @@
 block discarded – undo
75 75
 			//global $dolibarr_main_url_root;
76 76
 			//$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
77 77
 			//$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
78
-			$urlwithroot=DOL_MAIN_URL_ROOT;					// This is to use same domain name than current
78
+			$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current
79 79
 
80 80
 			//$shortscope = 'userinfo_email,userinfo_profile';
81
-			$shortscope = 'openid,email,profile';	// For openid connect
81
+			$shortscope = 'openid,email,profile'; // For openid connect
82 82
 
83
-			$oauthstateanticsrf = bin2hex(random_bytes(128/8));
83
+			$oauthstateanticsrf = bin2hex(random_bytes(128 / 8));
84 84
 			$_SESSION['oauthstateanticsrf'] = $shortscope.'-'.$oauthstateanticsrf;
85 85
 
86 86
 			$url = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode('forlogin-'.$shortscope.'-'.$oauthstateanticsrf).'&username='.urlencode($usertotest);
Please login to merge, or discard this patch.
htdocs/asset/document.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 	// Object card
119 119
 	// ------------------------------------------------------------
120
-	$linkback = '<a href="' . dol_buildpath('/asset/asset_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
120
+	$linkback = '<a href="'.dol_buildpath('/asset/asset_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
121 121
 
122 122
 	$morehtmlref = '<div class="refidno">';
123 123
 	$morehtmlref .= '</div>';
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
 	print '<table class="border centpercent tableforfield">';
131 131
 
132 132
 	// Number of files
133
-	print '<tr><td class="titlefield">' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
133
+	print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
134 134
 
135 135
 	// Total size
136
-	print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
136
+	print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
137 137
 
138 138
 	print '</table>';
139 139
 
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
 	//  $permissiontoadd = 1;
147 147
 	$permtoedit = $user->hasRight('asset', 'write');
148 148
 	//  $permtoedit = 1;
149
-	$param = '&id=' . $object->id;
149
+	$param = '&id='.$object->id;
150 150
 
151 151
 	//$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->id).'/';
152
-	$relativepathwithnofile = dol_sanitizeFileName($object->ref) . '/';
152
+	$relativepathwithnofile = dol_sanitizeFileName($object->ref).'/';
153 153
 
154
-	include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
154
+	include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
155 155
 } else {
156 156
 	accessforbidden('', 0, 1);
157 157
 }
Please login to merge, or discard this patch.
htdocs/resource/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 $object = new Dolresource($db);
45 45
 
46 46
 // Load object
47
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once
47
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
48 48
 
49 49
 // Security check
50 50
 if ($user->socid) {
Please login to merge, or discard this patch.
htdocs/resource/element_resource.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -537,8 +537,8 @@
 block discarded – undo
537 537
 			// Ref customer
538 538
 			//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, $user->rights->ficheinter->creer, 'string', '', 0, 1);
539 539
 			//$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1);
540
-			$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', 0, 1);
541
-			$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', null, null, '', 1);
540
+			$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', 0, 1);
541
+			$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', null, null, '', 1);
542 542
 			// Thirdparty
543 543
 			$morehtmlref .= '<br>'.$fichinter->thirdparty->getNomUrl(1, 'customer');
544 544
 			// Project
Please login to merge, or discard this patch.