summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/giglog_admin_page.php
diff options
context:
space:
mode:
authorAndreaChirulescu <andrea.chirulescu@gmail.com>2021-04-21 21:37:09 +0200
committerAndreaChirulescu <andrea.chirulescu@gmail.com>2021-04-21 21:37:09 +0200
commitf29cb92957df4423396af64fdcce08ca2b630457 (patch)
tree20760c9f16813e79618001f78a35df8a55be3747 /includes/admin/views/giglog_admin_page.php
parent2260ddc0d4e7b5a9f1a9ac0995e7a98403bcf658 (diff)
downloadgigologadmin-f29cb92957df4423396af64fdcce08ca2b630457.tar.gz
gigologadmin-f29cb92957df4423396af64fdcce08ca2b630457.tar.bz2
gigologadmin-f29cb92957df4423396af64fdcce08ca2b630457.zip
added check that GiglogAdmin_Band::get_band returns something
Diffstat (limited to 'includes/admin/views/giglog_admin_page.php')
-rw-r--r--includes/admin/views/giglog_admin_page.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index a195fba..548694b 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -181,10 +181,20 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
$content.='</form>';
+ $band = '';
+ $bcountry = '';
+ $b = GiglogAdmin_Band::get_band($c->band());
+ if (is_array($b))
+ {
+ $band = GiglogAdmin_Band::get_band($c->band())[0];
+ $bcountry = GiglogAdmin_AdminPage::get_countries(GiglogAdmin_Band::get_band($c->band())[1]);
+ }
+
+
$content.='<form method="POST" action="" class="bandedit" ><br>'
- .'<input type="hidden" name="bid" value="' .$c->band(). '" />'
- .'<label for="bandname">Band Name:</label><input type="text" id="bandname" name="bandname" value="'.GiglogAdmin_Band::get_band($c->band())[0].'"><br>'
- .'<label for="eventurl">Band Country:</label>'.GiglogAdmin_AdminPage::get_countries(GiglogAdmin_Band::get_band($c->band())[1]).'<br>';
+ .'<input type="hidden" name="bid" value="' .$c->band(). '" />'
+ .'<label for="bandname">Band Name:</label><input type="text" id="bandname" name="bandname" value="'.$band.'"><br>'
+ .'<label for="eventurl">Band Country:</label>'.$bcountry.'<br>';
if ($editing) {
$content.='<p><input type="submit" name="editband" value="Edit Band"></p>';