Passed
Branch develop (d85e4e)
by Laurent
84:36
created
htdocs/hrm/job_contact.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
 
59 59
 require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
60 60
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
61
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
62
-require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
61
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php';
62
+require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php';
63 63
 
64 64
 // Load translation files required by the page
65 65
 $langs->loadLangs(array("hrm", "companies", "other", "mails"));
Please login to merge, or discard this patch.
htdocs/hrm/position_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 // Default sort order (if not yet defined by previous GETPOST)
111 111
 if (!$sortfield) {
112
-	reset($object->fields);					// Reset is required to avoid key() to return null.
112
+	reset($object->fields); // Reset is required to avoid key() to return null.
113 113
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
114 114
 }
115 115
 if (!$sortorder) {
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
 		}
274 274
 	} else {
275 275
 		if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
276
-			$columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key);
276
+			$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
277 277
 			if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
278 278
 				if (preg_match('/_dtstart$/', $key)) {
279
-					$sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'";
279
+					$sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'";
280 280
 				}
281 281
 				if (preg_match('/_dtend$/', $key)) {
282
-					$sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'";
282
+					$sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'";
283 283
 				}
284 284
 			}
285 285
 		}
Please login to merge, or discard this patch.
htdocs/hrm/skill_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 // Default sort order (if not yet defined by previous GETPOST)
111 111
 if (!$sortfield) {
112
-	reset($object->fields);					// Reset is required to avoid key() to return null.
112
+	reset($object->fields); // Reset is required to avoid key() to return null.
113 113
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
114 114
 }
115 115
 if (!$sortorder) {
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
 		}
274 274
 	} else {
275 275
 		if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
276
-			$columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key);
276
+			$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
277 277
 			if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
278 278
 				if (preg_match('/_dtstart$/', $key)) {
279
-					$sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'";
279
+					$sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'";
280 280
 				}
281 281
 				if (preg_match('/_dtend$/', $key)) {
282
-					$sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'";
282
+					$sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'";
283 283
 				}
284 284
 			}
285 285
 		}
Please login to merge, or discard this patch.
htdocs/hrm/evaluation_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 // Default sort order (if not yet defined by previous GETPOST)
111 111
 if (!$sortfield) {
112
-	reset($object->fields);					// Reset is required to avoid key() to return null.
112
+	reset($object->fields); // Reset is required to avoid key() to return null.
113 113
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
114 114
 }
115 115
 if (!$sortorder) {
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
 		}
274 274
 	} else {
275 275
 		if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
276
-			$columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key);
276
+			$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
277 277
 			if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
278 278
 				if (preg_match('/_dtstart$/', $key)) {
279
-					$sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'";
279
+					$sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'";
280 280
 				}
281 281
 				if (preg_match('/_dtend$/', $key)) {
282
-					$sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'";
282
+					$sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'";
283 283
 				}
284 284
 			}
285 285
 		}
Please login to merge, or discard this patch.
htdocs/hrm/job_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 // Default sort order (if not yet defined by previous GETPOST)
111 111
 if (!$sortfield) {
112
-	reset($object->fields);					// Reset is required to avoid key() to return null.
112
+	reset($object->fields); // Reset is required to avoid key() to return null.
113 113
 	$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
114 114
 }
115 115
 if (!$sortorder) {
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
 		}
274 274
 	} else {
275 275
 		if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
276
-			$columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key);
276
+			$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
277 277
 			if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
278 278
 				if (preg_match('/_dtstart$/', $key)) {
279
-					$sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'";
279
+					$sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'";
280 280
 				}
281 281
 				if (preg_match('/_dtend$/', $key)) {
282
-					$sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'";
282
+					$sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'";
283 283
 				}
284 284
 			}
285 285
 		}
Please login to merge, or discard this patch.
htdocs/hrm/class/evaluationdet.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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/class/skillrank.class.php';
30
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/skillrank.class.php';
31 31
 //require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
32 32
 //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
33 33
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	/**
104 104
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
105 105
 	 */
106
-	public $fields=array(
106
+	public $fields = array(
107 107
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
108 108
 		'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
109 109
 		'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
Please login to merge, or discard this patch.
htdocs/hrm/class/job.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@
 block discarded – undo
102 102
 	/**
103 103
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
104 104
 	 */
105
-	public $fields=array(
105
+	public $fields = array(
106 106
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
107 107
 		'label' => array('type'=>'varchar(128)', 'label'=>'Label', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Label of object"),
108 108
 		'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,),
109 109
 		'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>2,),
110 110
 		'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
111
-		'deplacement' => array('type'=>'select', 'required'=> 1,'label'=> 'deplacement', 'enabled'=> 1, 'position'=> 90, 'notnull'=> 1, 'visible'=> 1, 'arrayofkeyval'=> array(0 =>"No", 1=>"Yes"), 'default'=>0),
111
+		'deplacement' => array('type'=>'select', 'required'=> 1, 'label'=> 'deplacement', 'enabled'=> 1, 'position'=> 90, 'notnull'=> 1, 'visible'=> 1, 'arrayofkeyval'=> array(0 =>"No", 1=>"Yes"), 'default'=>0),
112 112
 		'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>0,),
113 113
 		'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>0,),
114 114
 		'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
Please login to merge, or discard this patch.
htdocs/hrm/class/evaluation.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
  */
27 27
 
28 28
 // Put here all includes required by your class file
29
-require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
30
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluationdet.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
30
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/evaluationdet.class.php';
31 31
 //require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
32 32
 //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
33 33
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
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
 		'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
110 110
 		'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2',),
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		$resultcreate = $this->createCommon($user, $notrigger);
227 227
 
228 228
 		if ($resultcreate > 0) {
229
-			require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php';
229
+			require_once DOL_DOCUMENT_ROOT.'/hrm/class/skillrank.class.php';
230 230
 			$skillRank = new SkillRank($this->db);
231 231
 			$TRequiredRanks = $skillRank->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_object='.$this->fk_job." AND objecttype='job'"));
232 232
 
@@ -628,12 +628,12 @@  discard block
 block discarded – undo
628 628
 	public function getLastEvaluationForUser($fk_user)
629 629
 	{
630 630
 		$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."hrm_evaluation ";
631
-		$sql.=	"WHERE fk_user=".((int) $fk_user)." ";
632
-		$sql.=	"ORDER BY date_eval DESC ";
633
-		$sql.=	"LIMIT 1 ";
631
+		$sql .= "WHERE fk_user=".((int) $fk_user)." ";
632
+		$sql .= "ORDER BY date_eval DESC ";
633
+		$sql .= "LIMIT 1 ";
634 634
 
635 635
 		$res = $this->db->query($sql);
636
-		if (!$res) { dol_print_error($this->db);}
636
+		if (!$res) { dol_print_error($this->db); }
637 637
 
638 638
 		$Tab = $this->db->fetch_object($res);
639 639
 
Please login to merge, or discard this patch.
htdocs/hrm/position_agenda.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
83 83
 require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php';
84 84
 require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php';
85
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
85
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php';
86 86
 
87 87
 
88 88
 // Load translation files required by the page
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 		// List of all actions
271 271
 		$filters = array();
272 272
 		$filters['search_agenda_label'] = $search_agenda_label;
273
-		$object->fields['label']=array(); // Usefull to get only get agenda events linked to position (this object doesn't need label of ref field, but show_actions_done() needs it to work correctly)
273
+		$object->fields['label'] = array(); // Usefull to get only get agenda events linked to position (this object doesn't need label of ref field, but show_actions_done() needs it to work correctly)
274 274
 
275 275
 		// TODO Replace this with same code than into list.php
276 276
 		show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);
Please login to merge, or discard this patch.