diff --git a/appinfo/info.xml b/appinfo/info.xml index 8dd0a6296..2a4c32275 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Polls A polls app, similar to doodle/dudle with the possibility to restrict access. A polls app, similar to doodle/dudle with the possibility to restrict access (members, certain groups/users, hidden and public). - 1.5.6 + 1.5.7 agpl Vinzenz Rosenkranz René Gieling diff --git a/lib/Db/Poll.php b/lib/Db/Poll.php index 8c25f79a8..7711609a9 100644 --- a/lib/Db/Poll.php +++ b/lib/Db/Poll.php @@ -141,34 +141,18 @@ public function jsonSerialize() { ]; } - public function setAnonymous($value) { - $this->anonymous = intval($value); - } - - public function setAllowMaybe($value) { - $this->allowMaybe = intval($value); - } - - public function setAdminAccess($value) { - $this->adminAccess = intval($value); - } - - public function setImportant($value) { - $this->important = intval($value); - } - 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->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()); - $this->setImportant(isset($array['important']) ? $array['important'] : $this->getImportant()); + $this->setAdminAccess(isset($array['adminAccess']) ?+ $array['adminAccess'] : $this->getAdminAccess()); + $this->setImportant(isset($array['important']) ? +$array['important'] : $this->getImportant()); return $this; } diff --git a/package.json b/package.json index bfc0f2942..89ebbe1a5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "polls", "description": "Polls app for nextcloud", - "version": "1.5.6", + "version": "1.5.7", "authors": [ { "name": "Vinzenz Rosenkranz", diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue index 385eedabb..e690c93ce 100644 --- a/src/js/components/SideBar/SideBarTabConfiguration.vue +++ b/src/js/components/SideBar/SideBarTabConfiguration.vue @@ -212,7 +212,7 @@ export default { return (this.poll.anonymous > 0) }, set(value) { - this.writeValue({ anonymous: value }) + this.writeValue({ anonymous: +value }) }, }, @@ -221,7 +221,7 @@ export default { return (this.poll.important > 0) }, set(value) { - this.writeValue({ important: value }) + this.writeValue({ important: +value }) }, }, @@ -230,7 +230,7 @@ export default { return (this.poll.adminAccess > 0) }, set(value) { - this.writeValue({ adminAccess: value }) + this.writeValue({ adminAccess: +value }) }, }, @@ -239,7 +239,7 @@ export default { return this.poll.allowMaybe }, set(value) { - this.writeValue({ allowMaybe: value }) + this.writeValue({ allowMaybe: +value }) }, },