diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-09-05 16:33:27 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-09-05 16:33:27 +0200 |
commit | 30c78c1653e0a0e5ec1cf72570561ccdd2eddc26 (patch) | |
tree | d7fe4525b60681825aefb32322bbb467d091ba7c /includes/concert.php | |
parent | 36220bf496116c91ed01efbc981dafae55d55915 (diff) | |
parent | aa688626d52d4e7fd3df16dc620cf96697c3f95a (diff) | |
download | gigologadmin-30c78c1653e0a0e5ec1cf72570561ccdd2eddc26.tar.gz gigologadmin-30c78c1653e0a0e5ec1cf72570561ccdd2eddc26.tar.bz2 gigologadmin-30c78c1653e0a0e5ec1cf72570561ccdd2eddc26.zip |
Merge remote-tracking branch 'andrea/andreaschanges' into dev
Diffstat (limited to 'includes/concert.php')
-rw-r--r-- | includes/concert.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/concert.php b/includes/concert.php index 29de015..66f9c1f 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -85,6 +85,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) { $query = self::BASE_QUERY . 'WHERE ' . $wpdb->prepare('wpg_concerts.id = %d', $id); + $query.= ' ORDER BY wpgconcert_date'; $results = $wpdb->get_results($query); @@ -216,9 +217,14 @@ if ( !class_exists('GiglogAdmin_Concert') ) { array_push($where, 'wpg_venues.id = ' . $wpdb->prepare('%s', $filter["venue_id"])); } + if ( isset( $filter["currentuser"] ) ) { + array_push($where , 'wpgconcert_roles like "%'.$filter["currentuser"].'%"'); + } + if ( ! empty( $where ) ) { $query .= 'WHERE ' . implode(' and ', $where); } + $query.= ' ORDER BY wpgconcert_date'; $results = $wpdb->get_results($query); |