From 88244b19533163564098057c75952deffc7dc13e Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Sat, 4 Sep 2021 21:36:25 +0200 Subject: Fixed a call to city() method in concert.php It needed ->venue->city Added order by concert date in concert list --- includes/concert.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'includes/concert.php') diff --git a/includes/concert.php b/includes/concert.php index a533679..8210b2d 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); @@ -219,6 +220,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) { if ( ! empty( $where ) ) { $query .= 'WHERE ' . implode(' and ', $where); } + $query.= ' ORDER BY wpgconcert_date'; $results = $wpdb->get_results($query); -- cgit v1.2.3 From 98909040a8dff9fb77f9e0a9acd0b9ce81236335 Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Sun, 5 Sep 2021 15:03:09 +0200 Subject: Fixed filter by your concerts Added CSS and extra fromatting to table --- includes/concert.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'includes/concert.php') diff --git a/includes/concert.php b/includes/concert.php index 8210b2d..f4d7e6b 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -217,6 +217,10 @@ 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); } -- cgit v1.2.3