@@ -65,7 +65,7 @@ |
||
65 | 65 | |
66 | 66 | $startdate = $enddate = ''; |
67 | 67 | if (GETPOST('startdatemonth')) { |
68 | - $startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'), GETPOST('startdateday', 'int'), GETPOST('startdateyear', 'int')); |
|
68 | + $startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'), GETPOST('startdateday', 'int'), GETPOST('startdateyear', 'int')); |
|
69 | 69 | } |
70 | 70 | if (GETPOST('enddatemonth')) { |
71 | 71 | $enddate = dol_mktime(23, 59, 59, GETPOST('enddatemonth', 'int'), GETPOST('enddateday', 'int'), GETPOST('enddateyear')); |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; |
346 | 346 | $sql .= " fk_bank=".(isset($this->fk_bank) ? ((int) $this->fk_bank) : "null").","; |
347 | 347 | $sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? ((int) $this->fk_user_creat) : "null").","; |
348 | - $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ?((int) $this->fk_user_modif) : "null"); |
|
348 | + $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? ((int) $this->fk_user_modif) : "null"); |
|
349 | 349 | $sql .= " WHERE rowid=".((int) $this->id); |
350 | 350 | |
351 | 351 | $this->db->begin(); |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | $result .= $linkend; |
656 | 656 | |
657 | 657 | global $action; |
658 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
658 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
659 | 659 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
660 | 660 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
661 | 661 | if ($reshook > 0) { |
@@ -83,10 +83,18 @@ |
||
83 | 83 | //if ($user->socid > 0) accessforbidden(); |
84 | 84 | //if ($user->socid > 0) $socid = $user->socid; |
85 | 85 | //$result = restrictedArea($user, 'partnership', $object->id); |
86 | -if (empty($conf->partnership->enabled)) accessforbidden(); |
|
87 | -if (empty($permissiontoread)) accessforbidden(); |
|
88 | -if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden(); |
|
89 | -if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden(); |
|
86 | +if (empty($conf->partnership->enabled)) { |
|
87 | + accessforbidden(); |
|
88 | +} |
|
89 | +if (empty($permissiontoread)) { |
|
90 | + accessforbidden(); |
|
91 | +} |
|
92 | +if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') { |
|
93 | + accessforbidden(); |
|
94 | +} |
|
95 | +if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') { |
|
96 | + accessforbidden(); |
|
97 | +} |
|
90 | 98 | |
91 | 99 | |
92 | 100 |
@@ -83,10 +83,18 @@ |
||
83 | 83 | //if ($user->socid > 0) accessforbidden(); |
84 | 84 | //if ($user->socid > 0) $socid = $user->socid; |
85 | 85 | //$result = restrictedArea($user, 'partnership', $object->id); |
86 | -if (empty($conf->partnership->enabled)) accessforbidden(); |
|
87 | -if (empty($permissiontoread)) accessforbidden(); |
|
88 | -if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden(); |
|
89 | -if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden(); |
|
86 | +if (empty($conf->partnership->enabled)) { |
|
87 | + accessforbidden(); |
|
88 | +} |
|
89 | +if (empty($permissiontoread)) { |
|
90 | + accessforbidden(); |
|
91 | +} |
|
92 | +if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') { |
|
93 | + accessforbidden(); |
|
94 | +} |
|
95 | +if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') { |
|
96 | + accessforbidden(); |
|
97 | +} |
|
90 | 98 | |
91 | 99 | |
92 | 100 |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | return $pass; |
195 | 195 | } |
196 | 196 | |
197 | - return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
197 | + return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | global $langs; |
210 | 210 | |
211 | - $this->initAll(); // For the case this method is called alone |
|
211 | + $this->initAll(); // For the case this method is called alone |
|
212 | 212 | |
213 | 213 | $password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY); |
214 | 214 | $maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | } |
582 | 582 | |
583 | 583 | |
584 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
584 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
585 | 585 | /** |
586 | 586 | * Mise a jour du lien entre le paiement de salaire et la ligne dans llx_bank generee |
587 | 587 | * |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | */ |
591 | 591 | public function update_fk_bank($id_bank) |
592 | 592 | { |
593 | - // phpcs:enable |
|
593 | + // phpcs:enable |
|
594 | 594 | $sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); |
595 | 595 | |
596 | 596 | dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | return $this->LibStatut($this->statut, $mode); |
670 | 670 | } |
671 | 671 | |
672 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
672 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
673 | 673 | /** |
674 | 674 | * Return the status |
675 | 675 | * |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | */ |
680 | 680 | public function LibStatut($status, $mode = 0) |
681 | 681 | { |
682 | - // phpcs:enable |
|
682 | + // phpcs:enable |
|
683 | 683 | global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage |
684 | 684 | |
685 | 685 | $langs->load('compta'); |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | } |
564 | 564 | if ($result <= 0) { |
565 | 565 | $this->error = $this->db->lasterror(); |
566 | - dol_syslog(get_class($this) . '::addPaymentToBank ' . $this->error); |
|
566 | + dol_syslog(get_class($this).'::addPaymentToBank '.$this->error); |
|
567 | 567 | $error++; |
568 | 568 | } |
569 | 569 | } |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | $label = $langs->trans("SalaryPayment"); |
779 | 779 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
780 | 780 | } |
781 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
781 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
782 | 782 | $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; |
783 | 783 | } else { |
784 | 784 | $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
@@ -139,15 +139,34 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // Clean parameters |
142 | - if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary; |
|
143 | - if (isset($this->amount)) $this->amount = trim($this->amount); |
|
144 | - if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; |
|
145 | - if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated |
|
146 | - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); |
|
147 | - if (isset($this->note)) $this->note = trim($this->note); |
|
148 | - if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; |
|
149 | - if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author; |
|
150 | - if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; |
|
142 | + if (isset($this->fk_salary)) { |
|
143 | + $this->fk_salary = (int) $this->fk_salary; |
|
144 | + } |
|
145 | + if (isset($this->amount)) { |
|
146 | + $this->amount = trim($this->amount); |
|
147 | + } |
|
148 | + if (isset($this->fk_typepayment)) { |
|
149 | + $this->fk_typepayment = (int) $this->fk_typepayment; |
|
150 | + } |
|
151 | + if (isset($this->num_paiement)) { |
|
152 | + $this->num_paiement = trim($this->num_paiement); |
|
153 | + } |
|
154 | + // deprecated |
|
155 | + if (isset($this->num_payment)) { |
|
156 | + $this->num_payment = trim($this->num_payment); |
|
157 | + } |
|
158 | + if (isset($this->note)) { |
|
159 | + $this->note = trim($this->note); |
|
160 | + } |
|
161 | + if (isset($this->fk_bank)) { |
|
162 | + $this->fk_bank = (int) $this->fk_bank; |
|
163 | + } |
|
164 | + if (isset($this->fk_user_author)) { |
|
165 | + $this->fk_user_author = (int) $this->fk_user_author; |
|
166 | + } |
|
167 | + if (isset($this->fk_user_modif)) { |
|
168 | + $this->fk_user_modif = (int) $this->fk_user_modif; |
|
169 | + } |
|
151 | 170 | |
152 | 171 | $totalamount = 0; |
153 | 172 | foreach ($this->amounts as $key => $value) { // How payment is dispatch |
@@ -158,7 +177,10 @@ discard block |
||
158 | 177 | $totalamount = price2num($totalamount); |
159 | 178 | |
160 | 179 | // Check parameters |
161 | - if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null |
|
180 | + if ($totalamount == 0) { |
|
181 | + return -1; |
|
182 | + } |
|
183 | + // On accepte les montants negatifs pour les rejets de prelevement mais pas null |
|
162 | 184 | |
163 | 185 | |
164 | 186 | $this->db->begin(); |
@@ -207,7 +229,9 @@ discard block |
||
207 | 229 | } |
208 | 230 | |
209 | 231 | $result = $this->call_trigger('PAYMENTSALARY_CREATE', $user); |
210 | - if ($result < 0) $error++; |
|
232 | + if ($result < 0) { |
|
233 | + $error++; |
|
234 | + } |
|
211 | 235 | |
212 | 236 | if ($totalamount != 0 && !$error) { |
213 | 237 | $this->amount = $totalamount; |
@@ -303,15 +327,34 @@ discard block |
||
303 | 327 | |
304 | 328 | // Clean parameters |
305 | 329 | |
306 | - if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary; |
|
307 | - if (isset($this->amount)) $this->amount = trim($this->amount); |
|
308 | - if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; |
|
309 | - if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated |
|
310 | - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); |
|
311 | - if (isset($this->note)) $this->note = trim($this->note); |
|
312 | - if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; |
|
313 | - if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author; |
|
314 | - if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; |
|
330 | + if (isset($this->fk_salary)) { |
|
331 | + $this->fk_salary = (int) $this->fk_salary; |
|
332 | + } |
|
333 | + if (isset($this->amount)) { |
|
334 | + $this->amount = trim($this->amount); |
|
335 | + } |
|
336 | + if (isset($this->fk_typepayment)) { |
|
337 | + $this->fk_typepayment = (int) $this->fk_typepayment; |
|
338 | + } |
|
339 | + if (isset($this->num_paiement)) { |
|
340 | + $this->num_paiement = trim($this->num_paiement); |
|
341 | + } |
|
342 | + // deprecated |
|
343 | + if (isset($this->num_payment)) { |
|
344 | + $this->num_payment = trim($this->num_payment); |
|
345 | + } |
|
346 | + if (isset($this->note)) { |
|
347 | + $this->note = trim($this->note); |
|
348 | + } |
|
349 | + if (isset($this->fk_bank)) { |
|
350 | + $this->fk_bank = (int) $this->fk_bank; |
|
351 | + } |
|
352 | + if (isset($this->fk_user_author)) { |
|
353 | + $this->fk_user_author = (int) $this->fk_user_author; |
|
354 | + } |
|
355 | + if (isset($this->fk_user_modif)) { |
|
356 | + $this->fk_user_modif = (int) $this->fk_user_modif; |
|
357 | + } |
|
315 | 358 | |
316 | 359 | // Check parameters |
317 | 360 | // Put here code to add control on parameters values |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | if (is_array($cpt)) { |
628 | 628 | $listofaccount = ''; |
629 | 629 | foreach ($cpt as $cptcursor) { |
630 | - if (! is_null($cptcursor)) { |
|
630 | + if (!is_null($cptcursor)) { |
|
631 | 631 | if ($listofaccount) { |
632 | 632 | $listofaccount .= ","; |
633 | 633 | } |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | |
777 | 777 | $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens"; |
778 | 778 | $sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c"; |
779 | - $sql .= " WHERE c.active = " . (int) $active; |
|
779 | + $sql .= " WHERE c.active = ".(int) $active; |
|
780 | 780 | $sql .= " AND c.entity = ".$conf->entity; |
781 | 781 | if ($categorytype >= 0) { |
782 | 782 | $sql .= " AND c.category_type = 1"; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public $fk_website; |
58 | 58 | |
59 | - public $fk_page; // If translation of another page |
|
59 | + public $fk_page; // If translation of another page |
|
60 | 60 | |
61 | 61 | public $pageurl; |
62 | 62 | public $aliasalt; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public $fk_object; |
120 | 120 | |
121 | - const STATUS_DRAFT = 0; // offline |
|
122 | - const STATUS_VALIDATED = 1; // online |
|
121 | + const STATUS_DRAFT = 0; // offline |
|
122 | + const STATUS_VALIDATED = 1; // online |
|
123 | 123 | |
124 | 124 | |
125 | 125 | /** |
@@ -2008,7 +2008,9 @@ discard block |
||
2008 | 2008 | $modeinput = 'hours'; |
2009 | 2009 | for ($idw = 0; $idw < 7; $idw++) { |
2010 | 2010 | $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); |
2011 | - if (!isset($totalforeachday[$tmpday])) $totalforeachday[$tmpday] = 0; |
|
2011 | + if (!isset($totalforeachday[$tmpday])) { |
|
2012 | + $totalforeachday[$tmpday] = 0; |
|
2013 | + } |
|
2012 | 2014 | $cssonholiday = ''; |
2013 | 2015 | if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) { |
2014 | 2016 | $cssonholiday .= 'onholidayallday '; |
@@ -2307,7 +2309,9 @@ discard block |
||
2307 | 2309 | $month = $firstdaytoshowarray['mon']; |
2308 | 2310 | foreach ($TWeek as $weekIndex => $weekNb) { |
2309 | 2311 | $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ; |
2310 | - if (!isset($totalforeachweek[$weekNb])) $totalforeachweek[$weekNb] = 0; |
|
2312 | + if (!isset($totalforeachweek[$weekNb])) { |
|
2313 | + $totalforeachweek[$weekNb] = 0; |
|
2314 | + } |
|
2311 | 2315 | $totalforeachweek[$weekNb] += $weekWorkLoad; |
2312 | 2316 | |
2313 | 2317 | $alreadyspent = ''; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $nbContacts = $dataretrieved; |
58 | 58 | } else { |
59 | 59 | $nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); |
60 | - dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
60 | + dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
61 | 61 | } |
62 | 62 | $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : ''); |
63 | 63 | $head[$h][1] = $langs->trans("ProjectContact"); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
82 | 82 | $taskstatic = new Task($db); |
83 | 83 | $nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0)); |
84 | - dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
84 | + dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
85 | 85 | } |
86 | 86 | $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : ''); |
87 | 87 | $head[$h][1] = $langs->trans("Tasks"); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $obj = $db->fetch_object($resql); |
111 | 111 | if ($obj) { |
112 | 112 | $nbTimeSpent = 1; |
113 | - dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
113 | + dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
114 | 114 | } |
115 | 115 | } else { |
116 | 116 | dol_print_error($db); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | if (isModEnabled("banque")) { |
201 | 201 | $nbElements += $project->getElementCount('variouspayment', 'payment_various'); |
202 | 202 | } |
203 | - dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
203 | + dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
204 | 204 | } |
205 | 205 | $head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$project->id; |
206 | 206 | $head[$h][1] = $langs->trans("ProjectOverview"); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | if (isModEnabled('eventorganization') && !empty($project->usage_organize_event)) { |
228 | 228 | $langs->load('eventorganization'); |
229 | - $head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id; |
|
229 | + $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?projectid='.$project->id; |
|
230 | 230 | $head[$h][1] = $langs->trans("EventOrganization"); |
231 | 231 | |
232 | 232 | // Enable caching of conf or booth count |
@@ -238,15 +238,15 @@ discard block |
||
238 | 238 | $nbConfOrBooth = $dataretrieved; |
239 | 239 | } else { |
240 | 240 | require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; |
241 | - $conforbooth=new ConferenceOrBooth($db); |
|
241 | + $conforbooth = new ConferenceOrBooth($db); |
|
242 | 242 | $result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$project->id)); |
243 | 243 | //, |
244 | - if (!is_array($result) && $result<0) { |
|
244 | + if (!is_array($result) && $result < 0) { |
|
245 | 245 | setEventMessages($conforbooth->error, $conforbooth->errors, 'errors'); |
246 | 246 | } else { |
247 | 247 | $nbConfOrBooth = count($result); |
248 | 248 | } |
249 | - dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
249 | + dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
250 | 250 | } |
251 | 251 | $cachekey = 'count_attendees_'.$project->id; |
252 | 252 | $dataretrieved = dol_getcache($cachekey); |
@@ -254,15 +254,15 @@ discard block |
||
254 | 254 | $nbAttendees = $dataretrieved; |
255 | 255 | } else { |
256 | 256 | require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; |
257 | - $conforboothattendee=new ConferenceOrBoothAttendee($db); |
|
257 | + $conforboothattendee = new ConferenceOrBoothAttendee($db); |
|
258 | 258 | $result = $conforboothattendee->fetchAll('', '', 0, 0, array('t.fk_project'=>$project->id)); |
259 | 259 | //, |
260 | - if (!is_array($result) && $result<0) { |
|
260 | + if (!is_array($result) && $result < 0) { |
|
261 | 261 | setEventMessages($conforboothattendee->error, $conforboothattendee->errors, 'errors'); |
262 | 262 | } else { |
263 | 263 | $nbAttendees = count($result); |
264 | 264 | } |
265 | - dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
265 | + dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
266 | 266 | } |
267 | 267 | if ($nbConfOrBooth > 0 || $nbAttendees > 0) { |
268 | 268 | $head[$h][1] .= '<span class="badge marginleftonlyshort">'; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
317 | 317 | $nbLinks = Link::count($db, $project->element, $project->id); |
318 | 318 | $totalAttached = $nbFiles + $nbLinks; |
319 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
319 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
320 | 320 | } |
321 | 321 | $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$project->id; |
322 | 322 | $head[$h][1] = $langs->trans('Documents'); |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $nbComments = $dataretrieved; |
338 | 338 | } else { |
339 | 339 | $nbComments = $project->getNbComments(); |
340 | - dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
340 | + dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
341 | 341 | } |
342 | 342 | $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$project->id; |
343 | 343 | $head[$h][1] = $langs->trans("CommentLink"); |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | if (in_array($lines[$i]->id, $arrayofselected)) { |
699 | 699 | $selected = 1; |
700 | 700 | } |
701 | - print '<input id="cb' . $lines[$i]->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $lines[$i]->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
701 | + print '<input id="cb'.$lines[$i]->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$lines[$i]->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
702 | 702 | print '</td>'; |
703 | 703 | } |
704 | 704 | |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | if (in_array($lines[$i]->id, $arrayofselected)) { |
950 | 950 | $selected = 1; |
951 | 951 | } |
952 | - print '<input id="cb' . $lines[$i]->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $lines[$i]->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
952 | + print '<input id="cb'.$lines[$i]->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$lines[$i]->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
953 | 953 | |
954 | 954 | print '</td>'; |
955 | 955 | } |
@@ -2089,7 +2089,7 @@ discard block |
||
2089 | 2089 | |
2090 | 2090 | $disabledtaskday = $disabledtask; |
2091 | 2091 | |
2092 | - if (! $disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
2092 | + if (!$disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
2093 | 2093 | $disabledtaskday = 1; |
2094 | 2094 | } |
2095 | 2095 | |
@@ -2359,7 +2359,7 @@ discard block |
||
2359 | 2359 | $year = $firstdaytoshowarray['year']; |
2360 | 2360 | $month = $firstdaytoshowarray['mon']; |
2361 | 2361 | foreach ($TWeek as $weekIndex => $weekNb) { |
2362 | - $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ; |
|
2362 | + $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0; |
|
2363 | 2363 | if (!isset($totalforeachweek[$weekNb])) $totalforeachweek[$weekNb] = 0; |
2364 | 2364 | $totalforeachweek[$weekNb] += $weekWorkLoad; |
2365 | 2365 | |
@@ -2372,7 +2372,7 @@ discard block |
||
2372 | 2372 | $disabledtaskweek = $disabledtask; |
2373 | 2373 | $firstdayofweek = dol_mktime(0, 0, 0, $month, $TFirstDay[$weekIndex], $year); |
2374 | 2374 | |
2375 | - if (! $disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
2375 | + if (!$disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
2376 | 2376 | $disabledtaskweek = 1; |
2377 | 2377 | } |
2378 | 2378 |