From 4f34c1ae93330e142c75f181d4d0c8c2fa8e4bdc Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 7 Apr 2021 10:36:19 +0200 Subject: Fix AdminPage::adminactions() The reason it did not work was that it was not the same as the inline version. --- includes/admin/views/giglog_admin_page.php | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'includes/admin/views') diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index babe988..4f24892 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -84,22 +84,26 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { return $select; } - static function adminactions() //didn't get this one to work, the point was to create the drop down menu with a function, but it works fine to create it directly in the query + static function adminactions($concert_id) { global $wpdb; $query = "SELECT id,wpgs_name from wpg_pressstatus" ; $statuses = $wpdb->get_results($query); - $select = '
' + . ''; - $select .= '
'; + $select .= + '' + . '' + . ''; + return $select; } @@ -169,18 +173,12 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $content .= ''.GiglogAdmin_AdminPage::returnuser('rev1', $row->id ).''; $content .= ''.GiglogAdmin_AdminPage::returnuser('rev2', $row->id ).''; $content .= ''.$row -> wpgs_name.''; - if (current_user_can('administrator')) //($hf_username == 'etadmin') - { $content .= ''; - $stquery = "SELECT id,wpgs_name from wpg_pressstatus" ; - $statuses = $wpdb->get_results($stquery); - $content .= '
'; - $content .= '
'; - $content .= ''; + + if (current_user_can('administrator')) { + $content .= + '' + . GiglogAdmin_AdminPage::adminactions($row->id) + . ''; } $content .= ''; $lastType = $row->wpgvenue_city; @@ -192,7 +190,9 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { } static function update() - { global $wpdb; + { + global $wpdb; + if ('POST' !== $_SERVER['REQUEST_METHOD']) return; -- cgit v1.2.3