summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/giglog_import_gigs.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-04-15 21:50:58 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-04-15 21:52:05 +0200
commit7160aacdc83cfcef9ffd795cec7e9397bfbb3698 (patch)
tree69e7ace6f3a689de2150a8bea16fe29b78753b3a /includes/admin/views/giglog_import_gigs.php
parente59f12fd21af5489b8889aa4c3ab5a90a9b317a9 (diff)
downloadgigologadmin-7160aacdc83cfcef9ffd795cec7e9397bfbb3698.tar.gz
gigologadmin-7160aacdc83cfcef9ffd795cec7e9397bfbb3698.tar.bz2
gigologadmin-7160aacdc83cfcef9ffd795cec7e9397bfbb3698.zip
Make Band::create return band object, not just id.
Diffstat (limited to 'includes/admin/views/giglog_import_gigs.php')
-rw-r--r--includes/admin/views/giglog_import_gigs.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php
index ca1c7b8..17b1cbd 100644
--- a/includes/admin/views/giglog_import_gigs.php
+++ b/includes/admin/views/giglog_import_gigs.php
@@ -61,7 +61,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
}
$resultArray = explode("\t", $line);
- $band = trim($resultArray[0]);
+ $bandname = trim($resultArray[0]);
$venue = trim($resultArray[1]);
$condate = date('Y-m-d', strtotime($resultArray[2]));
$ticketlink = trim($resultArray[3]);
@@ -69,7 +69,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
//first item in the row should be band $resultArray[0]; second should be venue $resultArray[1]; third should be concert date $resultArray[2];
//fourth item is ticketlink $resultArray[3]; fifth item is eventlink $resultArray[4];
- $newconcert[0] = GiglogAdmin_Band::create($band,'');
+ $band = GiglogAdmin_Band::create($bandname);
if (is_numeric($venue))
$newconcert[1] = $venue;
@@ -81,7 +81,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
//not sure how to check dates, hopefully manual verification of files will take care of it
GiglogAdmin_Concert::create(
- $newconcert[0],
+ $band->id(),
$newconcert[1],
$condate,
$ticketlink,