From 93950454195321a58ee73c796b77f380dc9d3f64 Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Sun, 27 Mar 2022 11:03:31 +0200 Subject: Filtered out concerts older than today Concerts should show with upper case --- includes/admin/views/_concerts_table.php | 2 +- includes/concert.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/admin/views/_concerts_table.php b/includes/admin/views/_concerts_table.php index 45d9196..719dda5 100644 --- a/includes/admin/views/_concerts_table.php +++ b/includes/admin/views/_concerts_table.php @@ -303,7 +303,7 @@ if (!class_exists("GiglogAdmin_ConcertsTable")) $content .= "" . date( 'd.M.Y', strtotime( $concert->cdate() ) ) . "" - . "" . esc_html($concert->cname()) . "" + . "" . strtoupper(esc_html($concert->cname())) . "" . "" . esc_html($concert->venue()->name()) . ""; if( is_admin() ) { diff --git a/includes/concert.php b/includes/concert.php index d749e67..996d79e 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -189,7 +189,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) { $query = "SELECT {$ct}.*, {$vt}.wpgvenue_name, {$vt}.wpgvenue_city "; } - $query .= "FROM {$ct} LEFT JOIN {$vt} ON {$ct}.venue = {$vt}.id "; + $query .= "FROM {$ct} LEFT JOIN {$vt} ON {$ct}.venue = {$vt}.id WHERE wpgconcert_date >= CURRENT_TIMESTAMP"; $keymap = [ 'id' => $wpdb->prefix . 'giglogadmin_concerts.id', @@ -234,7 +234,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) { } if ( ! empty( $where ) ) { - $query .= 'WHERE ' . implode(' and ', $where); + $query .= 'AND ' . implode(' and ', $where); } $query .= ' ORDER BY wpgconcert_date'; -- cgit v1.2.3