Changeset 1369465
- Timestamp:
- 03/11/2016 08:11:34 PM (10 years ago)
- Location:
- opentickets-community-edition/trunk
- Files:
-
- 10 edited
-
assets/js/admin/event-ui.js (modified) (2 diffs)
-
assets/js/admin/order/metaboxes.js (modified) (1 diff)
-
assets/js/admin/order/ticket-selection.js (modified) (1 diff)
-
assets/js/features/calendar/calendar.js (modified) (1 diff)
-
assets/js/features/event-area/ui.js (modified) (1 diff)
-
inc/order/admin.class.php (modified) (2 diffs)
-
inc/sys/admin-settings.php (modified) (2 diffs)
-
inc/ticket/ticket.class.php (modified) (7 diffs)
-
launcher.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
opentickets-community-edition/trunk/assets/js/admin/event-ui.js
r1367916 r1369465 627 627 for (var i=0; i<this.events.length; i++) { 628 628 // if the current array item (event) matches the event we are trying to remove 629 if (this.events[i]. _id == ev._id) {629 if (this.events[i].post_id == ev.post_id) { 630 630 // remove this item 631 631 delete this.events[i]; … … 646 646 var exists = $('[rel="items-removed"]', this.elements.main); 647 647 if (exists.length == 0) $('<input type="hidden" rel="items-removed" name="events-removed" value="1" />').appendTo(this.elements.main); 648 649 this.updateSources(); 650 this.updateEventList(); 648 651 }, 649 652 -
opentickets-community-edition/trunk/assets/js/admin/order/metaboxes.js
r1013663 r1369465 63 63 }; 64 64 QS.cbs.trigger( 'calculate-action', [ all_totals ] ); 65 console.log('calculate-action', all_totals);65 //console.log('calculate-action', all_totals); 66 66 67 67 // Set Total -
opentickets-community-edition/trunk/assets/js/admin/order/ticket-selection.js
r1340883 r1369465 367 367 // set the global event holder with the event data 368 368 me.event_obj = r.data; 369 console.log( 'Loaded Event:', me.event_obj );369 //console.log( 'Loaded Event:', me.event_obj ); 370 370 371 371 // make sure that event area type is initialized, and tell it to load the event -
opentickets-community-edition/trunk/assets/js/features/calendar/calendar.js
r1340883 r1369465 314 314 url: T.options.ajaxurl, 315 315 data: get_url_params, 316 xhrFields: { withCred neitals:true }316 xhrFields: { withCredentials:true } 317 317 } 318 318 ], -
opentickets-community-edition/trunk/assets/js/features/event-area/ui.js
r1311266 r1369465 56 56 } 57 57 if ( S.edata.available <= 0 && 0 == S.owns ) { 58 console.log( S );58 //console.log( S ); 59 59 _show_msg('sold-out'); 60 60 return false; -
opentickets-community-edition/trunk/inc/order/admin.class.php
r1367916 r1369465 31 31 add_action('admin_notices', array(__CLASS__, 'cannot_use_guest'), 10); 32 32 33 add_action('woocommerce_email_customer_details', array(__CLASS__, 'print_custom_email_message'), 1000);34 add_action( 'woocommerce_email_before_order_table', array(__CLASS__, 'print_custom_email_message_top'), 1000);33 // add messages to the completed order email only 34 add_action( 'woocommerce_email_subject_customer_completed_order', array( __CLASS__, 'add_completed_order_email_messages' ), 1, 1 ); 35 35 add_filter('qsot-order-has-tickets', array(__CLASS__, 'has_tickets'), 10, 2); 36 36 … … 621 621 } 622 622 623 // only add the extra custom completed order email messages, to the complete order emails 624 public static function add_completed_order_email_messages( $subject ) { 625 add_action('woocommerce_email_customer_details', array(__CLASS__, 'print_custom_email_message'), 1000); 626 add_action('woocommerce_email_before_order_table', array(__CLASS__, 'print_custom_email_message_top'), 1000); 627 return $subject; 628 } 629 623 630 public static function print_custom_email_message_top($order, $html=true) { 624 631 $print = apply_filters('qsot-order-has-tickets', false, $order); -
opentickets-community-edition/trunk/inc/sys/admin-settings.php
r1367916 r1369465 18 18 // load the woocommerce wysiwyg field js 19 19 add_action( 'woocommerce_admin_field_wysiwyg', array( __CLASS__, 'field_wysiwyg' ) ); 20 21 // allow html in wysiwyg fields 22 add_filter( 'woocommerce_admin_settings_sanitize_option', array( __CLASS__, 'save_field_wysiwyg' ), 10, 3 ); 20 23 21 24 // handle qtranslate LSB fields … … 113 116 } 114 117 118 // when saving the wysiwyg field, we need to allow html 119 public static function save_field_wysiwyg( $value, $option, $raw ) { 120 // if this is not a wysiwyg field, then pass the value through 121 if ( ! isset( $option['type'] ) || 'wysiwyg' !== $option['type'] ) 122 return $value; 123 124 return wp_kses_post( trim( $raw ) ); 125 } 126 115 127 /** 116 128 * Add a message -
opentickets-community-edition/trunk/inc/ticket/ticket.class.php
r1318942 r1369465 14 14 protected static $templates = array(); 15 15 protected static $stylesheets = array(); 16 17 // containers for current settings when protecting pdf output from errors 18 protected static $ERROR_REPORTING = null; 19 protected static $DISPLAY_ERRORS = null; 16 20 17 21 // order tracking … … 30 34 self::_setup_admin_options(); 31 35 } 36 37 // hide errors as soon as possible, if we are transmitting a pdf 38 if ( isset( $_GET['frmt'] ) && 'pdf' == $_GET['frmt'] ) 39 self::_hide_errors(); 32 40 33 41 // setup the db tables for the ticket code lookup … … 439 447 } 440 448 449 // hide errors 450 protected static function _hide_errors() { 451 self::$ERROR_REPORTING = error_reporting( 0 ); 452 self::$DISPLAY_ERRORS = ini_get( 'display_errors' ); 453 ini_set( 'display_errors', 0 ); 454 } 455 456 // restore errors 457 protected static function _restore_errors() { 458 if ( null !== self::$ERROR_REPORTING ) 459 error_reporting( self::$ERROR_REPORTING ); 460 if ( null !== self::$DISPLAY_ERRORS ) 461 ini_set( 'display_errors', self::$DISPLAY_ERRORS ); 462 463 self::$ERROR_REPORTING = self::$DISPLAY_ERRORS = null; 464 } 465 441 466 // display the order tickets, or an error, depending on if we can load the tickets or not 442 467 public static function display_order_ticket( $order_key ) { … … 444 469 $order_id = wc_get_order_id_by_order_key( $order_key ); 445 470 $order = wc_get_order( $order_id ); 446 if ( ! is_object( $order ) && ! is_wp_error( $order ) ) 471 if ( ! is_object( $order ) && ! is_wp_error( $order ) ) { 472 self::_restore_errors(); 447 473 return false; 474 } 448 475 449 476 // verify that the user can view these tickets … … 547 574 } 548 575 576 self::_restore_errors(); 577 549 578 exit; 550 579 } … … 556 585 557 586 // make sure we have the basic required data for loading the ticket 558 if ( ! is_array( $args ) || ! isset( $args['order_id'], $args['order_item_id'] ) || empty( $args['order_id'] ) || empty( $args['order_item_id'] ) ) 587 if ( ! is_array( $args ) || ! isset( $args['order_id'], $args['order_item_id'] ) || empty( $args['order_id'] ) || empty( $args['order_item_id'] ) ) { 588 self::_restore_errors(); 559 589 return false; 590 } 560 591 561 592 // make sure that the current user can view this ticket 562 if ( ! self::_can_user_view_ticket( $args ) ) 593 if ( ! self::_can_user_view_ticket( $args ) ) { 594 self::_restore_errors(); 563 595 return false; 596 } 564 597 565 598 // load all the data needed to render the ticket … … 643 676 default: echo $out; break; 644 677 } 678 679 self::_restore_errors(); 645 680 646 681 exit; -
opentickets-community-edition/trunk/launcher.php
r1368520 r1369465 4 4 * Plugin URI: http://opentickets.com/ 5 5 * Description: Event Management and Online Ticket Sales Platform 6 * Version: 2.2. 26 * Version: 2.2.3 7 7 * Author: Quadshot Software LLC 8 8 * Author URI: http://quadshot.com/ … … 54 54 'fctm' => 'fc', 55 55 'always_reserve' => 0, 56 'version' => '2.2. 2',56 'version' => '2.2.3', 57 57 'min_wc_version' => '2.4.12', 58 58 'core_post_type' => 'qsot-event', -
opentickets-community-edition/trunk/readme.txt
r1368520 r1369465 171 171 172 172 == Changelog == 173 174 = 2.2.3 - Mar/11/2016 = 175 * [tweak] added code to prevent as many third party plugin and theme PHP errors as possible during PDF generation 176 * [tweak] saving WYSIWYG based settings no longer strips out formatting 177 * [tweak] 'custom completed order email message' now only shows on the completed order email 178 * [fix] fixed frontend calendar population problem, when using an HTTP frontend and an HTTPS backend 179 * [fix] fixed the 'red x' buttons on the 'black event boxes' on the calendar in the edit event admin page 173 180 174 181 = 2.2.2 - Mar/9/2016 =
Note: See TracChangeset
for help on using the changeset viewer.