diff --git a/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php b/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php index c80070905..52aca8251 100644 --- a/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php +++ b/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php @@ -56,9 +56,11 @@ public function admin_menu_fix() { // Make sure Tickets is selected when creating a new ticket. if ( 'post-new.php' == $pagenow && 'tix_ticket' == $typenow ) { - add_filter( 'submenu_file', function () { - return 'edit.php?post_type=tix_ticket'; - } ); + add_filter( 'submenu_file', + function () { + return 'edit.php?post_type=tix_ticket'; + } + ); } } @@ -253,6 +255,7 @@ public function menu_tools_summarize() { /** * Hooked at (almost) admin_init, fired if one requested a * Summarize export. Serves the download file. + * * @see menu_tools_summarize() */ public function summarize_admin_init() { @@ -262,13 +265,14 @@ public function summarize_admin_init() { if ( isset( $_POST['tix_export_summary'], $_POST['tix_summarize_by'] ) && check_admin_referer( 'tix_summarize' ) ) { $summarize_by = $_POST['tix_summarize_by']; - if ( ! array_key_exists( $summarize_by, $this->get_available_summary_fields() ) ) + if ( ! array_key_exists( $summarize_by, $this->get_available_summary_fields() ) ) { return; + } $fields = $this->get_available_summary_fields(); $summary = $this->get_summary( $summarize_by ); $summary_title = $fields[ $summarize_by ]; - $filename = sprintf( 'camptix-summary-%s-%s.csv', sanitize_title_with_dashes( $summary_title ), date( 'Y-m-d' ) ); + $filename = sprintf( 'camptix-summary-%s-%s.csv', sanitize_title_with_dashes( $summary_title ), gmdate( 'Y-m-d' ) ); header( 'Content-Type: text/csv' ); header( 'Content-Disposition: attachment; filename="' . $filename . '"' ); @@ -317,10 +321,10 @@ public function table( $rows, $classes = 'widefat' ) {
-