summaryrefslogtreecommitdiffstats
path: root/includes/concert.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-09-03 13:08:07 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-09-03 13:08:07 +0200
commit92ee799aab8d9ee41564b346f3a89bb688cf53bd (patch)
treebc4d6ba99c80f40ca61458dc6e3fe3e548909198 /includes/concert.php
parentce7584bd6362d4eed9160c361498e624aede6a06 (diff)
downloadgigologadmin-92ee799aab8d9ee41564b346f3a89bb688cf53bd.tar.gz
gigologadmin-92ee799aab8d9ee41564b346f3a89bb688cf53bd.tar.bz2
gigologadmin-92ee799aab8d9ee41564b346f3a89bb688cf53bd.zip
Shift value of Concert statuses to be 0-based.
This will trip up any existing records in the db, but that should not matter, since we're changing how this entire stuff works now.
Diffstat (limited to 'includes/concert.php')
-rw-r--r--includes/concert.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/concert.php b/includes/concert.php
index 61959b2..d6fe7c4 100644
--- a/includes/concert.php
+++ b/includes/concert.php
@@ -21,12 +21,12 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
private ?int $status;
private array $roles;
- public const STATUS_NONE = 1;
- public const STATUS_ACCRED_REQ = 2;
- public const STATUS_PHOTO_APPROVED = 3;
- public const STATUS_TEXT_APPROVED = 4;
- public const STATUS_ALL_APPROVED = 5;
- public const STATUS_REJECTED = 6;
+ public const STATUS_NONE = 0;
+ public const STATUS_ACCRED_REQ = 1;
+ public const STATUS_PHOTO_APPROVED = 2;
+ public const STATUS_TEXT_APPROVED = 3;
+ public const STATUS_ALL_APPROVED = 4;
+ public const STATUS_REJECTED = 5;
/*
* Constructs a new concert object from an array of attributes.
@@ -41,7 +41,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
$this->cdate = isset($attrs->wpgconcert_date) ? $attrs->wpgconcert_date : NULL;
$this->tickets = isset($attrs->wpgconcert_tickets) ? $attrs->wpgconcert_tickets : NULL;
$this->eventlink = isset($attrs->wpgconcert_event) ? $attrs->wpgconcert_event : NULL;
- $this->status = isset($attrs->wpgconcert_status) ? $attrs->wpgconcert_status : 1;
+ $this->status = isset($attrs->wpgconcert_status) ? $attrs->wpgconcert_status : 0;
$this->roles = isset($attrs->wpgconcert_roles) ? json_decode($attrs->wpgconcert_roles, true) : [];
if ( isset( $attrs->venue ) ) {