@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | $langs->loadLangs(array("mrp", "other")); |
39 | 39 | |
40 | 40 | // Get parameters |
41 | -$id = GETPOST('id', 'int'); |
|
41 | +$id = GETPOST('id', 'int'); |
|
42 | 42 | $ref = GETPOST('ref', 'alpha'); |
43 | -$action = GETPOST('action', 'aZ09'); |
|
43 | +$action = GETPOST('action', 'aZ09'); |
|
44 | 44 | $cancel = GETPOST('cancel', 'aZ09'); |
45 | 45 | $backtopage = GETPOST('backtopage', 'alpha'); |
46 | 46 | |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | } |
55 | 55 | $search_agenda_label = GETPOST('search_agenda_label'); |
56 | 56 | |
57 | -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; |
|
57 | +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; |
|
58 | 58 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
59 | 59 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
60 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
60 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
61 | 61 | if (empty($page) || $page == -1) { |
62 | 62 | $page = 0; |
63 | 63 | } // If $page is not defined, or '' or -1 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Get parameters |
55 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
55 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
56 | 56 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
57 | 57 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
58 | 58 | $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
@@ -684,7 +684,9 @@ |
||
684 | 684 | print $bankstatic->getNomUrl(1); |
685 | 685 | } |
686 | 686 | print '</td>'; |
687 | - if (!$i) $totalarray['nbfield']++; |
|
687 | + if (!$i) { |
|
688 | + $totalarray['nbfield']++; |
|
689 | + } |
|
688 | 690 | } |
689 | 691 | |
690 | 692 | // Amount |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
59 | 59 | $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
60 | 60 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
61 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
61 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
62 | 62 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
63 | 63 | $search_date_limit_startday = GETPOST('search_date_limit_startday', 'int'); |
64 | 64 | $search_date_limit_startmonth = GETPOST('search_date_limit_startmonth', 'int'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | // Put here all includes required by your class file |
29 | 29 | require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; |
30 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skillrank.lib.php'; |
|
30 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skillrank.lib.php'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Class for SkillRank |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
106 | 106 | */ |
107 | - public $fields=array( |
|
107 | + public $fields = array( |
|
108 | 108 | 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), |
109 | 109 | 'fk_skill' => array('type'=>'integer:Skill:hrm/class/skill.class.php:1', 'label'=>'Skill', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,), |
110 | 110 | 'rankorder' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1, 'default' => 0), |
@@ -371,13 +371,13 @@ discard block |
||
371 | 371 | global $user; |
372 | 372 | |
373 | 373 | $this->fk_skill = $currentSkill->fk_skill; |
374 | - $this->rankorder = $currentSkill->rankorder; |
|
374 | + $this->rankorder = $currentSkill->rankorder; |
|
375 | 375 | $this->fk_object = $fk_user; |
376 | 376 | $this->date_creation = dol_now(); |
377 | 377 | $this->fk_user_creat = $user->id; |
378 | 378 | $this->fk_user_modif = $user->id; |
379 | - $this->objecttype = self::SKILLRANK_TYPE_USER; |
|
380 | - $result = $this->create($user); |
|
379 | + $this->objecttype = self::SKILLRANK_TYPE_USER; |
|
380 | + $result = $this->create($user); |
|
381 | 381 | |
382 | 382 | return $result; |
383 | 383 | } |
@@ -240,7 +240,9 @@ |
||
240 | 240 | if (empty($nocommentremoval)) { |
241 | 241 | $buf = preg_replace('/([,;ERLT\)])\s*--.*$/i', '\1', $buf); //remove comment from a line that not start with -- before add it to the buffer |
242 | 242 | } |
243 | - if ($buffer) $buffer .= ' '; |
|
243 | + if ($buffer) { |
|
244 | + $buffer .= ' '; |
|
245 | + } |
|
244 | 246 | $buffer .= trim($buf); |
245 | 247 | } |
246 | 248 |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | if ($sql) { |
327 | 327 | // Test if th SQL is allowed SQL |
328 | 328 | if ($onlysqltoimportwebsite) { |
329 | - $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' seque,ce |
|
329 | + $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' seque,ce |
|
330 | 330 | |
331 | 331 | // Remove all strings contents including the ' so we can analyse SQL instruction only later |
332 | 332 | $l = strlen($newsql); |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | |
1204 | 1204 | if (!count($ret['errors'])) { |
1205 | 1205 | $ret['nbmodules']++; |
1206 | - $ret['nbperms'] += (is_array($objMod->rights)?count($objMod->rights):0); |
|
1206 | + $ret['nbperms'] += (is_array($objMod->rights) ?count($objMod->rights) : 0); |
|
1207 | 1207 | } |
1208 | 1208 | |
1209 | 1209 | return $ret; |
@@ -1840,7 +1840,7 @@ discard block |
||
1840 | 1840 | global $conf, $langs; |
1841 | 1841 | |
1842 | 1842 | $text = $langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); |
1843 | - $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // List of modules qualified for external user management |
|
1843 | + $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // List of modules qualified for external user management |
|
1844 | 1844 | |
1845 | 1845 | $i = 0; |
1846 | 1846 | if (!empty($modules)) { |
@@ -1121,7 +1121,7 @@ |
||
1121 | 1121 | $result = 'found'; // If error, we force like if we found to avoid any deletion |
1122 | 1122 | } |
1123 | 1123 | } else { |
1124 | - $result = 'found'; // |
|
1124 | + $result = 'found'; // |
|
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | if (!$result) { |
@@ -373,7 +373,7 @@ |
||
373 | 373 | $caction = new CActionComm($this->db); |
374 | 374 | |
375 | 375 | // Suggest a list with manual events or all auto events |
376 | - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
376 | + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
377 | 377 | if (empty($multiselect)) { |
378 | 378 | // Add empty line at start only if no multiselect |
379 | 379 | array_unshift($arraylist, ' '); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | //Calcul total qty and amount for global if full scan list |
130 | 130 | $total_qty_toconsume = 0; |
131 | 131 | $total_qty_toproduce = 0; |
132 | - $product_cache=array(); |
|
132 | + $product_cache = array(); |
|
133 | 133 | $bom_data_result = array(); |
134 | 134 | |
135 | 135 | //Qauntity to produce |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | } |
180 | 180 | $bomtmp->fk_product = $objp->fk_product; |
181 | 181 | $bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production'); |
182 | - $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): ''); |
|
182 | + $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : ''); |
|
183 | 183 | $bom_data_result[$objp->rowid]['qty_toproduce'] += ($objp->qty_toproduce > 0 ? $objp->qty_toproduce : 0); |
184 | 184 | $bom_data_result[$objp->rowid]['qty_toconsume'] = 0; |
185 | 185 | $bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour'); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | if (!array_key_exists($objp->rowid, $bom_data_result)) { |
244 | 244 | $bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production'); |
245 | - $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): ''); |
|
245 | + $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : ''); |
|
246 | 246 | $bom_data_result[$objp->rowid]['qty_toproduce'] = 0; |
247 | 247 | $bom_data_result[$objp->rowid]['qty_toconsume'] += ($objp->qty_toconsume > 0 ? $objp->qty_toconsume : 0); |
248 | 248 | $bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour'); |
@@ -190,7 +190,7 @@ |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | // Add more param |
193 | - $url .= '&nonce='.bin2hex(random_bytes(64/8)); |
|
193 | + $url .= '&nonce='.bin2hex(random_bytes(64 / 8)); |
|
194 | 194 | // TODO Add param hd and/or login_hint |
195 | 195 | if (!preg_match('/^forlogin/', $state)) { |
196 | 196 | //$url .= 'hd=xxx'; |