summaryrefslogtreecommitdiffstats
path: root/includes/concertlogs.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-05-25 16:43:05 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-05-25 16:49:57 +0200
commit44ad0a77496b120eede51e60698e1caff093352c (patch)
tree6d9e38721100fe3e9ede6f87d2d3fcb5b7b73a07 /includes/concertlogs.php
parent543bddc03fbf9dc90429d4d77dd11affaea4f356 (diff)
downloadgigologadmin-44ad0a77496b120eede51e60698e1caff093352c.tar.gz
gigologadmin-44ad0a77496b120eede51e60698e1caff093352c.tar.bz2
gigologadmin-44ad0a77496b120eede51e60698e1caff093352c.zip
Use select_field in adminactions form.
Also add a `get_status` method to the Concertlogs class, returning the press status for a given concert_id.
Diffstat (limited to 'includes/concertlogs.php')
-rw-r--r--includes/concertlogs.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/concertlogs.php b/includes/concertlogs.php
index 3b8083a..9546d21 100644
--- a/includes/concertlogs.php
+++ b/includes/concertlogs.php
@@ -25,5 +25,17 @@ if ( !class_exists( 'GiglogAdmin_Concertlogs' ) )
$wpdb->query($q);
}
+
+ public static function get_status(int $concert_id) : ?int
+ {
+ global $wpdb;
+
+ $q = $wpdb->prepare(
+ 'select wpgcl_status from wpg_concertlogs where id = %d',
+ $concert_id);
+ $res = $wpdb->get_results($q);
+
+ return $res ? $res[0]->wpgcl_status : null;
+ }
}
}