@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $nbContact = $obj->nb; |
72 | 72 | } |
73 | 73 | |
74 | - dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
74 | + dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } else { |
150 | 150 | dol_print_error($db); |
151 | 151 | } |
152 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
152 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
153 | 153 | } |
154 | 154 | $head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id; |
155 | 155 | $head[$h][1] = $langs->trans("Projects"); |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | } else { |
313 | 313 | dol_print_error($db); |
314 | 314 | } |
315 | - dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
315 | + dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.urlencode($object->id); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
356 | 356 | $nbLinks = Link::count($db, $object->element, $object->id); |
357 | 357 | $totalAttached = $nbFiles + $nbLinks; |
358 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
358 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
359 | 359 | } |
360 | 360 | |
361 | 361 | $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | } else { |
389 | 389 | dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR); |
390 | 390 | } |
391 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
391 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | $head[$h][1] .= '/'; |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | return false; |
765 | 765 | } |
766 | 766 | |
767 | - $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
767 | + $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
768 | 768 | |
769 | 769 | //print "dd".$object->country_code; |
770 | 770 | return in_array($object->country_code, $country_code_in_EEC); |
@@ -259,7 +259,7 @@ |
||
259 | 259 | print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); |
260 | 260 | } |
261 | 261 | // If edited user is an extern user, we show warning for external users |
262 | -if (! empty($object->socid)) { |
|
262 | +if (!empty($object->socid)) { |
|
263 | 263 | print info_admin(showModulesExludedForExternal($modules))."\n"; |
264 | 264 | } |
265 | 265 |
@@ -650,7 +650,7 @@ |
||
650 | 650 | $sql .= ' WHERE rowid = '.((int) $this->id); |
651 | 651 | |
652 | 652 | $resqlupdate = $this->db->query($sql); |
653 | - if (! $resqlupdate) { |
|
653 | + if (!$resqlupdate) { |
|
654 | 654 | $this->error = $this->db->lasterror(); |
655 | 655 | return -1; |
656 | 656 | } else { |
@@ -618,7 +618,7 @@ |
||
618 | 618 | } |
619 | 619 | } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { |
620 | 620 | if ($arrayquery['options_'.$key] > 0) { |
621 | - $sqlwhere[]= " (te.".$key." = ".((int) $arrayquery["options_".$key]).")"; |
|
621 | + $sqlwhere[] = " (te.".$key." = ".((int) $arrayquery["options_".$key]).")"; |
|
622 | 622 | } |
623 | 623 | } else { |
624 | 624 | if (is_array($arrayquery['options_'.$key])) { |
@@ -632,7 +632,7 @@ |
||
632 | 632 | } |
633 | 633 | $sql .= " WHERE ps.fk_entrepot = ".((int) $this->id); |
634 | 634 | if ($separatedPMP) { |
635 | - $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity; |
|
635 | + $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ".(int) $conf->entity; |
|
636 | 636 | } |
637 | 637 | $sql .= " AND ps.fk_product = p.rowid"; |
638 | 638 | //print $sql; |
@@ -168,7 +168,7 @@ |
||
168 | 168 | $object->fetch($rowid); |
169 | 169 | |
170 | 170 | $object->oldcopy = clone $object; |
171 | - $object->label= trim($label); |
|
171 | + $object->label = trim($label); |
|
172 | 172 | $object->morphy = trim($morphy); |
173 | 173 | $object->status = (int) $status; |
174 | 174 | $object->subscription = (int) $subscription; |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $object->phone_perso = trim(GETPOST("phone_perso", 'alpha')); |
300 | 300 | $object->phone_mobile = trim(GETPOST("phone_mobile", 'alpha')); |
301 | 301 | $object->email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); |
302 | - $object->url = trim(GETPOST('member_url', 'custom', 0, FILTER_SANITIZE_URL)); |
|
302 | + $object->url = trim(GETPOST('member_url', 'custom', 0, FILTER_SANITIZE_URL)); |
|
303 | 303 | $object->socialnetworks = array(); |
304 | 304 | foreach ($socialnetworks as $key => $value) { |
305 | 305 | if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | } |
620 | 620 | } |
621 | 621 | } |
622 | - $action = ($result < 0 || !$error) ? '' : 'create'; |
|
622 | + $action = ($result < 0 || !$error) ? '' : 'create'; |
|
623 | 623 | } |
624 | 624 | |
625 | 625 | if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') { |
@@ -125,20 +125,20 @@ discard block |
||
125 | 125 | $search_date_start_startmonth = GETPOST('search_date_start_startmonth', 'int'); |
126 | 126 | $search_date_start_startyear = GETPOST('search_date_start_startyear', 'int'); |
127 | 127 | $search_date_start_startday = GETPOST('search_date_start_startday', 'int'); |
128 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
128 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
129 | 129 | $search_date_start_endmonth = GETPOST('search_date_start_endmonth', 'int'); |
130 | 130 | $search_date_start_endyear = GETPOST('search_date_start_endyear', 'int'); |
131 | 131 | $search_date_start_endday = GETPOST('search_date_start_endday', 'int'); |
132 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
132 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
133 | 133 | |
134 | 134 | $search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int'); |
135 | 135 | $search_date_end_startyear = GETPOST('search_date_end_startyear', 'int'); |
136 | 136 | $search_date_end_startday = GETPOST('search_date_end_startday', 'int'); |
137 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
137 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
138 | 138 | $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); |
139 | 139 | $search_date_end_endyear = GETPOST('search_date_end_endyear', 'int'); |
140 | 140 | $search_date_end_endday = GETPOST('search_date_end_endday', 'int'); |
141 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
141 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
142 | 142 | |
143 | 143 | |
144 | 144 | if ($search_status == '') { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | if (!empty($conf->categorie->enabled)) { |
403 | 403 | $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_PROJECT, "p.rowid"); |
404 | 404 | } |
405 | -if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
405 | +if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
406 | 406 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; |
407 | 407 | } |
408 | 408 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | $param .= '&search_date_end_endday='.urlencode($search_date_end_endday); |
658 | 658 | } |
659 | 659 | if ($search_date_end_end) { |
660 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
660 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
661 | 661 | } |
662 | 662 | if ($socid) { |
663 | 663 | $param .= '&socid='.urlencode($socid); |
@@ -1132,7 +1132,7 @@ discard block |
||
1132 | 1132 | // Project url |
1133 | 1133 | if (!empty($arrayfields['p.ref']['checked'])) { |
1134 | 1134 | print '<td class="nowraponall">'; |
1135 | - print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int'))?'eventorganization':'')); |
|
1135 | + print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int')) ? 'eventorganization' : '')); |
|
1136 | 1136 | if ($object->hasDelay()) { |
1137 | 1137 | print img_warning($langs->trans('Late')); |
1138 | 1138 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; |
50 | 50 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
51 | 51 | require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
52 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
52 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
53 | 53 | // Hook to be used by external payment modules (ie Payzen, ...) |
54 | 54 | include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
55 | 55 | $hookmanager = new HookManager($db); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | // Has not already voted |
171 | 171 | $conforbooth = new ActionComm($db); |
172 | 172 | $resultconforbooth = $conforbooth->fetch($idvote); |
173 | - if ($resultconforbooth<=0) { |
|
173 | + if ($resultconforbooth <= 0) { |
|
174 | 174 | $error++; |
175 | 175 | $errmsg .= $conforbooth->error; |
176 | 176 | } else { |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | } |
187 | 187 | } |
188 | 188 | } |
189 | - if ($votestatus=="ok") { |
|
189 | + if ($votestatus == "ok") { |
|
190 | 190 | setEventMessage($langs->trans("VoteOk"), 'mesgs'); |
191 | - } elseif ($votestatus=="ko") { |
|
191 | + } elseif ($votestatus == "ko") { |
|
192 | 192 | setEventMessage($langs->trans("AlreadyVoted"), 'warnings'); |
193 | - } elseif ($votestatus=="err") { |
|
193 | + } elseif ($votestatus == "err") { |
|
194 | 194 | setEventMessage($langs->trans("VoteError"), 'warnings'); |
195 | 195 | } |
196 | 196 | header("Refresh:0;url=".dol_buildpath('/public/project/viewandvote.php?id='.$id.'&securekey=', 1).$securekeyreceived); |