summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/giglog_import_gigs.php
diff options
context:
space:
mode:
authorAndreaChirulescu <andrea.chirulescu@gmail.com>2021-04-13 22:44:02 +0200
committerAndreaChirulescu <andrea.chirulescu@gmail.com>2021-04-13 22:44:02 +0200
commit4f0454005caa787e9fed33ca33671b7f4ada8a31 (patch)
tree450b0d03a7b80416183d028a20d3b10d54946512 /includes/admin/views/giglog_import_gigs.php
parent0c437c746a8f964bf59ae9808a2b990d144bc39e (diff)
downloadgigologadmin-4f0454005caa787e9fed33ca33671b7f4ada8a31.tar.gz
gigologadmin-4f0454005caa787e9fed33ca33671b7f4ada8a31.tar.bz2
gigologadmin-4f0454005caa787e9fed33ca33671b7f4ada8a31.zip
Concert file wizardry to split create/createAndFind,Find functions
Adjustments in admin page and import gigs to use the above adjustments
Diffstat (limited to 'includes/admin/views/giglog_import_gigs.php')
-rw-r--r--includes/admin/views/giglog_import_gigs.php32
1 files changed, 1 insertions, 31 deletions
diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php
index ae34c2d..a5fb72e 100644
--- a/includes/admin/views/giglog_import_gigs.php
+++ b/includes/admin/views/giglog_import_gigs.php
@@ -91,42 +91,12 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
//not sure how to check dates, hopefully manual verification of files will take care of it
- $cresults = GiglogAdmin_Concert::get($newconcert[0], $newconcert[1], $condate);
- if ($cresults) {
- error_log( 'DUPLICATE ROW detected: '
- . ' BAND ' . $band . ' with band ID ' . $newconcert[0]
- . ', VENUE ' . $venue . ' with venue ID ' . $newconcert[1]
- . ', CONCERTDATE ' . $condate);
- } else {
- $id = GiglogAdmin_Concert::find_or_create(
- '',
+ GiglogAdmin_Concert::find_or_create(
$newconcert[0],
$newconcert[1],
$condate,
$ticketlink,
$eventlink);
-
- error_log( 'NEW CONCERT ADDED: '
- . ' ID: ' . $id->id()
- . ' BAND ' . $band . ' with band ID ' . $newconcert[0]
- . ', VENUE ' . $venue . ' with venue ID ' . $newconcert[1]
- . ', CONCERTDATE ' . $condate
- . ', Ticket LINK ' . $ticketlink
- . ', Event LINK ' . $eventlink);
-
- GiglogAdmin_Concertlogs::add($id->id());
-
- /*the last line can be replaced by a trigger
- CREATE TRIGGER `insertIntoPhotoLogs` AFTER INSERT ON `wpg_concerts`
- FOR EACH ROW INSERT INTO wpg_concertlogs (
- wpg_concertlogs.id,
- wpg_concertlogs.wpgcl_concertid,
- wpg_concertlogs.wpgcl_status)
-
- VALUES
- (null, new.id, 1)
- */
- }
}
}
}