@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | $html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : ''; |
217 | 217 | |
218 | - print '<td id="' . $html_id . '" class="valuefield ' . $object->element . '_extras_' . $tmpkeyextra . ' wordbreakimp"' . (!empty($cols) ? ' colspan="' . $cols . '"' : '') . '>'; |
|
218 | + print '<td id="'.$html_id.'" class="valuefield '.$object->element.'_extras_'.$tmpkeyextra.' wordbreakimp"'.(!empty($cols) ? ' colspan="'.$cols.'"' : '').'>'; |
|
219 | 219 | |
220 | 220 | // Convert date into timestamp format |
221 | 221 | if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date'))) { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if ($object->table_element == 'societe') { |
244 | 244 | $fieldid = 'socid'; |
245 | 245 | } |
246 | - print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"] . '?' . $fieldid . '=' . $object->id . '" method="post" name="formextra">'; |
|
246 | + print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'?'.$fieldid.'='.$object->id.'" method="post" name="formextra">'; |
|
247 | 247 | print '<input type="hidden" name="action" value="update_extras">'; |
248 | 248 | print '<input type="hidden" name="attribute" value="'.$tmpkeyextra.'">'; |
249 | 249 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $sql .= " WHERE u.entity IN (".getEntity('adherent').")"; |
94 | 94 | $sql .= " AND u.statut = ".Adherent::STATUS_VALIDATED; |
95 | 95 | $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0); |
96 | - $sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year |
|
96 | + $sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year |
|
97 | 97 | $sql .= $this->db->plimit($max, 0); |
98 | 98 | |
99 | 99 | dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); |
@@ -150,7 +150,7 @@ |
||
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),...) |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * \brief Module to show box of members by tags |
26 | 26 | */ |
27 | 27 | |
28 | -include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php'; |
|
28 | +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; |
|
29 | 29 | |
30 | 30 | |
31 | 31 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | $this->max = $max; |
86 | 86 | |
87 | - include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; |
|
87 | + include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
|
88 | 88 | $staticmember = new Adherent($this->db); |
89 | 89 | |
90 | 90 | $now = dol_now(); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $stats = new AdherentStats($this->db, $user->socid, $user->id); |
100 | 100 | |
101 | 101 | // Show array |
102 | - $sumMembers= $stats->countMembersByTagAndStatus($numberyears); |
|
102 | + $sumMembers = $stats->countMembersByTagAndStatus($numberyears); |
|
103 | 103 | if ($sumMembers) { |
104 | 104 | $line = 0; |
105 | 105 | $this->info_box_contents[$line][] = array( |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $adhtag = new Categorie($this->db); |
153 | 153 | $adhtag->id = $key; |
154 | 154 | |
155 | - if ($key=='total') { |
|
155 | + if ($key == 'total') { |
|
156 | 156 | break; |
157 | 157 | } |
158 | 158 | $adhtag->label = $data['label']; |
@@ -165,32 +165,32 @@ discard block |
||
165 | 165 | ); |
166 | 166 | $this->info_box_contents[$line][] = array( |
167 | 167 | 'td' => 'class="right"', |
168 | - 'text' => (isset($data['members_draft']) && $data['members_draft'] > 0 ? $data['members_draft'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_DRAFT, 1, 0, 3), |
|
168 | + 'text' => (isset($data['members_draft']) && $data['members_draft'] > 0 ? $data['members_draft'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_DRAFT, 1, 0, 3), |
|
169 | 169 | 'asis' => 1, |
170 | 170 | ); |
171 | 171 | $this->info_box_contents[$line][] = array( |
172 | 172 | 'td' => 'class="right"', |
173 | - 'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3), |
|
173 | + 'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3), |
|
174 | 174 | 'asis' => 1, |
175 | 175 | ); |
176 | 176 | $this->info_box_contents[$line][] = array( |
177 | 177 | 'td' => 'class="right"', |
178 | - 'text' => (isset($data['members_uptodate']) && $data['members_uptodate'] > 0 ? $data['members_uptodate'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 0, $now + 86400, 3), |
|
178 | + 'text' => (isset($data['members_uptodate']) && $data['members_uptodate'] > 0 ? $data['members_uptodate'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 0, $now + 86400, 3), |
|
179 | 179 | 'asis' => 1, |
180 | 180 | ); |
181 | 181 | $this->info_box_contents[$line][] = array( |
182 | 182 | 'td' => 'class="right"', |
183 | - 'text' => (isset($data['members_expired']) && $data['members_expired'] > 0 ? $data['members_expired'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now - 86400, 3), |
|
183 | + 'text' => (isset($data['members_expired']) && $data['members_expired'] > 0 ? $data['members_expired'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now - 86400, 3), |
|
184 | 184 | 'asis' => 1, |
185 | 185 | ); |
186 | 186 | $this->info_box_contents[$line][] = array( |
187 | 187 | 'td' => 'class="right"', |
188 | - 'text' => (isset($data['members_excluded']) && $data['members_excluded'] > 0 ? $data['members_excluded'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_EXCLUDED, 1, $now, 3), |
|
188 | + 'text' => (isset($data['members_excluded']) && $data['members_excluded'] > 0 ? $data['members_excluded'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_EXCLUDED, 1, $now, 3), |
|
189 | 189 | 'asis' => 1, |
190 | 190 | ); |
191 | 191 | $this->info_box_contents[$line][] = array( |
192 | 192 | 'td' => 'class="right"', |
193 | - 'text' => (isset($data['members_resiliated']) && $data['members_resiliated'] > 0 ? $data['members_resiliated'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_RESILIATED, 1, 0, 3), |
|
193 | + 'text' => (isset($data['members_resiliated']) && $data['members_resiliated'] > 0 ? $data['members_resiliated'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_RESILIATED, 1, 0, 3), |
|
194 | 194 | 'asis' => 1, |
195 | 195 | ); |
196 | 196 | $this->info_box_contents[$line][] = array( |
@@ -24,7 +24,7 @@ discard block |
||
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 |
||
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 |
||
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 { |
@@ -24,7 +24,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -102,7 +102,7 @@ |
||
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); |
@@ -160,7 +160,7 @@ discard block |
||
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 |
||
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"); |
@@ -75,12 +75,12 @@ |
||
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); |