Fix: priority is a field smallint.

Conflicts:
	htdocs/comm/action/fiche.php
This commit is contained in:
Laurent Destailleur 2014-02-06 17:09:41 +01:00
parent e22e4fc4d7
commit d1951393c7

View File

@ -58,7 +58,7 @@ class ActionComm extends CommonObject
var $percentage; // Percentage
var $location; // Location
var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events)
var $priority; // Free text ('' By default)
var $priority; // Small int (0 By default)
var $note; // Description
var $usertodo; // Object user that must do action
@ -116,7 +116,7 @@ class ActionComm extends CommonObject
$this->location=dol_trunc(trim($this->location),128);
$this->note=dol_htmlcleanlastbr(trim($this->note));
if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority)) $this->priority = 0;
if (empty($this->priority) || ! is_numeric($this->priority)) $this->priority = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
if (empty($this->punctual)) $this->punctual = 0;
if (empty($this->transparency)) $this->transparency = 0;
@ -438,7 +438,7 @@ class ActionComm extends CommonObject
$this->label=trim($this->label);
$this->note=trim($this->note);
if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority)) $this->priority = 0;
if (empty($this->priority) || ! is_numeric($this->priority)) $this->priority = 0;
if (empty($this->transparency)) $this->transparency = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
if ($this->percentage > 100) $this->percentage = 100;
@ -1064,7 +1064,7 @@ class ActionComm extends CommonObject
$this->percentage=0;
$this->location='Location';
$this->transparency=0;
$this->priority='Priority X';
$this->priority=1;
$this->note = 'Note';
}