Changeset 1647408
- Timestamp:
- 04/28/2017 12:45:25 PM (9 years ago)
- Location:
- opentickets-community-edition/trunk
- Files:
-
- 8 edited
-
assets/js/admin/order/new-user.js (modified) (4 diffs)
-
inc/core/post-type.class.php (modified) (2 diffs)
-
inc/event-area/post-type.class.php (modified) (1 diff)
-
inc/sys/extensions/settings/licenses.php (modified) (5 diffs)
-
inc/sys/extensions/updater.php (modified) (4 diffs)
-
inc/ticket/product.class.php (modified) (2 diffs)
-
launcher.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
opentickets-community-edition/trunk/assets/js/admin/order/new-user.js
r1274167 r1647408 2 2 var d = $(document); /// THIS.... is dumb 3 3 var settings = _qsot_new_user || {}; 4 var qt = QS.Tools; 4 5 5 6 if (typeof settings.templates != 'object') return; 6 7 var form = undefined; 8 9 // dumb we have to do this with select2 v4 10 function _select2_update_data( control, data, select_value ) { 11 // empty the select element 12 control.find( 'option' ).remove(); 13 14 data = qt.isO( data ) && qt.is( data.results ) ? data.results : data; 15 // add a new item to the element for each possible value 16 $.each( data, function( k, row ) { 17 $( '<option></option>' ).html( row.text ).attr( 'value', row.id ).appendTo( control ); 18 } ); 19 20 // if the select value is set, use it 21 if ( select_value ) 22 control.val( select_value ); 23 24 // refresh the select2 element 25 control.trigger( 'change' ); 26 } 7 27 8 28 function load_customer_billing_information() { … … 30 50 success: function( response ) { 31 51 var info = response; 52 console.log( 'loaded billing', info ); 32 53 33 if (info) { 54 if (info && info.billing) { 55 $('input#_billing.first_name').val( info.billing.first_name ); 56 $('input#_billing.last_name').val( info.billing.last_name ); 57 $('input#_billing.company').val( info.billing.company ); 58 $('input#_billing.address_1').val( info.billing.address_1 ); 59 $('input#_billing.address_2').val( info.billing.address_2 ); 60 $('input#_billing.city').val( info.billing.city ); 61 $('input#_billing.postcode').val( info.billing.postcode ); 62 $('#_billing.country').val( info.billing.country ); 63 $('input#_billing.state').val( info.billing.state ); 64 $('input#_billing.email').val( info.billing.email ); 65 $('input#_billing.phone').val( info.billing.phone ); 66 } else if ( info && info.billing_first_name ) { 34 67 $('input#_billing_first_name').val( info.billing_first_name ); 35 68 $('input#_billing_last_name').val( info.billing_last_name ); … … 80 113 81 114 $(function() { 82 d.on('select2 -selecting data-updated', '#customer_user', function() {115 d.on('select2:selecting data-updated', '#customer_user', function() { 83 116 if ($(this).val() != '') { 84 117 $('._billing_first_name_field').closest('.order_data_column').find('a.edit_address').click();//.closest('.order_data_column').find('button.load_customer_billing').click(); … … 111 144 dia.unblock(); 112 145 if (r.s) { 113 $( '#customer_user' ).select2( 'data', $.extend( {}, r.c ) ).trigger( 'data-updated' ); 146 _select2_update_data( $( '#customer_user' ), [r.c], r.c.id ); 147 $( '#customer_user' ).trigger( 'data-updated' ); 114 148 form.dialog('close'); 115 149 form.find('input').val(''); -
opentickets-community-edition/trunk/inc/core/post-type.class.php
r1624856 r1647408 305 305 $fields = array(); 306 306 $join = array(); 307 $where = array( );307 $where = array( 'and pm.meta_value != "" and pm.meta_value != 0' ); 308 308 $fmt = 'Y-m-d H:i:s'; 309 309 … … 1862 1862 1863 1863 // get just the date and time portions 1864 $start_time = date( QSOT_Date_Formats::php_date_format( 'g:ia' ), QSOT_Utils:: gmt_timestamp( $start, 'from', 'g:ia') );1865 $end_time = date( QSOT_Date_Formats::php_date_format( 'g:ia' ), QSOT_Utils:: gmt_timestamp( $end, 'from', 'g:ia') );1864 $start_time = date( QSOT_Date_Formats::php_date_format( 'g:ia' ), QSOT_Utils::local_timestamp( $start ) ); 1865 $end_time = date( QSOT_Date_Formats::php_date_format( 'g:ia' ), QSOT_Utils::local_timestamp( $end ) ); 1866 1866 1867 1867 // render the settings box -
opentickets-community-edition/trunk/inc/event-area/post-type.class.php
r1634310 r1647408 843 843 protected function _draw_item_ticket_info( $item_id, $item, $product, $edit=false ) { 844 844 // if the product is not a ticket, then never display event meta 845 if ( get_post_meta( $product->get_id(), '_ticket', true ) != 'yes' )845 if ( ! is_object( $product ) || get_post_meta( $product->get_id(), '_ticket', true ) != 'yes' ) 846 846 return; 847 847 -
opentickets-community-edition/trunk/inc/sys/extensions/settings/licenses.php
r1536371 r1647408 35 35 // add a hook that runs on loading of this page, which checks if there are any onetime requests, like deactivating a license 36 36 @list( $uri, $hook ) = apply_filters( 'qsot-get-menu-page-uri', '', 'settings' ); 37 add_action( 'load-' . $hook, array( &$this, 'maybe_one_time_requests' ), 1 ); 37 if ( did_action( 'load-' . $hook ) ) 38 $this->maybe_one_time_requests(); 39 else 40 add_action( 'load-' . $hook, array( &$this, 'maybe_one_time_requests' ), 1 ); 38 41 } 39 42 … … 240 243 if ( empty( $list ) ) { 241 244 update_option( 'qsot-licenses', array(), 'no' ); 245 do_action( 'qsot-force-update-check', true ); 242 246 return; 243 247 } … … 260 264 261 265 // if there are no licenses that are trying to be activated, then just bail 262 if ( empty( $request ) ) 266 if ( empty( $request ) ) { 267 do_action( 'qsot-force-update-check', true ); 263 268 return; 269 } 264 270 265 271 // get the api response for activation … … 275 281 $errors = $this->_array_from_error( $response ); 276 282 update_option( 'qsot-licenses-error', $errors, 'no' ); 283 do_action( 'qsot-force-update-check', true ); 277 284 return; 278 285 } … … 297 304 // finally, update our option containing the option status for each item 298 305 QSOT_Extensions::instance()->save_licenses( $list ); 306 do_action( 'qsot-force-update-check', true ); 299 307 } 300 308 -
opentickets-community-edition/trunk/inc/sys/extensions/updater.php
r1592531 r1647408 15 15 add_filter( 'pre_http_request', array( __CLASS__, 'check_for_updates' ), 10000, 3 ); 16 16 17 // allow a force update check 18 add_action( 'qsot-force-update-check', array( __CLASS__, 'force_update_check' ), 10000, 1 ); 19 17 20 // infuse our last extension update check response into the list of plugin updates for the site 18 21 //add_filter( 'pre_set_site_transient_update_plugins', array( __CLASS__, 'add_extension_updates_to_plugin_updates' ), 10000, 1 ); … … 43 46 return $response; 44 47 48 return self::force_update_check( false, $response ); 49 } 50 51 // force an update check for our plugins 52 public static function force_update_check( $force_update=false, $response=null ) { 45 53 // maybe trigger our additional updater logic 46 $extra = self::_maybe_extension_updates( );54 $extra = self::_maybe_extension_updates( $force_update ); 47 55 48 56 // if there are no extra updates to add to the list, or if there are any errors, then bail right here … … 52 60 // store the result for later use 53 61 update_option( self::$ns . 'updater-response', @base64_encode( @json_encode( $extra ) ), 'no' ); 62 63 // if we are forcing an update of plugins list, do that now 64 if ( $force_update ) { 65 $current = get_site_transient( 'update_plugins' ); 66 set_site_transient( 'update_plugins', $current ); 67 } 54 68 55 69 return $response; … … 208 222 209 223 // maybe trigger our manual extensions updates, if we are being forced to or if the timer has expired 210 protected static function _maybe_extension_updates( ) {224 protected static function _maybe_extension_updates( $force=false ) { 211 225 // figure out the expiration of our last fetch, and if this is a force request 212 226 $expires = get_option( 'qsot-extensions-updater-last-expires', 0 ); 213 $is_force = isset( $_GET['force-check'] ) && 1 == $_GET['force-check'];227 $is_force = $force || ( isset( $_GET['force-check'] ) && 1 == $_GET['force-check'] ); 214 228 215 229 // if the last fetch is not expired, and this is not a force request, then bail -
opentickets-community-edition/trunk/inc/ticket/product.class.php
r1644954 r1647408 96 96 // fetch a list of all ticket products, and add their various pricing metas to the result 97 97 public static function get_all_ticket_products( $list, $format='objects' ) { 98 global $QSOT_WC3; 98 99 // args used in the get_post() method to find all ticket products 99 100 $args = array( … … 139 140 // add some of the basic meta for pricing 140 141 $ticket->post->meta = array(); 141 $ticket->post->meta['price_raw'] = $ ticket->price;142 $ticket->post->meta['price_html'] = wc_price( $ticket->post->meta['price_raw']);143 $ticket->post->meta['price'] = apply_filters( 'qsot-price-formatted', $ticket->post->meta['price_raw']);142 $ticket->post->meta['price_raw'] = $QSOT_WC3->product_data( $ticket, 'price' ); 143 $ticket->post->meta['price_html'] = wc_price( $ticket->post->meta['price_raw'] ); 144 $ticket->post->meta['price'] = apply_filters( 'qsot-price-formatted', $ticket->post->meta['price_raw'] ); 144 145 145 146 // shorthand the propername of the ticket, so we dont have to keep doing it 146 $ticket->post->proper_name = apply_filters( 'the_title', $ticket->get_title(), $ ticket->id );147 $ticket->post->proper_name = apply_filters( 'the_title', $ticket->get_title(), $id ); 147 148 148 149 // add the ticket to the indexed return list 149 $tickets[ '' . $ ticket->post->ID] = $ticket;150 $tickets[ '' . $id ] = $ticket; 150 151 } 151 152 -
opentickets-community-edition/trunk/launcher.php
r1644954 r1647408 4 4 * Plugin URI: http://opentickets.com/ 5 5 * Description: Event Management and Online Ticket Sales Platform 6 * Version: 2.8. 16 * Version: 2.8.2 7 7 * Author: Quadshot Software LLC 8 8 * Author URI: http://quadshot.com/ … … 55 55 'fctm' => 'fc', 56 56 'always_reserve' => 0, 57 'version' => '2.8. 1',57 'version' => '2.8.2', 58 58 'min_wc_version' => '2.6.14', 59 59 'core_post_type' => 'qsot-event', -
opentickets-community-edition/trunk/readme.txt
r1644954 r1647408 172 172 == Changelog == 173 173 174 = 2.8.1 - Apr/10/2017 = 174 = 2.8.2 - Apr/28/2017 = 175 * [fix] fixing new user button issue on edit-order admin screen 176 * [fix] fixing license key removal issue 177 * [fix] fixing extension update detection issue by making update checks more aggressive and vastly more numerous 178 179 = 2.8.1 - Apr/25/2017 = 175 180 * [tweak] more changes to resolve WC3 compatibility issues, when OTCE is used with extensions 181 * [tweak] changes to core plugin so that extensions work with new WC 176 182 177 183 = 2.8.0 - Apr/10/2017 =
Note: See TracChangeset
for help on using the changeset viewer.