Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-10-25 21:31:01 +0300
committerdartcafe <github@dartcafe.de>2020-10-25 21:31:01 +0300
commitc7929db5d9386a1c183f1a657744cf45d5413924 (patch)
treeb976147643149d6627dcaeeb27caf2e4a90493fb
parent21c51b1633544bdfe0f974ee0b6e2f68fd34c920 (diff)
Another approach to force boolean to intv1.5.7
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/Db/Poll.php24
-rw-r--r--package.json2
-rw-r--r--src/js/components/SideBar/SideBarTabConfiguration.vue8
4 files changed, 10 insertions, 26 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 8dd0a629..2a4c3227 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,7 +5,7 @@
<name>Polls</name>
<summary>A polls app, similar to doodle/dudle with the possibility to restrict access.</summary>
<description>A polls app, similar to doodle/dudle with the possibility to restrict access (members, certain groups/users, hidden and public).</description>
- <version>1.5.6</version>
+ <version>1.5.7</version>
<licence>agpl</licence>
<author>Vinzenz Rosenkranz</author>
<author>René Gieling</author>
diff --git a/lib/Db/Poll.php b/lib/Db/Poll.php
index 8c25f79a..7711609a 100644
--- a/lib/Db/Poll.php
+++ b/lib/Db/Poll.php
@@ -141,34 +141,18 @@ class Poll extends Entity implements JsonSerializable {
];
}
- 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 bfc0f294..89ebbe1a 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 385eedab..e690c93c 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 })
},
},