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
path: root/lib/Db
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-05-12 09:40:17 +0300
committerdartcafe <github@dartcafe.de>2020-05-12 09:40:17 +0300
commit36aeee5fcf18325df29b051df1a97294b409d9b3 (patch)
tree22641f7bf7b1b015a338aae78e40b167d99a742e /lib/Db
parent67f3a94ae2ac518e4e39c8f9561b8de2e757dd0c (diff)
confirm options after expiry
Diffstat (limited to 'lib/Db')
-rw-r--r--lib/Db/Option.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Db/Option.php b/lib/Db/Option.php
index f8c442ac..70c63d4e 100644
--- a/lib/Db/Option.php
+++ b/lib/Db/Option.php
@@ -40,6 +40,8 @@ use OCP\AppFramework\Db\Entity;
* @method void setTimestamp(integer $value)
* @method integer getOrder()
* @method void setOrder(integer $value)
+ * @method integer getConfirmed()
+ * @method void setConfirmed(integer $value)
*/
class Option extends Entity implements JsonSerializable {
@@ -55,6 +57,9 @@ class Option extends Entity implements JsonSerializable {
/** @var int $order */
protected $order;
+ /** @var int $confirmed */
+ protected $confirmed;
+
public function jsonSerialize() {
if (intval($this->timestamp) > 0) {
$timestamp = $this->timestamp;
@@ -69,7 +74,14 @@ class Option extends Entity implements JsonSerializable {
'pollId' => intval($this->pollId),
'pollOptionText' => htmlspecialchars_decode($this->pollOptionText),
'timestamp' => intval($timestamp),
- 'order' => $this->setOrder(intval($this->timestamp), intval($this->order))
+ 'order' => $this->setOrder(intval($this->timestamp), intval($this->order)),
+ 'confirmed' => intval($this->confirmed),
+ 'no' => 0,
+ 'yes' => 0,
+ 'maybe' => 0,
+ 'realno' => 0,
+ 'rank' => 0,
+ 'votes' => 0,
];
}