diff options
-rw-r--r-- | includes/admin/register_db_tables.php | 4 | ||||
-rw-r--r-- | includes/admin/views/_concerts_table.php | 2 | ||||
-rw-r--r-- | tests/ConcertTest.php | 1 | ||||
-rw-r--r-- | tests/bootstrap.php | 1 |
4 files changed, 4 insertions, 4 deletions
diff --git a/includes/admin/register_db_tables.php b/includes/admin/register_db_tables.php index 8080578..8b5f044 100644 --- a/includes/admin/register_db_tables.php +++ b/includes/admin/register_db_tables.php @@ -348,10 +348,10 @@ if ( !function_exists( "giglog_register_db_tables") ) ADD COLUMN IF NOT EXISTS `wpgconcert_type` INT NOT NULL DEFAULT '1' COMMENT '1 concert, 2 festival';"); $wpdb->query( - "ALTER TABLE `wpg_concerts` DROP INDEX `wpgconcert_band`;"); + "ALTER TABLE `wpg_concerts` DROP INDEX IF EXISTS `wpgconcert_band`;"); $wpdb->query( - "ALTER TABLE `wpg_concerts` DROP FOREIGN KEY `wpgconcert_band`;"); + "ALTER TABLE `wpg_concerts` DROP FOREIGN KEY IF EXISTS `wpgconcert_band`;"); } if ($db_version == NULL || $db_version < 6) diff --git a/includes/admin/views/_concerts_table.php b/includes/admin/views/_concerts_table.php index aba8c5c..685ee07 100644 --- a/includes/admin/views/_concerts_table.php +++ b/includes/admin/views/_concerts_table.php @@ -62,7 +62,7 @@ if (!class_exists("GiglogAdmin_ConcertsTable")) $content .= '<tr class="assignitr">'; if ($lastType != '' && $lastType != $concert->venue()->city()) { - $content .= '<td>' . $concert->venue->city() . '</td></tr><tr class="assignitr">'; + $content .= '<td>' . $concert->venue()->city() . '</td></tr><tr class="assignitr">'; } if ($lastType == '' ) { diff --git a/tests/ConcertTest.php b/tests/ConcertTest.php index 5e6ebde..d81effd 100644 --- a/tests/ConcertTest.php +++ b/tests/ConcertTest.php @@ -71,7 +71,6 @@ final class ConcertTest extends WP_UnitTestCase $tables = [ "wpg_concerts", "wpg_venues", - "wpg_concertlogs", ]; foreach( $tables as $table ) { diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b090644..c999ba1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -30,6 +30,7 @@ require_once $_tests_dir . '/includes/functions.php'; * Manually load the plugin being tested. */ function _manually_load_plugin() { + define('WP_ADMIN', true); // We're always in admin require dirname( dirname( __FILE__ ) ) . '/giglogadmin.php'; } tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); |