diff options
author | dartcafe <github@dartcafe.de> | 2020-07-11 18:32:57 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2020-07-11 18:32:57 +0300 |
commit | cf4fe7174164f6a168bcd60ecf26896e0ea65848 (patch) | |
tree | 41f9e0daa3a5be1b24038c42f1ab58eebacb4b14 /lib/Db | |
parent | 255a36387351e40f2377a649156c3b0bf90f3ab5 (diff) |
code fixes and bugs
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/Poll.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Db/Poll.php b/lib/Db/Poll.php index d574a481..5674d0f3 100644 --- a/lib/Db/Poll.php +++ b/lib/Db/Poll.php @@ -135,6 +135,20 @@ class Poll extends Entity implements JsonSerializable { ]; } + public function deserializeArray($array) { + $this->setTitle(isset($array['title']) ? $array['title'] : $this->getTitle()); + $this->setDescription(isset($array['description']) ? $array['description'] : $this->getDescription()); + $this->setAccess(isset($array['access']) ? $array['access'] : $this->getAccess()); + $this->setExpire(isset($array['expire']) ? $array['expire'] : $this->getExpire()); + $this->setAnonymous(isset($array['anonymous']) ? $array['anonymous'] : $this->getAnonymous()); + $this->setAllowMaybe(isset($array['allowMaybe']) ? $array['allowMaybe'] : $this->getAllowMaybe()); + $this->setVoteLimit(isset($array['voteLimit']) ? $array['voteLimit'] : $this->getVoteLimit()); + $this->setShowResults(isset($array['showResults']) ? $array['showResults'] : $this->getShowResults()); + $this->setDeleted(isset($array['deleted']) ? $array['deleted'] : $this->getDeleted()); + $this->setAdminAccess(isset($array['adminAccess']) ? $array['adminAccess'] : $this->getAdminAccess()); + return $this; + } + private function getDisplayName() { if (\OC::$server->getUserManager()->get($this->owner) instanceof IUser) { |