summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/admin/views/giglog_admin_page.php2
-rw-r--r--includes/concert.php23
-rw-r--r--includes/concertlogs.php22
3 files changed, 23 insertions, 24 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index ab71270..6c1f059 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -332,7 +332,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
else
{
GiglogAdmin_Concert::update_concert($_POST['pid'],$_POST['cname'], $_POST['selectvenueadmin'], $_POST['cdate'], $_POST['ticket'], $_POST['eventurl']);
- GiglogAdmin_Concert::update_concertlog($_POST['pid'],$_POST['photo1'], $_POST['photo2'], $_POST['rev1'], $_POST['rev2']);
+ GiglogAdmin_Concertlogs::update($_POST['pid'],$_POST['photo1'], $_POST['photo2'], $_POST['rev1'], $_POST['rev2']);
echo '<script language="javascript">alert("Yay, concert updated"); </script>';
}
diff --git a/includes/concert.php b/includes/concert.php
index fcb3934..6d568c8 100644
--- a/includes/concert.php
+++ b/includes/concert.php
@@ -137,29 +137,6 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
return ($wpdb->last_error);
}
- static function update_concertlog($cid, $ph1, $ph2, $rev1, $rev2)
- {
- global $wpdb;
-
- $res = $wpdb->update('wpg_concertlogs', array(
- 'wpgcl_photo1' => $ph1,
- 'wpgcl_photo2' => $ph2,
- 'wpgcl_rev1' => $rev1,
- 'wpgcl_rev2' => $rev2
- ),
- array('wpgcl_concertid' => $cid)
- );
-
- if ( !$res ) {
- // exit( var_dump( $wpdb->last_query ) ); //for onscreen debugging when needed
- error_log( __CLASS__ . '::' . __FUNCTION__ . ": {$wpdb->last_error}");
- die;
- }
-
- return ($wpdb->last_error);
-
- }
-
public static function find($cname, $venue, $date)
{
global $wpdb;
diff --git a/includes/concertlogs.php b/includes/concertlogs.php
index cd0a330..8b1ca63 100644
--- a/includes/concertlogs.php
+++ b/includes/concertlogs.php
@@ -36,6 +36,28 @@ if ( !class_exists( 'GiglogAdmin_Concertlogs' ) )
$wpdb->query($q);
}
+ static function update($cid, $ph1, $ph2, $rev1, $rev2)
+ {
+ global $wpdb;
+
+ $res = $wpdb->update('wpg_concertlogs', array(
+ 'wpgcl_photo1' => $ph1,
+ 'wpgcl_photo2' => $ph2,
+ 'wpgcl_rev1' => $rev1,
+ 'wpgcl_rev2' => $rev2
+ ),
+ array('wpgcl_concertid' => $cid)
+ );
+
+ if ( !$res ) {
+ // exit( var_dump( $wpdb->last_query ) ); //for onscreen debugging when needed
+ error_log( __CLASS__ . '::' . __FUNCTION__ . ": {$wpdb->last_error}");
+ die;
+ }
+
+ return ($wpdb->last_error);
+ }
+
public static function get_status(int $concert_id) : ?int
{
global $wpdb;