mirror of
https://github.com/Karaka-Management/oms-Calendar.git
synced 2026-01-30 00:18:40 +00:00
Unit test bug fixes
This commit is contained in:
parent
7b8dfd81ea
commit
9b4ff04bfc
|
|
@ -47,7 +47,7 @@ class Installer extends InstallerAbstract
|
|||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'calendar` (
|
||||
`calendar_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`calendar_name` varchar(25) NOT NULL,
|
||||
`calendar_password` varchar(64) NOT NULL,
|
||||
`calendar_password` varchar(64) DEFAULT NULL,
|
||||
`calendar_description` varchar(255) NOT NULL,
|
||||
`calendar_created_by` int(11) NOT NULL,
|
||||
`calendar_created_at` datetime NOT NULL,
|
||||
|
|
@ -108,7 +108,7 @@ class Installer extends InstallerAbstract
|
|||
`calendar_event_created_by` int(11) NOT NULL,
|
||||
`calendar_event_created_at` datetime NOT NULL,
|
||||
`calendar_event_schedule` int(11) NOT NULL,
|
||||
`calendar_event_calendar` int(11) NOT NULL,
|
||||
`calendar_event_calendar` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`calendar_event_id`),
|
||||
KEY `calendar_event_created_by` (`calendar_event_created_by`),
|
||||
KEY `calendar_event_schedule` (`calendar_event_schedule`),
|
||||
|
|
|
|||
|
|
@ -79,6 +79,14 @@ class Calendar
|
|||
*/
|
||||
private $date = null;
|
||||
|
||||
/**
|
||||
* Password
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $password = null;
|
||||
|
||||
/**
|
||||
* Events.
|
||||
*
|
||||
|
|
@ -132,6 +140,28 @@ class Calendar
|
|||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $password Calendar password/title
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
$this->password = $password;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
*/
|
||||
namespace Modules\Calendar\Models;
|
||||
|
||||
use Modules\Calendar\Models\EventMapper;
|
||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||
use phpOMS\DataStorage\Database\Query\Builder;
|
||||
use phpOMS\DataStorage\Database\Query\Column;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class Event
|
|||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $calendar = 0;
|
||||
private $calendar = null;
|
||||
|
||||
/**
|
||||
* People.
|
||||
|
|
@ -299,6 +299,7 @@ class Event
|
|||
public function setCreatedBy(int $createdBy)
|
||||
{
|
||||
$this->createdBy = $createdBy;
|
||||
$this->schedule->setCreatedBy($this->createdBy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ class EventMapper extends DataMapperAbstract
|
|||
try {
|
||||
$objId = parent::create($obj);
|
||||
$query = new Builder($this->db);
|
||||
|
||||
$query->prefix($this->db->getPrefix())
|
||||
->insert(
|
||||
'account_permission_account',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user