Skip to content

Commit

Permalink
Fix property access.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 27, 2015
1 parent c7b3a7f commit 51ce17b
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions framework/Compress/lib/Horde/Compress/Tnef/VTodo.php
Expand Up @@ -178,6 +178,21 @@ class Horde_Compress_Tnef_VTodo extends Horde_Compress_Tnef_Object
* @var string
*/
protected $_lastUser;

/**
* Start time of task.
*
* @var integer
*/
protected $_start;

/**
* Status of task.
*
* @var string
*/
protected $_status;

/**
* The MIME type of this object's content.
*
Expand Down Expand Up @@ -239,13 +254,13 @@ public function setMapiAttribute($type, $name, $value)
$this->_due = new Horde_Date(Horde_Mapi::filetimeToUnixtime($value));
$this->_due = $this->_due->timestamp();
case self::MAPI_TASK_STARTDATE:
if (empty($this->start)) {
$this->start = Horde_Mapi::filetimeToUnixtime($value);
if (empty($this->_start)) {
$this->_start = Horde_Mapi::filetimeToUnixtime($value);
}
break;
case self::MAPI_TASK_COMMONSTART:
$this->start = new Horde_Date(Horde_Mapi::filetimeToUnixtime($value));
$this->start = $this->start->timestamp();
$this->_start = new Horde_Date(Horde_Mapi::filetimeToUnixtime($value));
$this->_start = $this->_start->timestamp();
case self::MAPI_TASK_DATECOMPLETED:
$this->_completed = Horde_Mapi::filetimeToUnixtime($value);
break;
Expand All @@ -259,13 +274,13 @@ public function setMapiAttribute($type, $name, $value)
case self::STATUS_WAIT:
case self::STATUS_DEFERRED: // ??
$this->_percentComplete = 0;
$this->status = 'NEEDS-ACTION';
$this->_status = self::TASK_STATUS_ACTION;
break;
case self::STATUS_IN_PROGRESS:
$this->status = 'IN-PROGRESS';
$this->_status = self::TASK_STATUS_IN_PROGRESS;
break;
case self::STATUS_COMPLETE:
$this->status = 'COMPLETED';
$this->_status = self::TASK_STATUS_COMPLETED;
$this->_percentComplete = 1;
break;
// Body properties. I still can't figure this out.
Expand Down Expand Up @@ -358,8 +373,8 @@ protected function _tovTodo()
if ($this->_due) {
$vtodo->setAttribute('DUE', $this->_due);
}
if ($this->start) {
$vtodo->setAttribute('DTSTART', $this->start);
if ($this->_start) {
$vtodo->setAttribute('DTSTART', $this->_start);
}
if ($this->_completed) {
$vtodo->setAttribute('COMPLETED', $this->_completed);
Expand Down

0 comments on commit 51ce17b

Please sign in to comment.