Changeset 1373382
- Timestamp:
- 03/17/2016 08:25:00 PM (10 years ago)
- Location:
- opentickets-community-edition/trunk
- Files:
-
- 6 edited
-
inc/core/post-type.class.php (modified) (1 diff)
-
inc/event-area/general-admission-zoner.class.php (modified) (3 diffs)
-
inc/event-area/zoner-query.class.php (modified) (2 diffs)
-
launcher.php (modified) (2 diffs)
-
opentickets.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
opentickets-community-edition/trunk/inc/core/post-type.class.php
r1367916 r1373382 1068 1068 } else return; 1069 1069 1070 // remove the cascade thumbnail logic because it interfers with the child event thumb selection 1071 remove_filter( 'post_thumbnail_html', array( __CLASS__, 'cascade_thumbnail' ), 10, 5 ); 1072 remove_filter( 'get_post_metadata', array( __CLASS__, 'cascade_thumbnail_id' ), 10, 4 ); 1073 1074 wp_enqueue_script( 'set-post-thumbnail' ); 1070 1075 // load the eit page js, which also loads all it's dependencies 1071 1076 wp_enqueue_script('qsot-events-admin-edit-page'); -
opentickets-community-edition/trunk/inc/event-area/general-admission-zoner.class.php
r1368520 r1373382 190 190 $find_args = $lock_args; 191 191 unset( $find_args['quantity'] ); 192 $find_args['before'] = $lock->since ;192 $find_args['before'] = $lock->since . '.' . $lock->mille; 193 193 $find_args['state'] = $this->stati['r'][0]; 194 194 … … 216 216 'state' => '*', 217 217 'fields' => 'total', 218 'before' => $lock->since ,219 ) ); 218 'before' => $lock->since . '.' . $lock->mille, 219 ) ); // remove $lock_for, because this query includes the lock itself now 220 220 $my_total_before_lock = $this->find( array( 221 221 'event_id' => $args['event_id'], … … 223 223 'order_id' => array_unique( array( 0, isset( WC()->session->order_awaiting_payment ) ? absint( WC()->session->order_awaiting_payment ) : 0 ) ), 224 224 'fields' => 'total', 225 'before' => $lock->since ,225 'before' => $lock->since . '.' . $lock->mille, 226 226 'ticket_type_id' => $args['ticket_type_id'], 227 227 'customer_id' => $args['customer_id'], -
opentickets-community-edition/trunk/inc/event-area/zoner-query.class.php
r1311266 r1373382 41 41 // deinitialize the object. remove actions and filter 42 42 public function deinitialize() { 43 } 44 45 // break a time value into the timestamp and the mille seconds 46 protected function _break_time( $time ) { 47 $output = array( 'time' => $time, 'mille' => 0 ); 48 // split the timestamp into the two parts, timestamp and mille 49 $time = explode( '.', $time ); 50 51 // if the mille is set, use it 52 if ( count( $time ) > 1 ) 53 $output['mille'] = absint( array_pop( $time ) ); 54 55 // set the timestamp to just the mysql timestamp 56 $output['time'] = current( $time ); 57 58 // normalize that time stamp into a mysql format 59 if ( is_numeric( $output['time'] ) ) 60 $output['time'] = date( 'Y-m-d H:i:s', $output['time'] ); 61 62 // validate the timestamp, and scratch it if not valid 63 if ( ! preg_match( '#\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?#', $output['time'] ) || strtotime( $output['time'] ) <= 0 ) 64 $output['time'] = ''; 65 66 return $output; 43 67 } 44 68 … … 101 125 // handle before and after, in relation to the 'since' field 102 126 if ( '' !== $args['before'] ) { 103 if ( preg_match( '#\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?#', $args['before'] ) ) 104 $where[] = $wpdb->prepare( 'and since < %s', $args['before'] ); 105 else if ( is_numeric( $args['before'] ) ) 106 $where[] = $wpdb->prepare( 'and since < %s', date( 'Y-m-d H:i:s', $args['before'] ) ); 127 $op = '<'; 128 $args['before'] = $this->_break_time( $args['before'] ); 129 if ( isset( $args['before']['time'], $args['before']['mille'] ) && $args['before']['time'] ) { 130 $where[] = $wpdb->prepare( 131 'and ( since ' . $op . ' %s or ( since = %s and mille ' . $op . ' %d ) )', 132 $args['before']['time'], 133 $args['before']['time'], 134 $args['before']['mille'] 135 ); 136 } 107 137 } 108 138 if ( '' !== $args['after'] ) { 109 if ( preg_match( '#\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?#', $args['after'] ) ) 110 $where[] = $wpdb->prepare( 'and since < %s', $args['after'] ); 111 else if ( is_numeric( $args['after'] ) ) 112 $where[] = $wpdb->prepare( 'and since < %s', date( 'Y-m-d H:i:s', $args['after'] ) ); 139 $op = '>'; 140 $args['after'] = $this->_break_time( $args['after'] ); 141 if ( isset( $args['after']['time'], $args['after']['mille'] ) && $args['after']['time'] ) { 142 $where[] = $wpdb->prepare( 143 'and ( since ' . $op . ' %s or ( since = %s and mille ' . $op . ' %d ) )', 144 $args['after']['time'], 145 $args['after']['time'], 146 $args['after']['mille'] 147 ); 148 } 113 149 } 114 150 -
opentickets-community-edition/trunk/launcher.php
r1369465 r1373382 4 4 * Plugin URI: http://opentickets.com/ 5 5 * Description: Event Management and Online Ticket Sales Platform 6 * Version: 2.2. 36 * Version: 2.2.4 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. 3',56 'version' => '2.2.4', 57 57 'min_wc_version' => '2.4.12', 58 58 'core_post_type' => 'qsot-event', -
opentickets-community-edition/trunk/opentickets.php
r1367916 r1373382 81 81 // add an admin footer promo text bit. sorry guys we need this 82 82 add_action( 'admin_footer_text', array( __CLASS__, 'admin_footer_text' ), PHP_INT_MAX, 1 ); 83 84 // if in the admin, make sure to record the first date this user has been using this software 85 if ( is_admin() ) 86 self::_check_used_since(); 83 87 } 84 88 … … 712 716 713 717 return true; 718 } 719 720 // make sure we record the earliest known date that this site started using our software 721 protected static function _check_used_since() { 722 // get the current value 723 $current = get_option( '_qsot_used_since', '' ); 724 725 // if the current value does not exist, then try to set it to the publish date of the first event 726 if ( '' == $current || ! strtotime( $current ) ) { 727 global $wpdb; 728 $event_date = $wpdb->get_var( $wpdb->prepare( 'select post_date from ' . $wpdb->posts . ' where post_type = %s order by post_date asc, id asc', self::$o->core_post_type ) ); 729 // if we found the date, then use it 730 if ( $event_date ) 731 update_option( '_qsot_used_since', $current = $event_date ); 732 // otherwise, use today 733 else 734 update_option( '_qsot_used_since', current_time( 'mysql' ) ); 735 } 714 736 } 715 737 -
opentickets-community-edition/trunk/readme.txt
r1369465 r1373382 171 171 172 172 == Changelog == 173 174 = 2.2.4 - Mar/17/2016 = 175 * [tweak] changed all reservation checks to use millesecond precision 176 * [fix] resolved child event featured image issue 173 177 174 178 = 2.2.3 - Mar/11/2016 =
Note: See TracChangeset
for help on using the changeset viewer.