summaryrefslogtreecommitdiffstats
path: root/includes/concert.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-06-18 18:18:23 +0200
committerHarald Eilertsen <haraldei@anduin.net>2022-06-18 18:24:11 +0200
commit1fa1654de0527440d057c5ed05891bed6cc0b69c (patch)
treeac075a8301b4a1e5887b3fcb49b33ee3ff0192d4 /includes/concert.php
parentad803da0439f0d52eb051fbe7b0a147cc777b4d2 (diff)
downloadgigologadmin-1fa1654de0527440d057c5ed05891bed6cc0b69c.tar.gz
gigologadmin-1fa1654de0527440d057c5ed05891bed6cc0b69c.tar.bz2
gigologadmin-1fa1654de0527440d057c5ed05891bed6cc0b69c.zip
Fix concert tests.
Diffstat (limited to 'includes/concert.php')
-rw-r--r--includes/concert.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/concert.php b/includes/concert.php
index 8aec96a..fed48a5 100644
--- a/includes/concert.php
+++ b/includes/concert.php
@@ -127,7 +127,7 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) {
$concert->save();
- return $concert;
+ return self::get( $concert->id() );
}
}
@@ -222,16 +222,16 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) {
case 'month':
case 'venue':
case 'city':
- array_push( $where, $wpdb->prepare( '%s=%s', $keymap[ $key ], $value ) );
+ array_push( $where, $keymap[ $key ] . $wpdb->prepare( '=%s', $value ) );
break;
case 'id':
case 'venue_id':
- array_push( $where, $wpdb->prepare( '%s=%d', $keymap[ $key ], $value ) );
+ array_push( $where, $keymap[ $key ] . $wpdb->prepare( '=%d', $value ) );
break;
case 'currentuser':
- array_push( $where, $wpdb->prepare( '%s like %s', $keymap[ $key ], esc_like( $value ) ) );
+ array_push( $where, $keymap[ $key ] . $wpdb->prepare( ' like %s', esc_like( $value ) ) );
break;
case 'offset':