summaryrefslogtreecommitdiffstats
path: root/includes/venue.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-04-01 19:47:09 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-04-01 19:47:09 +0200
commit7b2acc35a03cec9928e9ce86c9a3195429ccd306 (patch)
tree8bb041f148b9046420226160be942790868165bc /includes/venue.php
parented89a07e3890f135f14cbe39aaf15a4c91f2c387 (diff)
downloadgigologadmin-7b2acc35a03cec9928e9ce86c9a3195429ccd306.tar.gz
gigologadmin-7b2acc35a03cec9928e9ce86c9a3195429ccd306.tar.bz2
gigologadmin-7b2acc35a03cec9928e9ce86c9a3195429ccd306.zip
Move rendering of concert assignment table.
Moved it to the admin page for now. May move it further to a partial or something later. There's quite a bit of cleanup needed. It still refers to some utility functions in the old shortcode module.
Diffstat (limited to 'includes/venue.php')
-rw-r--r--includes/venue.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/venue.php b/includes/venue.php
index 8edb136..de144fd 100644
--- a/includes/venue.php
+++ b/includes/venue.php
@@ -48,5 +48,15 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
return array_map(function ($r) { return $r->wpgvenue_city; }, $results);
}
+
+ static function venues_in_city($city)
+ {
+ global $wpdb;
+ $q = $wpdb->prepare(
+ "select id, wpgvenue_name from wpg_venues where wpgvenue_city=?", $city);
+ $results = $wpdb->get_results($q);
+
+ return array_map(function ($r) { return [$r->id, $r->wpgvenue_name]; }, $results);
+ }
}
}