Fix status labels showing as serialized when editing them

This commit is contained in:
Nathan Gray 2012-10-16 19:13:28 +00:00
parent 8a9f710815
commit 45a14f4fbb

View File

@ -172,7 +172,11 @@ class timesheet_bo extends so_sql_cf
protected function load_statuses()
{
$this->status_labels =& $this->config_data['status_labels'];
if (!is_array($this->status_labels)) $this->status_labels= array($this->status_labels);
if (!is_array($this->status_labels))
{
$this->status_labels = (@unserialize($this->status_labels) === false) ?
array($this->status_labels) : @unserialize($this->status_labels);
}
foreach ($this->status_labels as $status_id => $label)
{