Completed
Branch BUG/11214/move-command-handler... (de017e)
by
unknown
04:20 queued 02:32
created
modules/invalid_checkout_access/InvalidCheckoutAccess.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 		if (
40 40
 			! ( $checkout->uts || $checkout->reg_url_link )
41 41
 			&& ! ( defined( 'DOING_AJAX' ) && DOING_AJAX )
42
-            && \EE_Config::instance()->registration->track_invalid_checkout_access()
43
-        ) {
42
+			&& \EE_Config::instance()->registration->track_invalid_checkout_access()
43
+		) {
44 44
 			/** @var \EE_Request $request */
45 45
 			$request = \EE_Registry::instance()->load_core( 'EE_Request' );
46 46
 			$ip_address = $request->ip_address();
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 			}
61 61
 			$ee_bot_checkout[ $ip_address ][ $http_referer ]++;
62 62
 			update_option( InvalidCheckoutAccess::OPTION_KEY, $ee_bot_checkout );
63
-            if (WP_DEBUG) {
64
-                \EE_Error::add_error(
65
-                    esc_html__('Direct access to the registration checkout page is not allowed.', 'event_espresso'),
66
-                    __FILE__,
67
-                    __FUNCTION__,
68
-                    __LINE__
69
-                );
70
-            }
63
+			if (WP_DEBUG) {
64
+				\EE_Error::add_error(
65
+					esc_html__('Direct access to the registration checkout page is not allowed.', 'event_espresso'),
66
+					__FILE__,
67
+					__FUNCTION__,
68
+					__LINE__
69
+				);
70
+			}
71 71
 			return true;
72 72
 		}
73 73
 		return false;
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\modules\invalid_checkout_access;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -35,31 +35,31 @@  discard block
 block discarded – undo
35 35
 	 * @param \EE_Checkout $checkout
36 36
 	 * @return bool true if access to registration checkout appears to be invalid
37 37
 	 */
38
-	public function checkoutAccessIsInvalid( \EE_Checkout $checkout ) {
38
+	public function checkoutAccessIsInvalid(\EE_Checkout $checkout) {
39 39
 		if (
40
-			! ( $checkout->uts || $checkout->reg_url_link )
41
-			&& ! ( defined( 'DOING_AJAX' ) && DOING_AJAX )
40
+			! ($checkout->uts || $checkout->reg_url_link)
41
+			&& ! (defined('DOING_AJAX') && DOING_AJAX)
42 42
             && \EE_Config::instance()->registration->track_invalid_checkout_access()
43 43
         ) {
44 44
 			/** @var \EE_Request $request */
45
-			$request = \EE_Registry::instance()->load_core( 'EE_Request' );
45
+			$request = \EE_Registry::instance()->load_core('EE_Request');
46 46
 			$ip_address = $request->ip_address();
47
-			$ee_bot_checkout = get_option( InvalidCheckoutAccess::OPTION_KEY );
48
-			if ( $ee_bot_checkout === false ) {
47
+			$ee_bot_checkout = get_option(InvalidCheckoutAccess::OPTION_KEY);
48
+			if ($ee_bot_checkout === false) {
49 49
 				$ee_bot_checkout = array();
50
-				add_option( InvalidCheckoutAccess::OPTION_KEY, $ee_bot_checkout, '', false );
50
+				add_option(InvalidCheckoutAccess::OPTION_KEY, $ee_bot_checkout, '', false);
51 51
 			}
52
-			if ( ! isset( $ee_bot_checkout[ $ip_address ] ) ) {
53
-				$ee_bot_checkout[ $ip_address ] = array();
52
+			if ( ! isset($ee_bot_checkout[$ip_address])) {
53
+				$ee_bot_checkout[$ip_address] = array();
54 54
 			}
55
-			$http_referer = isset( $_SERVER['HTTP_REFERER'] )
56
-				? esc_attr( $_SERVER['HTTP_REFERER'] )
55
+			$http_referer = isset($_SERVER['HTTP_REFERER'])
56
+				? esc_attr($_SERVER['HTTP_REFERER'])
57 57
 				: 0;
58
-			if ( ! isset( $ee_bot_checkout[ $ip_address ][ $http_referer ] ) ) {
59
-				$ee_bot_checkout[ $ip_address ][ $http_referer ] = 0;
58
+			if ( ! isset($ee_bot_checkout[$ip_address][$http_referer])) {
59
+				$ee_bot_checkout[$ip_address][$http_referer] = 0;
60 60
 			}
61
-			$ee_bot_checkout[ $ip_address ][ $http_referer ]++;
62
-			update_option( InvalidCheckoutAccess::OPTION_KEY, $ee_bot_checkout );
61
+			$ee_bot_checkout[$ip_address][$http_referer]++;
62
+			update_option(InvalidCheckoutAccess::OPTION_KEY, $ee_bot_checkout);
63 63
             if (WP_DEBUG) {
64 64
                 \EE_Error::add_error(
65 65
                     esc_html__('Direct access to the registration checkout page is not allowed.', 'event_espresso'),
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 				'layout_strategy' => new \EE_Admin_Two_Column_Layout(),
89 89
 				'subsections'     => array(
90 90
 					'invalid_checkout_access_hdr'   => new \EE_Form_Section_HTML(
91
-						\EEH_HTML::h2( esc_html__( 'Invalid Checkout Access', 'event_espresso' ) )
91
+						\EEH_HTML::h2(esc_html__('Invalid Checkout Access', 'event_espresso'))
92 92
 					),
93 93
 					'ee_bot_checkout_data'          => new \EE_Text_Area_Input(
94 94
 						array(
95
-							'html_label_text' => esc_html__( 'Invalid Checkout Data', 'event_espresso' ),
95
+							'html_label_text' => esc_html__('Invalid Checkout Data', 'event_espresso'),
96 96
 							'default'         => var_export(
97
-								get_option( InvalidCheckoutAccess::OPTION_KEY, array() ),
97
+								get_option(InvalidCheckoutAccess::OPTION_KEY, array()),
98 98
 								true
99 99
 							),
100 100
 							'required'        => false,
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 					),
107 107
 					'track_invalid_checkout_access' => new \EE_Yes_No_Input(
108 108
 						array(
109
-							'html_label_text'         => __( 'Track Invalid Checkout Access?', 'event_espresso' ),
109
+							'html_label_text'         => __('Track Invalid Checkout Access?', 'event_espresso'),
110 110
 							'html_help_text'          => esc_html__(
111 111
 								'Controls whether or not invalid attempts to directly access the registration checkout page should be tracked. Setting this to "No" means that the above data will no longer be collected.',
112 112
 								'event_espresso'
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 					),
120 120
 					'delete_invalid_checkout_data'  => new \EE_Yes_No_Input(
121 121
 						array(
122
-							'html_label_text'         => __( 'Reset Invalid Checkout Data', 'event_espresso' ),
122
+							'html_label_text'         => __('Reset Invalid Checkout Data', 'event_espresso'),
123 123
 							'html_help_text'          => esc_html__(
124 124
 								'Setting this to "Yes" will delete all existing invalid checkout access data.',
125 125
 								'event_espresso'
@@ -141,15 +141,15 @@  discard block
 block discarded – undo
141 141
 	 * @param \EE_Registration_Config $EE_Registration_Config
142 142
 	 * @return \EE_Registration_Config
143 143
 	 */
144
-	public function processForm( \EE_Registration_Config $EE_Registration_Config ) {
144
+	public function processForm(\EE_Registration_Config $EE_Registration_Config) {
145 145
 		try {
146 146
 			$invalid_checkout_access_form = $this->getForm();
147 147
 			// if not displaying a form, then check for form submission
148
-			if ( $invalid_checkout_access_form->was_submitted() ) {
148
+			if ($invalid_checkout_access_form->was_submitted()) {
149 149
 				// capture form data
150 150
 				$invalid_checkout_access_form->receive_form_submission();
151 151
 				// validate form data
152
-				if ( $invalid_checkout_access_form->is_valid() ) {
152
+				if ($invalid_checkout_access_form->is_valid()) {
153 153
 					// grab validated data from form
154 154
 					$valid_data = $invalid_checkout_access_form->valid_data();
155 155
 					// ensure form inputs we want are set
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 							$valid_data['track_invalid_checkout_access']
164 164
 						);
165 165
 						// if deleting, then update option with empty array
166
-						if ( filter_var( $valid_data['delete_invalid_checkout_data'], FILTER_VALIDATE_BOOLEAN ) ) {
167
-							update_option( InvalidCheckoutAccess::OPTION_KEY, array() );
166
+						if (filter_var($valid_data['delete_invalid_checkout_data'], FILTER_VALIDATE_BOOLEAN)) {
167
+							update_option(InvalidCheckoutAccess::OPTION_KEY, array());
168 168
 						}
169 169
 					} else {
170 170
 						\EE_Error::add_error(
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 						);
179 179
 					}
180 180
 				} else {
181
-					if ( $invalid_checkout_access_form->submission_error_message() !== '' ) {
181
+					if ($invalid_checkout_access_form->submission_error_message() !== '') {
182 182
 						\EE_Error::add_error(
183 183
 							$invalid_checkout_access_form->submission_error_message(),
184 184
 							__FILE__,
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 					}
189 189
 				}
190 190
 			}
191
-		} catch ( \EE_Error $e ) {
191
+		} catch (\EE_Error $e) {
192 192
 			$e->get_error();
193 193
 		}
194 194
 		return $EE_Registration_Config;
Please login to merge, or discard this patch.
libraries/messages/data_class/EE_Messages_Preview_incoming_data.class.php 2 patches
Indentation   +553 added lines, -553 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
4
-    exit('NO direct script access allowed');
4
+	exit('NO direct script access allowed');
5 5
 }
6 6
 
7 7
 /**
@@ -24,585 +24,585 @@  discard block
 block discarded – undo
24 24
 class EE_Messages_Preview_incoming_data extends EE_Messages_incoming_data
25 25
 {
26 26
     
27
-    //some specific properties we need for this class
28
-    private $_events = array();
29
-    private $_attendees = array();
30
-    private $_registrations = array();
27
+	//some specific properties we need for this class
28
+	private $_events = array();
29
+	private $_attendees = array();
30
+	private $_registrations = array();
31 31
     
32 32
     
33
-    /**
34
-     * For the constructor of this special preview class.  We're either looking for an event id or empty data.  If we
35
-     * have an event id (or ids) then we'll use that as the source for the "dummy" data.  If the data is empty then
36
-     * we'll get the first three published events from the users database and use that as a source.
37
-     *
38
-     * @param array $data
39
-     */
40
-    public function __construct($data = array())
41
-    {
42
-        $this->_data = isset($data['event_ids']) ? $data['event_ids'] : array();
43
-        $this->_setup_attendees_events();
44
-        parent::__construct($data);
45
-    }
33
+	/**
34
+	 * For the constructor of this special preview class.  We're either looking for an event id or empty data.  If we
35
+	 * have an event id (or ids) then we'll use that as the source for the "dummy" data.  If the data is empty then
36
+	 * we'll get the first three published events from the users database and use that as a source.
37
+	 *
38
+	 * @param array $data
39
+	 */
40
+	public function __construct($data = array())
41
+	{
42
+		$this->_data = isset($data['event_ids']) ? $data['event_ids'] : array();
43
+		$this->_setup_attendees_events();
44
+		parent::__construct($data);
45
+	}
46 46
     
47 47
     
48
-    /**
49
-     * Returns database safe representation of the data later used to when instantiating this object.
50
-     *
51
-     * @param array $data The incoming data to be prepped.
52
-     *
53
-     * @return array   The prepped data for db
54
-     */
55
-    static public function convert_data_for_persistent_storage($data)
56
-    {
57
-        return $data;
58
-    }
48
+	/**
49
+	 * Returns database safe representation of the data later used to when instantiating this object.
50
+	 *
51
+	 * @param array $data The incoming data to be prepped.
52
+	 *
53
+	 * @return array   The prepped data for db
54
+	 */
55
+	static public function convert_data_for_persistent_storage($data)
56
+	{
57
+		return $data;
58
+	}
59 59
     
60 60
     
61
-    /**
62
-     * Data that has been stored in persistent storage that was prepped by _convert_data_for_persistent_storage
63
-     * can be sent into this method and converted back into the format used for instantiating with this data handler.
64
-     *
65
-     * @param array $data
66
-     *
67
-     * @return array
68
-     */
69
-    static public function convert_data_from_persistent_storage($data)
70
-    {
71
-        return $data;
72
-    }
61
+	/**
62
+	 * Data that has been stored in persistent storage that was prepped by _convert_data_for_persistent_storage
63
+	 * can be sent into this method and converted back into the format used for instantiating with this data handler.
64
+	 *
65
+	 * @param array $data
66
+	 *
67
+	 * @return array
68
+	 */
69
+	static public function convert_data_from_persistent_storage($data)
70
+	{
71
+		return $data;
72
+	}
73 73
     
74 74
     
75
-    /**
76
-     * This will just setup the _events property in the expected format.
77
-     *
78
-     * @throws \EE_Error
79
-     */
80
-    private function _setup_attendees_events()
81
-    {
82
-        
83
-        //setup some attendee objects
84
-        $attendees = $this->_get_some_attendees();
85
-        
86
-        //if empty $data we'll do a query to get some events from the server. otherwise we'll retrieve the event data for the given ids.
87
-        $events = $this->_get_some_events($this->_data);
88
-        
89
-        $answers_n_questions = $this->_get_some_q_and_as();
90
-        
91
-        if (count($events) < 1) {
92
-            throw new EE_Error(__('We can\'t generate a preview for you because there are no active events in your database',
93
-                'event_espresso'));
94
-        }
95
-        
96
-        
97
-        //now let's loop and set up the _events property.  At the same time we'll set up attendee properties.
98
-        
99
-        
100
-        //we'll actually use the generated line_item identifiers for our loop
101
-        $dtts = $tkts = array();
102
-        foreach ($events as $id => $event) {
103
-            if ( ! $event instanceof EE_Event) {
104
-                continue;
105
-            }
106
-            $this->_events[$id]['ID']       = $id;
107
-            $this->_events[$id]['name']     = $event->get('EVT_name');
108
-            $datetime                       = $event->get_first_related('Datetime');
109
-            $tickets                        = $datetime instanceof EE_Datetime ? $datetime->get_many_related('Ticket',
110
-                array('default_where_conditions' => 'none')) : array();
111
-            $this->_events[$id]['event']    = $event;
112
-            $this->_events[$id]['reg_objs'] = array();
113
-            $this->_events[$id]['tkt_objs'] = $tickets;
114
-            $this->_events[$id]['dtt_objs'] = array();
75
+	/**
76
+	 * This will just setup the _events property in the expected format.
77
+	 *
78
+	 * @throws \EE_Error
79
+	 */
80
+	private function _setup_attendees_events()
81
+	{
82
+        
83
+		//setup some attendee objects
84
+		$attendees = $this->_get_some_attendees();
85
+        
86
+		//if empty $data we'll do a query to get some events from the server. otherwise we'll retrieve the event data for the given ids.
87
+		$events = $this->_get_some_events($this->_data);
88
+        
89
+		$answers_n_questions = $this->_get_some_q_and_as();
90
+        
91
+		if (count($events) < 1) {
92
+			throw new EE_Error(__('We can\'t generate a preview for you because there are no active events in your database',
93
+				'event_espresso'));
94
+		}
95
+        
96
+        
97
+		//now let's loop and set up the _events property.  At the same time we'll set up attendee properties.
98
+        
99
+        
100
+		//we'll actually use the generated line_item identifiers for our loop
101
+		$dtts = $tkts = array();
102
+		foreach ($events as $id => $event) {
103
+			if ( ! $event instanceof EE_Event) {
104
+				continue;
105
+			}
106
+			$this->_events[$id]['ID']       = $id;
107
+			$this->_events[$id]['name']     = $event->get('EVT_name');
108
+			$datetime                       = $event->get_first_related('Datetime');
109
+			$tickets                        = $datetime instanceof EE_Datetime ? $datetime->get_many_related('Ticket',
110
+				array('default_where_conditions' => 'none')) : array();
111
+			$this->_events[$id]['event']    = $event;
112
+			$this->_events[$id]['reg_objs'] = array();
113
+			$this->_events[$id]['tkt_objs'] = $tickets;
114
+			$this->_events[$id]['dtt_objs'] = array();
115 115
             
116
-            $dttcache = array();
117
-            $tkts     = array();
118
-            foreach ($tickets as $ticket) {
119
-                if ( ! $ticket instanceof EE_Ticket) {
120
-                    continue;
121
-                }
122
-                $reldatetime                     = $ticket->datetimes();
123
-                $tkts[$ticket->ID()]             = array();
124
-                $tkts[$ticket->ID()]['ticket']   = $ticket;
125
-                $tkts[$ticket->ID()]['dtt_objs'] = $reldatetime;
126
-                $tkts[$ticket->ID()]['att_objs'] = $attendees;
127
-                $tkts[$ticket->ID()]['count']    = count($attendees);
128
-                $tkts[$ticket->ID()]['EE_Event'] = $event;
129
-                foreach ($reldatetime as $datetime) {
130
-                    if ($datetime instanceof EE_Datetime && ! isset($dtts[$datetime->ID()])) {
131
-                        $this->_events[$id]['dtt_objs'][$datetime->ID()] = $datetime;
132
-                        $dtts[$datetime->ID()]['datetime']               = $datetime;
133
-                        $dtts[$datetime->ID()]['tkt_objs'][]             = $ticket;
134
-                        $dtts[$datetime->ID()]['evt_objs'][]             = $event;
135
-                        $dttcache[$datetime->ID()]                       = $datetime;
136
-                    }
137
-                }
138
-            }
116
+			$dttcache = array();
117
+			$tkts     = array();
118
+			foreach ($tickets as $ticket) {
119
+				if ( ! $ticket instanceof EE_Ticket) {
120
+					continue;
121
+				}
122
+				$reldatetime                     = $ticket->datetimes();
123
+				$tkts[$ticket->ID()]             = array();
124
+				$tkts[$ticket->ID()]['ticket']   = $ticket;
125
+				$tkts[$ticket->ID()]['dtt_objs'] = $reldatetime;
126
+				$tkts[$ticket->ID()]['att_objs'] = $attendees;
127
+				$tkts[$ticket->ID()]['count']    = count($attendees);
128
+				$tkts[$ticket->ID()]['EE_Event'] = $event;
129
+				foreach ($reldatetime as $datetime) {
130
+					if ($datetime instanceof EE_Datetime && ! isset($dtts[$datetime->ID()])) {
131
+						$this->_events[$id]['dtt_objs'][$datetime->ID()] = $datetime;
132
+						$dtts[$datetime->ID()]['datetime']               = $datetime;
133
+						$dtts[$datetime->ID()]['tkt_objs'][]             = $ticket;
134
+						$dtts[$datetime->ID()]['evt_objs'][]             = $event;
135
+						$dttcache[$datetime->ID()]                       = $datetime;
136
+					}
137
+				}
138
+			}
139 139
             
140
-            $this->_events[$id]['total_attendees'] = count($attendees);
141
-            $this->_events[$id]['att_objs']        = $attendees;
140
+			$this->_events[$id]['total_attendees'] = count($attendees);
141
+			$this->_events[$id]['att_objs']        = $attendees;
142 142
             
143
-            //let's also setup the dummy attendees property!
144
-            foreach ($attendees as $att_key => $attendee) {
145
-                if ( ! $attendee instanceof EE_Attendee) {
146
-                    continue;
147
-                }
148
-                $this->_attendees[$att_key]['line_ref'][] = $id;  //so later it can be determined what events this attendee registered for!
149
-                $this->_attendees[$att_key]['evt_objs'][] = $event;
150
-                $this->_attendees[$att_key]['att_obj']    = $attendee;
151
-                //$this->_attendees[$att_key]['registration_id'] = 0;
152
-                $this->_attendees[$att_key]['attendee_email'] = $attendee->email();
153
-                $this->_attendees[$att_key]['tkt_objs']       = $tickets;
154
-                if ($att_key == 999999991) {
155
-                    $this->_attendees[$att_key]['ans_objs'][999]  = $answers_n_questions['answers'][999];
156
-                    $this->_attendees[$att_key]['ans_objs'][1002] = $answers_n_questions['answers'][1002];
157
-                    $this->_attendees[$att_key]['ans_objs'][1005] = $answers_n_questions['answers'][1005];
158
-                } elseif ($att_key == 999999992) {
159
-                    $this->_attendees[$att_key]['ans_objs'][1000] = $answers_n_questions['answers'][1000];
160
-                    $this->_attendees[$att_key]['ans_objs'][1003] = $answers_n_questions['answers'][1003];
161
-                    $this->_attendees[$att_key]['ans_objs'][1006] = $answers_n_questions['answers'][1006];
162
-                } elseif ($att_key == 999999993) {
163
-                    $this->_attendees[$att_key]['ans_objs'][1001] = $answers_n_questions['answers'][1001];
164
-                    $this->_attendees[$att_key]['ans_objs'][1004] = $answers_n_questions['answers'][1004];
165
-                    $this->_attendees[$att_key]['ans_objs'][1007] = $answers_n_questions['answers'][1007];
166
-                }
167
-            }
168
-        }
169
-        
170
-        $this->tickets            = $tkts;
171
-        $this->datetimes          = $dtts;
172
-        $this->answers            = $answers_n_questions['answers'];
173
-        $this->questions          = $answers_n_questions['questions'];
174
-        $this->total_ticket_count = count($tkts) * count($this->_attendees);
175
-        
176
-    }
143
+			//let's also setup the dummy attendees property!
144
+			foreach ($attendees as $att_key => $attendee) {
145
+				if ( ! $attendee instanceof EE_Attendee) {
146
+					continue;
147
+				}
148
+				$this->_attendees[$att_key]['line_ref'][] = $id;  //so later it can be determined what events this attendee registered for!
149
+				$this->_attendees[$att_key]['evt_objs'][] = $event;
150
+				$this->_attendees[$att_key]['att_obj']    = $attendee;
151
+				//$this->_attendees[$att_key]['registration_id'] = 0;
152
+				$this->_attendees[$att_key]['attendee_email'] = $attendee->email();
153
+				$this->_attendees[$att_key]['tkt_objs']       = $tickets;
154
+				if ($att_key == 999999991) {
155
+					$this->_attendees[$att_key]['ans_objs'][999]  = $answers_n_questions['answers'][999];
156
+					$this->_attendees[$att_key]['ans_objs'][1002] = $answers_n_questions['answers'][1002];
157
+					$this->_attendees[$att_key]['ans_objs'][1005] = $answers_n_questions['answers'][1005];
158
+				} elseif ($att_key == 999999992) {
159
+					$this->_attendees[$att_key]['ans_objs'][1000] = $answers_n_questions['answers'][1000];
160
+					$this->_attendees[$att_key]['ans_objs'][1003] = $answers_n_questions['answers'][1003];
161
+					$this->_attendees[$att_key]['ans_objs'][1006] = $answers_n_questions['answers'][1006];
162
+				} elseif ($att_key == 999999993) {
163
+					$this->_attendees[$att_key]['ans_objs'][1001] = $answers_n_questions['answers'][1001];
164
+					$this->_attendees[$att_key]['ans_objs'][1004] = $answers_n_questions['answers'][1004];
165
+					$this->_attendees[$att_key]['ans_objs'][1007] = $answers_n_questions['answers'][1007];
166
+				}
167
+			}
168
+		}
169
+        
170
+		$this->tickets            = $tkts;
171
+		$this->datetimes          = $dtts;
172
+		$this->answers            = $answers_n_questions['answers'];
173
+		$this->questions          = $answers_n_questions['questions'];
174
+		$this->total_ticket_count = count($tkts) * count($this->_attendees);
175
+        
176
+	}
177 177
     
178 178
     
179
-    /**
180
-     * This just returns an array of dummy attendee objects that we'll use to attach to events for our preview data
181
-     *
182
-     * @access private
183
-     * @return array an array of attendee objects
184
-     */
185
-    private function _get_some_attendees()
186
-    {
187
-        //let's just setup a dummy array of various attendee details
188
-        $dummy_attendees = array(
189
-            0 => array(
190
-                'Luke',
191
-                'Skywalker',
192
-                '[email protected]',
193
-                '804 Bantha Dr.',
194
-                'Complex 8',
195
-                'Mos Eisley',
196
-                32,
197
-                'US',
198
-                'f0r3e',
199
-                '222-333-4763',
200
-                false,
201
-                '999999991'
202
-            ),
203
-            1 => array(
204
-                'Princess',
205
-                'Leia',
206
-                '[email protected]',
207
-                '1456 Valley Way Boulevard',
208
-                'Suite 9',
209
-                'Alderaan',
210
-                15,
211
-                'US',
212
-                'c1h2c',
213
-                '78-123-111-1111',
214
-                false,
215
-                '999999992'
216
-            ),
217
-            2 => array(
218
-                'Yoda',
219
-                'I Am',
220
-                '[email protected]',
221
-                '4th Tree',
222
-                '5th Knot',
223
-                'Marsh',
224
-                22,
225
-                'US',
226
-                'l18n',
227
-                '999-999-9999',
228
-                false,
229
-                '999999993'
230
-            ),
231
-        );
232
-        
233
-        //let's generate the attendee objects
234
-        $attendees = array();
235
-        $var_array = array(
236
-            'fname',
237
-            'lname',
238
-            'email',
239
-            'address',
240
-            'address2',
241
-            'city',
242
-            'staid',
243
-            'cntry',
244
-            'zip',
245
-            'phone',
246
-            'deleted',
247
-            'attid'
248
-        );
249
-        
250
-        //EE_Registry::instance()->load_class( 'Attendee', array(), FALSE, false, TRUE );
251
-        foreach ($dummy_attendees as $dummy) {
252
-            $att = array_combine($var_array, $dummy);
253
-            extract($att);
254
-            /** @var $fname string */
255
-            /** @var $lname string */
256
-            /** @var $address string */
257
-            /** @var $address2 string */
258
-            /** @var $city string */
259
-            /** @var $staid string */
260
-            /** @var $cntry string */
261
-            /** @var $zip string */
262
-            /** @var $email string */
263
-            /** @var $phone string */
264
-            /** @var $attid string */
265
-            $attendees[$attid] = EE_Attendee::new_instance(
266
-                array(
267
-                    'ATT_fname'    => $fname,
268
-                    'ATT_lname'    => $lname,
269
-                    'ATT_address'  => $address,
270
-                    'ATT_address2' => $address2,
271
-                    'ATT_city'     => $city,
272
-                    'STA_ID'       => $staid,
273
-                    'CNT_ISO'      => $cntry,
274
-                    'ATT_zip'      => $zip,
275
-                    'ATT_email'    => $email,
276
-                    'ATT_phone'    => $phone,
277
-                    'ATT_ID'       => $attid
278
-                )
279
-            );
280
-        }
281
-        
282
-        return $attendees;
283
-    }
179
+	/**
180
+	 * This just returns an array of dummy attendee objects that we'll use to attach to events for our preview data
181
+	 *
182
+	 * @access private
183
+	 * @return array an array of attendee objects
184
+	 */
185
+	private function _get_some_attendees()
186
+	{
187
+		//let's just setup a dummy array of various attendee details
188
+		$dummy_attendees = array(
189
+			0 => array(
190
+				'Luke',
191
+				'Skywalker',
192
+				'[email protected]',
193
+				'804 Bantha Dr.',
194
+				'Complex 8',
195
+				'Mos Eisley',
196
+				32,
197
+				'US',
198
+				'f0r3e',
199
+				'222-333-4763',
200
+				false,
201
+				'999999991'
202
+			),
203
+			1 => array(
204
+				'Princess',
205
+				'Leia',
206
+				'[email protected]',
207
+				'1456 Valley Way Boulevard',
208
+				'Suite 9',
209
+				'Alderaan',
210
+				15,
211
+				'US',
212
+				'c1h2c',
213
+				'78-123-111-1111',
214
+				false,
215
+				'999999992'
216
+			),
217
+			2 => array(
218
+				'Yoda',
219
+				'I Am',
220
+				'[email protected]',
221
+				'4th Tree',
222
+				'5th Knot',
223
+				'Marsh',
224
+				22,
225
+				'US',
226
+				'l18n',
227
+				'999-999-9999',
228
+				false,
229
+				'999999993'
230
+			),
231
+		);
232
+        
233
+		//let's generate the attendee objects
234
+		$attendees = array();
235
+		$var_array = array(
236
+			'fname',
237
+			'lname',
238
+			'email',
239
+			'address',
240
+			'address2',
241
+			'city',
242
+			'staid',
243
+			'cntry',
244
+			'zip',
245
+			'phone',
246
+			'deleted',
247
+			'attid'
248
+		);
249
+        
250
+		//EE_Registry::instance()->load_class( 'Attendee', array(), FALSE, false, TRUE );
251
+		foreach ($dummy_attendees as $dummy) {
252
+			$att = array_combine($var_array, $dummy);
253
+			extract($att);
254
+			/** @var $fname string */
255
+			/** @var $lname string */
256
+			/** @var $address string */
257
+			/** @var $address2 string */
258
+			/** @var $city string */
259
+			/** @var $staid string */
260
+			/** @var $cntry string */
261
+			/** @var $zip string */
262
+			/** @var $email string */
263
+			/** @var $phone string */
264
+			/** @var $attid string */
265
+			$attendees[$attid] = EE_Attendee::new_instance(
266
+				array(
267
+					'ATT_fname'    => $fname,
268
+					'ATT_lname'    => $lname,
269
+					'ATT_address'  => $address,
270
+					'ATT_address2' => $address2,
271
+					'ATT_city'     => $city,
272
+					'STA_ID'       => $staid,
273
+					'CNT_ISO'      => $cntry,
274
+					'ATT_zip'      => $zip,
275
+					'ATT_email'    => $email,
276
+					'ATT_phone'    => $phone,
277
+					'ATT_ID'       => $attid
278
+				)
279
+			);
280
+		}
281
+        
282
+		return $attendees;
283
+	}
284 284
     
285 285
     
286
-    /**
287
-     * Return an array of dummy question objects indexed by answer id and dummy answer objects indexed by answer id.
288
-     * This will be used in our dummy data setup
289
-     * @return array
290
-     */
291
-    private function _get_some_q_and_as()
292
-    {
293
-        
294
-        
295
-        $quests_array = array(
296
-            0 => array(
297
-                555,
298
-                __('What is your favorite planet?', 'event_espresso'),
299
-                0
300
-            ),
301
-            1 => array(
302
-                556,
303
-                __('What is your favorite food?', 'event_espresso'),
304
-                0
305
-            ),
306
-            2 => array(
307
-                557,
308
-                __('How many lightyears have you travelled', 'event_espresso'),
309
-                0
310
-            )
311
-        );
312
-        
313
-        
314
-        $ans_array = array(
315
-            0 => array(
316
-                999,
317
-                555,
318
-                'Tattoine'
319
-            ),
320
-            1 => array(
321
-                1000,
322
-                555,
323
-                'Alderaan'
324
-            ),
325
-            2 => array(
326
-                1001,
327
-                555,
328
-                'Dantooine'
329
-            ),
330
-            3 => array(
331
-                1002,
332
-                556,
333
-                'Fish Fingers'
334
-            ),
335
-            4 => array(
336
-                1003,
337
-                556,
338
-                'Sushi'
339
-            ),
340
-            5 => array(
341
-                1004,
342
-                556,
343
-                'Water'
344
-            ),
345
-            6 => array(
346
-                1005,
347
-                557,
348
-                'A lot',
349
-            ),
350
-            7 => array(
351
-                1006,
352
-                557,
353
-                "That's none of your business."
354
-            ),
355
-            8 => array(
356
-                1007,
357
-                557,
358
-                "People less travel me then."
359
-            )
360
-        );
361
-        
362
-        $qst_columns = array('QST_ID', 'QST_display_text', 'QST_system');
363
-        $ans_columns = array('ANS_ID', 'QST_ID', 'ANS_value');
364
-        
365
-        //EE_Registry::instance()->load_class( 'Question', array(), FALSE, TRUE, TRUE );
366
-        //EE_Registry::instance()->load_class( 'Answer', array(), FALSE, TRUE, TRUE );
367
-        
368
-        $qsts = array();
369
-        //first the questions
370
-        foreach ($quests_array as $qst) {
371
-            $qstobj                  = array_combine($qst_columns, $qst);
372
-            $qsts[$qstobj['QST_ID']] = EE_Question::new_instance($qstobj);
373
-        }
374
-        
375
-        //now the answers (and we'll setup our arrays)
376
-        $q_n_as = array();
377
-        foreach ($ans_array as $ans) {
378
-            $ansobj                             = array_combine($ans_columns, $ans);
379
-            $ansobj                             = EE_Answer::new_instance($ansobj);
380
-            $q_n_as['answers'][$ansobj->ID()]   = $ansobj;
381
-            $q_n_as['questions'][$ansobj->ID()] = $qsts[$ansobj->get('QST_ID')];
382
-        }
383
-        
384
-        return $q_n_as;
385
-        
386
-    }
286
+	/**
287
+	 * Return an array of dummy question objects indexed by answer id and dummy answer objects indexed by answer id.
288
+	 * This will be used in our dummy data setup
289
+	 * @return array
290
+	 */
291
+	private function _get_some_q_and_as()
292
+	{
293
+        
294
+        
295
+		$quests_array = array(
296
+			0 => array(
297
+				555,
298
+				__('What is your favorite planet?', 'event_espresso'),
299
+				0
300
+			),
301
+			1 => array(
302
+				556,
303
+				__('What is your favorite food?', 'event_espresso'),
304
+				0
305
+			),
306
+			2 => array(
307
+				557,
308
+				__('How many lightyears have you travelled', 'event_espresso'),
309
+				0
310
+			)
311
+		);
312
+        
313
+        
314
+		$ans_array = array(
315
+			0 => array(
316
+				999,
317
+				555,
318
+				'Tattoine'
319
+			),
320
+			1 => array(
321
+				1000,
322
+				555,
323
+				'Alderaan'
324
+			),
325
+			2 => array(
326
+				1001,
327
+				555,
328
+				'Dantooine'
329
+			),
330
+			3 => array(
331
+				1002,
332
+				556,
333
+				'Fish Fingers'
334
+			),
335
+			4 => array(
336
+				1003,
337
+				556,
338
+				'Sushi'
339
+			),
340
+			5 => array(
341
+				1004,
342
+				556,
343
+				'Water'
344
+			),
345
+			6 => array(
346
+				1005,
347
+				557,
348
+				'A lot',
349
+			),
350
+			7 => array(
351
+				1006,
352
+				557,
353
+				"That's none of your business."
354
+			),
355
+			8 => array(
356
+				1007,
357
+				557,
358
+				"People less travel me then."
359
+			)
360
+		);
361
+        
362
+		$qst_columns = array('QST_ID', 'QST_display_text', 'QST_system');
363
+		$ans_columns = array('ANS_ID', 'QST_ID', 'ANS_value');
364
+        
365
+		//EE_Registry::instance()->load_class( 'Question', array(), FALSE, TRUE, TRUE );
366
+		//EE_Registry::instance()->load_class( 'Answer', array(), FALSE, TRUE, TRUE );
367
+        
368
+		$qsts = array();
369
+		//first the questions
370
+		foreach ($quests_array as $qst) {
371
+			$qstobj                  = array_combine($qst_columns, $qst);
372
+			$qsts[$qstobj['QST_ID']] = EE_Question::new_instance($qstobj);
373
+		}
374
+        
375
+		//now the answers (and we'll setup our arrays)
376
+		$q_n_as = array();
377
+		foreach ($ans_array as $ans) {
378
+			$ansobj                             = array_combine($ans_columns, $ans);
379
+			$ansobj                             = EE_Answer::new_instance($ansobj);
380
+			$q_n_as['answers'][$ansobj->ID()]   = $ansobj;
381
+			$q_n_as['questions'][$ansobj->ID()] = $qsts[$ansobj->get('QST_ID')];
382
+		}
383
+        
384
+		return $q_n_as;
385
+        
386
+	}
387 387
     
388 388
     
389
-    /**
390
-     * Return an array of event objects from the database
391
-     *
392
-     * If event ids are not included then we'll just retrieve the first published event from the database.
393
-     *
394
-     * @param  array $event_ids if set, this will be an array of event ids to obtain events for.
395
-     *
396
-     * @return array    An array of event objects from the db.
397
-     */
398
-    private function _get_some_events($event_ids = array())
399
-    {
400
-        
401
-        //HEY, if we have an evt_id then we want to make sure we use that for the preview (because a specific event template is being viewed);
402
-        $event_ids = isset($_REQUEST['evt_id']) && ! empty($_REQUEST['evt_id'])
403
-            ? array($_REQUEST['evt_id'])
404
-            : $event_ids;
405
-        
406
-        $limit = ! empty($event_ids)
407
-            ? null
408
-            : apply_filters('FHEE__EE_Messages_Preview_incoming_data___get_some_events__limit', '0,1');
409
-        
410
-        $where = ! empty($event_ids)
411
-            ? array(
412
-                'EVT_ID'                 => array('IN', $event_ids),
413
-                'Datetime.Ticket.TKT_ID' => array('>', 1)
414
-            )
415
-            : array('Datetime.Ticket.TKT_ID' => array('>', 1));
416
-        
417
-        $events = EE_Registry::instance()->load_model('Event')->get_all(array($where, 'limit' => $limit));
418
-        
419
-        return $events;
420
-    }
389
+	/**
390
+	 * Return an array of event objects from the database
391
+	 *
392
+	 * If event ids are not included then we'll just retrieve the first published event from the database.
393
+	 *
394
+	 * @param  array $event_ids if set, this will be an array of event ids to obtain events for.
395
+	 *
396
+	 * @return array    An array of event objects from the db.
397
+	 */
398
+	private function _get_some_events($event_ids = array())
399
+	{
400
+        
401
+		//HEY, if we have an evt_id then we want to make sure we use that for the preview (because a specific event template is being viewed);
402
+		$event_ids = isset($_REQUEST['evt_id']) && ! empty($_REQUEST['evt_id'])
403
+			? array($_REQUEST['evt_id'])
404
+			: $event_ids;
405
+        
406
+		$limit = ! empty($event_ids)
407
+			? null
408
+			: apply_filters('FHEE__EE_Messages_Preview_incoming_data___get_some_events__limit', '0,1');
409
+        
410
+		$where = ! empty($event_ids)
411
+			? array(
412
+				'EVT_ID'                 => array('IN', $event_ids),
413
+				'Datetime.Ticket.TKT_ID' => array('>', 1)
414
+			)
415
+			: array('Datetime.Ticket.TKT_ID' => array('>', 1));
416
+        
417
+		$events = EE_Registry::instance()->load_model('Event')->get_all(array($where, 'limit' => $limit));
418
+        
419
+		return $events;
420
+	}
421 421
     
422 422
     
423
-    protected function _setup_data()
424
-    {
425
-        
426
-        //need to figure out the running total for test purposes so... we're going to create a temp cart and add the tickets to it!
427
-        if (EE_Registry::instance()->SSN instanceof EE_Session) {
428
-            EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
429
-            $session = EE_Registry::instance()->SSN;
430
-        } else {
431
-            $session = EE_Registry::instance()->load_core('Session');
432
-        }
433
-        $cart = EE_Cart::instance(null, $session);
434
-        
435
-        
436
-        //add tickets to cart
437
-        foreach ($this->tickets as $ticket) {
438
-            $cart->add_ticket_to_cart($ticket['ticket']);
439
-        }
440
-        
441
-        
442
-        //setup txn property
443
-        $this->txn = EE_Transaction::new_instance(
444
-            array(
445
-                'TXN_timestamp'    => time(), //unix timestamp
446
-                'TXN_total'        => 0, //txn_total
447
-                'TXN_paid'         => 0, //txn_paid
448
-                'STS_ID'           => EEM_Transaction::incomplete_status_code, //sts_id
449
-                'TXN_session_data' => null, //dump of txn session object (we're just going to leave blank here)
450
-                'TXN_hash_salt'    => null, //hash salt blank as well
451
-                'TXN_ID'           => 999999
452
-            )
453
-        );
454
-        
455
-        
456
-        //setup reg_objects
457
-        //note we're setting up a reg object for each attendee in each event but ALSO adding to the reg_object array.
458
-        $this->reg_objs = array();
459
-        $regid          = 9999990;
460
-        foreach ($this->_attendees as $key => $attendee) {
461
-            //note we need to setup reg_objects for each event this attendee belongs to
462
-            $regatt = $attendee['att_obj'] instanceof EE_Attendee ? $attendee['att_obj']->ID() : null;
463
-            $regtxn = $this->txn->ID();
464
-            $regcnt = 1;
465
-            foreach ($attendee['line_ref'] as $evtid) {
466
-                foreach ($this->_events[$evtid]['tkt_objs'] as $ticket) {
467
-                    if ( ! $ticket instanceof EE_Ticket) {
468
-                        continue;
469
-                    }
470
-                    $reg_array                                        = array(
471
-                        'EVT_ID'           => $evtid,
472
-                        'ATT_ID'           => $regatt,
473
-                        'TXN_ID'           => $regtxn,
474
-                        'TKT_ID'           => $ticket->ID(),
475
-                        'STS_ID'           => EEM_Registration::status_id_pending_payment,
476
-                        'REG_date'         => time(),
477
-                        'REG_final_price'  => $ticket->get('TKT_price'),
478
-                        'REG_session'      => 'dummy_session_id',
479
-                        'REG_code'         => $regid . '-dummy-generated-code',
480
-                        'REG_url_link'     => $regcnt . '-daafpapasdlfakasdfpqasdfasdf',
481
-                        'REG_count'        => $regcnt,
482
-                        'REG_group_size'   => $this->_events[$evtid]['total_attendees'],
483
-                        'REG_att_is_going' => true,
484
-                        'REG_ID'           => $regid
485
-                    );
486
-                    $REG_OBJ                                          = EE_Registration::new_instance($reg_array);
487
-                    $this->_attendees[$key]['reg_objs'][$regid]       = $REG_OBJ;
488
-                    $this->_events[$evtid]['reg_objs'][]              = $REG_OBJ;
489
-                    $this->reg_objs[]                                 = $REG_OBJ;
490
-                    $this->tickets[$ticket->ID()]['reg_objs'][$regid] = $REG_OBJ;
423
+	protected function _setup_data()
424
+	{
425
+        
426
+		//need to figure out the running total for test purposes so... we're going to create a temp cart and add the tickets to it!
427
+		if (EE_Registry::instance()->SSN instanceof EE_Session) {
428
+			EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
429
+			$session = EE_Registry::instance()->SSN;
430
+		} else {
431
+			$session = EE_Registry::instance()->load_core('Session');
432
+		}
433
+		$cart = EE_Cart::instance(null, $session);
434
+        
435
+        
436
+		//add tickets to cart
437
+		foreach ($this->tickets as $ticket) {
438
+			$cart->add_ticket_to_cart($ticket['ticket']);
439
+		}
440
+        
441
+        
442
+		//setup txn property
443
+		$this->txn = EE_Transaction::new_instance(
444
+			array(
445
+				'TXN_timestamp'    => time(), //unix timestamp
446
+				'TXN_total'        => 0, //txn_total
447
+				'TXN_paid'         => 0, //txn_paid
448
+				'STS_ID'           => EEM_Transaction::incomplete_status_code, //sts_id
449
+				'TXN_session_data' => null, //dump of txn session object (we're just going to leave blank here)
450
+				'TXN_hash_salt'    => null, //hash salt blank as well
451
+				'TXN_ID'           => 999999
452
+			)
453
+		);
454
+        
455
+        
456
+		//setup reg_objects
457
+		//note we're setting up a reg object for each attendee in each event but ALSO adding to the reg_object array.
458
+		$this->reg_objs = array();
459
+		$regid          = 9999990;
460
+		foreach ($this->_attendees as $key => $attendee) {
461
+			//note we need to setup reg_objects for each event this attendee belongs to
462
+			$regatt = $attendee['att_obj'] instanceof EE_Attendee ? $attendee['att_obj']->ID() : null;
463
+			$regtxn = $this->txn->ID();
464
+			$regcnt = 1;
465
+			foreach ($attendee['line_ref'] as $evtid) {
466
+				foreach ($this->_events[$evtid]['tkt_objs'] as $ticket) {
467
+					if ( ! $ticket instanceof EE_Ticket) {
468
+						continue;
469
+					}
470
+					$reg_array                                        = array(
471
+						'EVT_ID'           => $evtid,
472
+						'ATT_ID'           => $regatt,
473
+						'TXN_ID'           => $regtxn,
474
+						'TKT_ID'           => $ticket->ID(),
475
+						'STS_ID'           => EEM_Registration::status_id_pending_payment,
476
+						'REG_date'         => time(),
477
+						'REG_final_price'  => $ticket->get('TKT_price'),
478
+						'REG_session'      => 'dummy_session_id',
479
+						'REG_code'         => $regid . '-dummy-generated-code',
480
+						'REG_url_link'     => $regcnt . '-daafpapasdlfakasdfpqasdfasdf',
481
+						'REG_count'        => $regcnt,
482
+						'REG_group_size'   => $this->_events[$evtid]['total_attendees'],
483
+						'REG_att_is_going' => true,
484
+						'REG_ID'           => $regid
485
+					);
486
+					$REG_OBJ                                          = EE_Registration::new_instance($reg_array);
487
+					$this->_attendees[$key]['reg_objs'][$regid]       = $REG_OBJ;
488
+					$this->_events[$evtid]['reg_objs'][]              = $REG_OBJ;
489
+					$this->reg_objs[]                                 = $REG_OBJ;
490
+					$this->tickets[$ticket->ID()]['reg_objs'][$regid] = $REG_OBJ;
491 491
                     
492
-                    $regcnt++;
493
-                    $regid++;
494
-                }
495
-            }
496
-        }
497
-        
498
-        
499
-        //setup line items!
500
-        $line_item_total = EEH_Line_Item::create_total_line_item($this->txn);
501
-        
502
-        //add tickets
503
-        foreach ($this->tickets as $tktid => $item) {
504
-            $qty    = $item['count'];
505
-            $ticket = $item['ticket'];
506
-            EEH_Line_Item::add_ticket_purchase($line_item_total, $ticket, $qty);
507
-        }
508
-        
509
-        $shipping_line_item = EE_Line_Item::new_instance(array(
510
-            'LIN_name'       => __('Shipping Surcharge', 'event_espresso'),
511
-            'LIN_desc'       => __('Sent via Millenium Falcon', 'event_espresso'),
512
-            'LIN_unit_price' => 20,
513
-            'LIN_quantity'   => 1,
514
-            'LIN_is_taxable' => true,
515
-            'LIN_total'      => 20,
516
-            'LIN_type'       => EEM_Line_Item::type_line_item
517
-        ));
518
-        EEH_Line_Item::add_item($line_item_total, $shipping_line_item);
519
-        $this->additional_line_items = array($shipping_line_item);
520
-        
521
-        //now let's add taxes
522
-        EEH_Line_Item::apply_taxes($line_item_total);
523
-        
524
-        //now we should be able to get the items we need from this object
525
-        $event_line_items = EEH_Line_Item::get_pre_tax_subtotal($line_item_total)->children();
526
-        $line_items       = array();
527
-        foreach ($event_line_items as $line_id => $line_item) {
528
-            if ( ! $line_item instanceof EE_Line_Item || $line_item->OBJ_type() !== 'Event') {
529
-                continue;
530
-            }
531
-            $ticket_line_items = EEH_Line_Item::get_ticket_line_items($line_item);
532
-            foreach ($ticket_line_items as $ticket_line_id => $ticket_line_item) {
533
-                if ( ! $ticket_line_item instanceof EE_Line_Item) {
534
-                    continue;
535
-                }
536
-                $this->tickets[$ticket_line_item->OBJ_ID()]['line_item']      = $ticket_line_item;
537
-                $this->tickets[$ticket_line_item->OBJ_ID()]['sub_line_items'] = $ticket_line_item->children();
538
-                $line_items[$ticket_line_item->ID()]['children']              = $ticket_line_item->children();
539
-                $line_items[$ticket_line_item->ID()]['EE_Ticket']             = $this->tickets[$ticket_line_item->OBJ_ID()]['ticket'];
540
-            }
541
-        }
542
-        
543
-        $this->line_items_with_children = $line_items;
544
-        $this->tax_line_items           = $line_item_total->tax_descendants();
545
-        
546
-        //add proper total to transaction object.
547
-        $grand_total                 = $line_item_total->recalculate_total_including_taxes();
548
-        $this->grand_total_line_item = $line_item_total;
549
-        $this->txn->set_total($grand_total);
550
-        
551
-        
552
-        //add additional details for each registration
553
-        foreach ($this->reg_objs as $reg) {
554
-            if ( ! $reg instanceof EE_Registration) {
555
-                continue;
556
-            }
557
-            $this->_registrations[$reg->ID()]['tkt_obj']  = $this->tickets[$reg->get('TKT_ID')]['ticket'];
558
-            $this->_registrations[$reg->ID()]['evt_obj']  = $this->_events[$reg->get('EVT_ID')]['event'];
559
-            $this->_registrations[$reg->ID()]['reg_obj']  = $reg;
560
-            $this->_registrations[$reg->ID()]['ans_objs'] = $this->_attendees[$reg->get('ATT_ID')]['ans_objs'];
561
-            $this->_registrations[$reg->ID()]['att_obj']  = $this->_attendees[$reg->get('ATT_ID')]['att_obj'];
562
-            $this->_registrations[$reg->ID()]['dtt_objs'] = $this->tickets[$reg->get('TKT_ID')]['dtt_objs'];
563
-        }
564
-        
565
-        
566
-        //events and attendees
567
-        $this->events        = $this->_events;
568
-        $this->attendees     = $this->_attendees;
569
-        $this->registrations = $this->_registrations;
570
-        
571
-        $attendees_to_shift = $this->_attendees;
572
-        
573
-        //setup primary attendee property
574
-        $this->primary_attendee_data = array(
575
-            'fname' => $this->_attendees[999999991]['att_obj'] instanceof EE_Attendee
576
-                ? $this->_attendees[999999991]['att_obj']->fname()
577
-                : '',
492
+					$regcnt++;
493
+					$regid++;
494
+				}
495
+			}
496
+		}
497
+        
498
+        
499
+		//setup line items!
500
+		$line_item_total = EEH_Line_Item::create_total_line_item($this->txn);
501
+        
502
+		//add tickets
503
+		foreach ($this->tickets as $tktid => $item) {
504
+			$qty    = $item['count'];
505
+			$ticket = $item['ticket'];
506
+			EEH_Line_Item::add_ticket_purchase($line_item_total, $ticket, $qty);
507
+		}
508
+        
509
+		$shipping_line_item = EE_Line_Item::new_instance(array(
510
+			'LIN_name'       => __('Shipping Surcharge', 'event_espresso'),
511
+			'LIN_desc'       => __('Sent via Millenium Falcon', 'event_espresso'),
512
+			'LIN_unit_price' => 20,
513
+			'LIN_quantity'   => 1,
514
+			'LIN_is_taxable' => true,
515
+			'LIN_total'      => 20,
516
+			'LIN_type'       => EEM_Line_Item::type_line_item
517
+		));
518
+		EEH_Line_Item::add_item($line_item_total, $shipping_line_item);
519
+		$this->additional_line_items = array($shipping_line_item);
520
+        
521
+		//now let's add taxes
522
+		EEH_Line_Item::apply_taxes($line_item_total);
523
+        
524
+		//now we should be able to get the items we need from this object
525
+		$event_line_items = EEH_Line_Item::get_pre_tax_subtotal($line_item_total)->children();
526
+		$line_items       = array();
527
+		foreach ($event_line_items as $line_id => $line_item) {
528
+			if ( ! $line_item instanceof EE_Line_Item || $line_item->OBJ_type() !== 'Event') {
529
+				continue;
530
+			}
531
+			$ticket_line_items = EEH_Line_Item::get_ticket_line_items($line_item);
532
+			foreach ($ticket_line_items as $ticket_line_id => $ticket_line_item) {
533
+				if ( ! $ticket_line_item instanceof EE_Line_Item) {
534
+					continue;
535
+				}
536
+				$this->tickets[$ticket_line_item->OBJ_ID()]['line_item']      = $ticket_line_item;
537
+				$this->tickets[$ticket_line_item->OBJ_ID()]['sub_line_items'] = $ticket_line_item->children();
538
+				$line_items[$ticket_line_item->ID()]['children']              = $ticket_line_item->children();
539
+				$line_items[$ticket_line_item->ID()]['EE_Ticket']             = $this->tickets[$ticket_line_item->OBJ_ID()]['ticket'];
540
+			}
541
+		}
542
+        
543
+		$this->line_items_with_children = $line_items;
544
+		$this->tax_line_items           = $line_item_total->tax_descendants();
545
+        
546
+		//add proper total to transaction object.
547
+		$grand_total                 = $line_item_total->recalculate_total_including_taxes();
548
+		$this->grand_total_line_item = $line_item_total;
549
+		$this->txn->set_total($grand_total);
550
+        
551
+        
552
+		//add additional details for each registration
553
+		foreach ($this->reg_objs as $reg) {
554
+			if ( ! $reg instanceof EE_Registration) {
555
+				continue;
556
+			}
557
+			$this->_registrations[$reg->ID()]['tkt_obj']  = $this->tickets[$reg->get('TKT_ID')]['ticket'];
558
+			$this->_registrations[$reg->ID()]['evt_obj']  = $this->_events[$reg->get('EVT_ID')]['event'];
559
+			$this->_registrations[$reg->ID()]['reg_obj']  = $reg;
560
+			$this->_registrations[$reg->ID()]['ans_objs'] = $this->_attendees[$reg->get('ATT_ID')]['ans_objs'];
561
+			$this->_registrations[$reg->ID()]['att_obj']  = $this->_attendees[$reg->get('ATT_ID')]['att_obj'];
562
+			$this->_registrations[$reg->ID()]['dtt_objs'] = $this->tickets[$reg->get('TKT_ID')]['dtt_objs'];
563
+		}
564
+        
565
+        
566
+		//events and attendees
567
+		$this->events        = $this->_events;
568
+		$this->attendees     = $this->_attendees;
569
+		$this->registrations = $this->_registrations;
570
+        
571
+		$attendees_to_shift = $this->_attendees;
572
+        
573
+		//setup primary attendee property
574
+		$this->primary_attendee_data = array(
575
+			'fname' => $this->_attendees[999999991]['att_obj'] instanceof EE_Attendee
576
+				? $this->_attendees[999999991]['att_obj']->fname()
577
+				: '',
578 578
             
579
-            'lname' => $this->_attendees[999999991]['att_obj'] instanceof EE_Attendee
580
-                ? $this->_attendees[999999991]['att_obj']->lname()
581
-                : '',
579
+			'lname' => $this->_attendees[999999991]['att_obj'] instanceof EE_Attendee
580
+				? $this->_attendees[999999991]['att_obj']->lname()
581
+				: '',
582 582
             
583
-            'email' => $this->_attendees[999999991]['att_obj'] instanceof EE_Attendee
584
-                ? $this->_attendees[999999991]['att_obj']->email()
585
-                : '',
583
+			'email' => $this->_attendees[999999991]['att_obj'] instanceof EE_Attendee
584
+				? $this->_attendees[999999991]['att_obj']->email()
585
+				: '',
586 586
             
587
-            'att_obj' => $this->_attendees[999999991]['att_obj'],
587
+			'att_obj' => $this->_attendees[999999991]['att_obj'],
588 588
             
589
-            'reg_obj' => array_shift($attendees_to_shift[999999991]['reg_objs'])
590
-        );
589
+			'reg_obj' => array_shift($attendees_to_shift[999999991]['reg_objs'])
590
+		);
591 591
         
592
-        //reg_info property
593
-        //note this isn't referenced by any shortcode parsers so we'll ignore for now.
594
-        $this->reg_info = array();
592
+		//reg_info property
593
+		//note this isn't referenced by any shortcode parsers so we'll ignore for now.
594
+		$this->reg_info = array();
595 595
         
596
-        //let's set a reg_obj for messengers expecting one.
597
-        $this->reg_obj = array_pop($this->_attendees[999999991]['reg_objs']);
596
+		//let's set a reg_obj for messengers expecting one.
597
+		$this->reg_obj = array_pop($this->_attendees[999999991]['reg_objs']);
598 598
         
599 599
         
600
-        //the below are just dummy items.
601
-        $this->user_id     = 1;
602
-        $this->ip_address  = '192.0.2.1';
603
-        $this->user_agent  = '';
604
-        $this->init_access = time();
605
-        $this->last_access = time();
606
-    }
600
+		//the below are just dummy items.
601
+		$this->user_id     = 1;
602
+		$this->ip_address  = '192.0.2.1';
603
+		$this->user_agent  = '';
604
+		$this->init_access = time();
605
+		$this->last_access = time();
606
+	}
607 607
     
608 608
 } //end EE_Messages_Preview_incoming_data class
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                 if ( ! $attendee instanceof EE_Attendee) {
146 146
                     continue;
147 147
                 }
148
-                $this->_attendees[$att_key]['line_ref'][] = $id;  //so later it can be determined what events this attendee registered for!
148
+                $this->_attendees[$att_key]['line_ref'][] = $id; //so later it can be determined what events this attendee registered for!
149 149
                 $this->_attendees[$att_key]['evt_objs'][] = $event;
150 150
                 $this->_attendees[$att_key]['att_obj']    = $attendee;
151 151
                 //$this->_attendees[$att_key]['registration_id'] = 0;
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                     if ( ! $ticket instanceof EE_Ticket) {
468 468
                         continue;
469 469
                     }
470
-                    $reg_array                                        = array(
470
+                    $reg_array = array(
471 471
                         'EVT_ID'           => $evtid,
472 472
                         'ATT_ID'           => $regatt,
473 473
                         'TXN_ID'           => $regtxn,
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
                         'REG_date'         => time(),
477 477
                         'REG_final_price'  => $ticket->get('TKT_price'),
478 478
                         'REG_session'      => 'dummy_session_id',
479
-                        'REG_code'         => $regid . '-dummy-generated-code',
480
-                        'REG_url_link'     => $regcnt . '-daafpapasdlfakasdfpqasdfasdf',
479
+                        'REG_code'         => $regid.'-dummy-generated-code',
480
+                        'REG_url_link'     => $regcnt.'-daafpapasdlfakasdfpqasdfasdf',
481 481
                         'REG_count'        => $regcnt,
482 482
                         'REG_group_size'   => $this->_events[$evtid]['total_attendees'],
483 483
                         'REG_att_is_going' => true,
Please login to merge, or discard this patch.
caffeinated/core/libraries/shortcodes/EE_Question_List_Shortcodes.lib.php 2 patches
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
4
-    exit('NO direct script access allowed');
4
+	exit('NO direct script access allowed');
5 5
 }
6 6
 
7 7
 /**
@@ -36,80 +36,80 @@  discard block
 block discarded – undo
36 36
 {
37 37
     
38 38
     
39
-    public function __construct()
40
-    {
41
-        parent::__construct();
42
-    }
39
+	public function __construct()
40
+	{
41
+		parent::__construct();
42
+	}
43 43
     
44 44
     
45
-    protected function _init_props()
46
-    {
47
-        $this->label       = __('Questions and Answers Shortcodes', 'event_espresso');
48
-        $this->description = __('All shortcodes related to custom questions and answers', 'event_espresso');
49
-        $this->_shortcodes = array(
50
-            '[QUESTION_LIST]' => __('This is used to indicate where you want the list of questions and answers to show for the registrant.  You place this within the "[attendee_list]" field.',
51
-                'event_espresso')
52
-        );
53
-    }
45
+	protected function _init_props()
46
+	{
47
+		$this->label       = __('Questions and Answers Shortcodes', 'event_espresso');
48
+		$this->description = __('All shortcodes related to custom questions and answers', 'event_espresso');
49
+		$this->_shortcodes = array(
50
+			'[QUESTION_LIST]' => __('This is used to indicate where you want the list of questions and answers to show for the registrant.  You place this within the "[attendee_list]" field.',
51
+				'event_espresso')
52
+		);
53
+	}
54 54
     
55 55
     
56
-    protected function _parser($shortcode)
57
-    {
56
+	protected function _parser($shortcode)
57
+	{
58 58
         
59 59
         
60
-        switch ($shortcode) {
61
-            case '[QUESTION_LIST]' :
62
-                return $this->_get_question_list();
63
-                break;
64
-        }
60
+		switch ($shortcode) {
61
+			case '[QUESTION_LIST]' :
62
+				return $this->_get_question_list();
63
+				break;
64
+		}
65 65
         
66
-        return '';
67
-    }
66
+		return '';
67
+	}
68 68
     
69 69
     
70
-    protected function _get_question_list()
71
-    {
72
-        $this->_validate_list_requirements();
70
+	protected function _get_question_list()
71
+	{
72
+		$this->_validate_list_requirements();
73 73
         
74
-        //for when [QUESTION_LIST] is used in the [attendee_list] field.
75
-        if ($this->_data['data'] instanceof EE_Registration) {
76
-            return $this->_get_question_answer_list_for_attendee();
77
-        } //for when [QUESTION_LIST] is used in the main content field.
78
-        else if ($this->_data['data'] instanceof EE_Messages_Addressee && $this->_data['data']->reg_obj instanceof EE_Registration) {
79
-            return $this->_get_question_answer_list_for_attendee($this->_data['data']->reg_obj);
80
-        } else {
81
-            return '';
82
-        }
83
-    }
74
+		//for when [QUESTION_LIST] is used in the [attendee_list] field.
75
+		if ($this->_data['data'] instanceof EE_Registration) {
76
+			return $this->_get_question_answer_list_for_attendee();
77
+		} //for when [QUESTION_LIST] is used in the main content field.
78
+		else if ($this->_data['data'] instanceof EE_Messages_Addressee && $this->_data['data']->reg_obj instanceof EE_Registration) {
79
+			return $this->_get_question_answer_list_for_attendee($this->_data['data']->reg_obj);
80
+		} else {
81
+			return '';
82
+		}
83
+	}
84 84
     
85 85
     
86
-    /**
87
-     * Note when we parse the "[question_list]" shortcode for attendees we're actually going to retrieve the list of
88
-     * answers for that attendee since that is what we really need (we can derive the questions from the answers);
89
-     * @return string parsed template.
90
-     */
91
-    private function _get_question_answer_list_for_attendee($reg_obj = null)
92
-    {
93
-        $valid_shortcodes = array('question');
94
-        $reg_obj          = $reg_obj instanceof EE_Registration ? $reg_obj : $this->_data['data'];
95
-        $template         = is_array($this->_data['template']) && isset($this->_data['template']['question_list']) ? $this->_data['template']['question_list'] : '';
96
-        $template         = empty($template) && isset($this->_extra_data['template']['question_list']) ? $this->_extra_data['template']['question_list'] : $template;
97
-        $ans_result       = '';
98
-        $answers          = ! empty($this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs']) ? $this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs'] : array();
99
-        $questions        = ! empty($this->_extra_data['data']->questions) ? $this->_extra_data['data']->questions : array();
100
-        foreach ($answers as $answer) {
101
-            //first see if the question is in our $questions array.  If not then try to get from answer object
102
-            $question = isset($questions[ $answer->ID() ]) ? $questions[ $answer->ID() ] : null;
103
-            $question = ! $question instanceof EE_Question ? $answer->question() : $question;
104
-            if ($question instanceof EE_Question and $question->admin_only()) {
105
-                continue;
106
-            }
107
-            $ans_result .= $this->_shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes,
108
-                $this->_extra_data);
109
-        }
86
+	/**
87
+	 * Note when we parse the "[question_list]" shortcode for attendees we're actually going to retrieve the list of
88
+	 * answers for that attendee since that is what we really need (we can derive the questions from the answers);
89
+	 * @return string parsed template.
90
+	 */
91
+	private function _get_question_answer_list_for_attendee($reg_obj = null)
92
+	{
93
+		$valid_shortcodes = array('question');
94
+		$reg_obj          = $reg_obj instanceof EE_Registration ? $reg_obj : $this->_data['data'];
95
+		$template         = is_array($this->_data['template']) && isset($this->_data['template']['question_list']) ? $this->_data['template']['question_list'] : '';
96
+		$template         = empty($template) && isset($this->_extra_data['template']['question_list']) ? $this->_extra_data['template']['question_list'] : $template;
97
+		$ans_result       = '';
98
+		$answers          = ! empty($this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs']) ? $this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs'] : array();
99
+		$questions        = ! empty($this->_extra_data['data']->questions) ? $this->_extra_data['data']->questions : array();
100
+		foreach ($answers as $answer) {
101
+			//first see if the question is in our $questions array.  If not then try to get from answer object
102
+			$question = isset($questions[ $answer->ID() ]) ? $questions[ $answer->ID() ] : null;
103
+			$question = ! $question instanceof EE_Question ? $answer->question() : $question;
104
+			if ($question instanceof EE_Question and $question->admin_only()) {
105
+				continue;
106
+			}
107
+			$ans_result .= $this->_shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes,
108
+				$this->_extra_data);
109
+		}
110 110
         
111
-        return $ans_result;
112
-    }
111
+		return $ans_result;
112
+	}
113 113
     
114 114
     
115 115
 } //end EE_Question_List_Shortcodes class
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         $questions        = ! empty($this->_extra_data['data']->questions) ? $this->_extra_data['data']->questions : array();
100 100
         foreach ($answers as $answer) {
101 101
             //first see if the question is in our $questions array.  If not then try to get from answer object
102
-            $question = isset($questions[ $answer->ID() ]) ? $questions[ $answer->ID() ] : null;
102
+            $question = isset($questions[$answer->ID()]) ? $questions[$answer->ID()] : null;
103 103
             $question = ! $question instanceof EE_Question ? $answer->question() : $question;
104 104
             if ($question instanceof EE_Question and $question->admin_only()) {
105 105
                 continue;
Please login to merge, or discard this patch.
templates/reg_admin_details_side_meta_box_registrant.template.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 
27 27
 <p class="contact-details-buttons">
28 28
     <?php if (
29
-        $att_check instanceof EE_Attendee
30
-        && EE_Registry::instance()->CAP->current_user_can(
31
-            'ee_edit_contact',
32
-            'view_or_edit_contact_button',
33
-            $att_check->ID()
34
-        )
35
-    ) : ?>
29
+		$att_check instanceof EE_Attendee
30
+		&& EE_Registry::instance()->CAP->current_user_can(
31
+			'ee_edit_contact',
32
+			'view_or_edit_contact_button',
33
+			$att_check->ID()
34
+		)
35
+	) : ?>
36 36
     <a class="button button-small" href="<?php echo $att_edit_link; ?>"
37 37
        title="<?php echo esc_attr($att_edit_label); ?>">
38 38
         <span class="ee-icon ee-icon-user-edit"></span><?php echo $att_edit_label; ?>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     <?php if (! empty($create_link)) : ?>
41 41
         <a class="button button-small" href="<?php echo $create_link; ?>"
42 42
            title="<?php esc_attr_e('This registration shares the contact details for the primary registration in this group.  If you\'d like this registration to have its own details, you can do so by clicking this button',
43
-               'event_espresso'); ?>">
43
+			   'event_espresso'); ?>">
44 44
             <span class="ee-icon ee-icon-user-add-new"></span><?php echo $create_label; ?>
45 45
         </a>
46 46
     <?php endif; ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
     <p class="clearfix">
3 3
         <span class="admin-side-mbox-label-spn lt-grey-txt float-left">
4 4
             <?php _e('Name', 'event_espresso'); ?>
5
-        </span><?php echo $fname . ' ' . $lname; ?>
5
+        </span><?php echo $fname.' '.$lname; ?>
6 6
     </p>
7 7
     <p class="clearfix">
8 8
         <span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e('Email', 'event_espresso'); ?></span><a
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
        title="<?php echo esc_attr($att_edit_label); ?>">
38 38
         <span class="ee-icon ee-icon-user-edit"></span><?php echo $att_edit_label; ?>
39 39
     </a>
40
-    <?php if (! empty($create_link)) : ?>
40
+    <?php if ( ! empty($create_link)) : ?>
41 41
         <a class="button button-small" href="<?php echo $create_link; ?>"
42 42
            title="<?php esc_attr_e('This registration shares the contact details for the primary registration in this group.  If you\'d like this registration to have its own details, you can do so by clicking this button',
43 43
                'event_espresso'); ?>">
Please login to merge, or discard this patch.
help_tours/Registration_Form_Question_Groups_Help_Tour.class.php 2 patches
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
-    exit('NO direct script access allowed');
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -18,130 +18,130 @@  discard block
 block discarded – undo
18 18
 class Registration_Form_Question_Groups_Help_Tour extends EE_Help_Tour
19 19
 {
20 20
     
21
-    protected function _set_tour_properties()
22
-    {
23
-        $this->_label = __('Question Groups Tour', 'event_espresso');
24
-        $this->_slug  = $this->_is_caf ? 'question-groups-caf-overview-joyride' : 'question-groups-overview-joyride';
25
-    }
21
+	protected function _set_tour_properties()
22
+	{
23
+		$this->_label = __('Question Groups Tour', 'event_espresso');
24
+		$this->_slug  = $this->_is_caf ? 'question-groups-caf-overview-joyride' : 'question-groups-overview-joyride';
25
+	}
26 26
     
27 27
     
28
-    protected function _set_tour_stops()
29
-    {
30
-        $this->_stops = array(
31
-            10 => array(
32
-                'content' => $this->_start(),
33
-            )
34
-        );
28
+	protected function _set_tour_stops()
29
+	{
30
+		$this->_stops = array(
31
+			10 => array(
32
+				'content' => $this->_start(),
33
+			)
34
+		);
35 35
         
36
-        if ($this->_is_caf) {
37
-            $this->_stops[20] = array(
38
-                'id'      => 'name',
39
-                'content' => $this->_name_stop(),
40
-                'options' => array(
41
-                    'tipLocation'    => 'top',
42
-                    'tipAdjustmentY' => -30,
43
-                    'tipAdjustmentX' => 25
44
-                )
45
-            );
46
-            $this->_stops[30] = array(
47
-                'id'      => 'description',
48
-                'content' => $this->_description_stop(),
49
-                'options' => array(
50
-                    'tipLocation'    => 'top',
51
-                    'tipAdjustmentY' => -30,
52
-                    'tipAdjustmentX' => 20
53
-                )
54
-            );
55
-            $this->_stops[40] = array(
56
-                'id'      => 'show_group_name',
57
-                'content' => $this->_show_group_name_stop(),
58
-                'options' => array(
59
-                    'tipLocation'    => 'top',
60
-                    'tipAdjustmentY' => -30,
61
-                    'tipAdjustmentX' => 20
62
-                )
63
-            );
64
-            $this->_stops[50] = array(
65
-                'id'      => 'show_group_desc',
66
-                'content' => $this->_show_group_description_stop(),
67
-                'options' => array(
68
-                    'tipLocation'    => 'top',
69
-                    'tipAdjustmentY' => -30,
70
-                    'tipAdjustmentX' => 20
71
-                )
72
-            );
73
-            $this->_stops[60] = array(
74
-                'class'   => 'bulkactions',
75
-                'content' => $this->_bulk_actions_stop(),
76
-                'options' => array(
77
-                    'tipLocation'    => 'left',
78
-                    'tipAdjustmentY' => -50,
79
-                    'tipAdjustmentX' => -80
80
-                )
81
-            );
82
-            $this->_stops[70] = array(
83
-                'id'      => 'add-new-question-group',
84
-                'content' => $this->_add_new_question_group_stop(),
85
-                'options' => array(
86
-                    'tipLocation'    => 'right',
87
-                    'tipAdjustmentY' => -50,
88
-                    'tipAdjustmentX' => 15
89
-                )
90
-            );
91
-        }
92
-    }
36
+		if ($this->_is_caf) {
37
+			$this->_stops[20] = array(
38
+				'id'      => 'name',
39
+				'content' => $this->_name_stop(),
40
+				'options' => array(
41
+					'tipLocation'    => 'top',
42
+					'tipAdjustmentY' => -30,
43
+					'tipAdjustmentX' => 25
44
+				)
45
+			);
46
+			$this->_stops[30] = array(
47
+				'id'      => 'description',
48
+				'content' => $this->_description_stop(),
49
+				'options' => array(
50
+					'tipLocation'    => 'top',
51
+					'tipAdjustmentY' => -30,
52
+					'tipAdjustmentX' => 20
53
+				)
54
+			);
55
+			$this->_stops[40] = array(
56
+				'id'      => 'show_group_name',
57
+				'content' => $this->_show_group_name_stop(),
58
+				'options' => array(
59
+					'tipLocation'    => 'top',
60
+					'tipAdjustmentY' => -30,
61
+					'tipAdjustmentX' => 20
62
+				)
63
+			);
64
+			$this->_stops[50] = array(
65
+				'id'      => 'show_group_desc',
66
+				'content' => $this->_show_group_description_stop(),
67
+				'options' => array(
68
+					'tipLocation'    => 'top',
69
+					'tipAdjustmentY' => -30,
70
+					'tipAdjustmentX' => 20
71
+				)
72
+			);
73
+			$this->_stops[60] = array(
74
+				'class'   => 'bulkactions',
75
+				'content' => $this->_bulk_actions_stop(),
76
+				'options' => array(
77
+					'tipLocation'    => 'left',
78
+					'tipAdjustmentY' => -50,
79
+					'tipAdjustmentX' => -80
80
+				)
81
+			);
82
+			$this->_stops[70] = array(
83
+				'id'      => 'add-new-question-group',
84
+				'content' => $this->_add_new_question_group_stop(),
85
+				'options' => array(
86
+					'tipLocation'    => 'right',
87
+					'tipAdjustmentY' => -50,
88
+					'tipAdjustmentX' => 15
89
+				)
90
+			);
91
+		}
92
+	}
93 93
     
94 94
     
95
-    protected function _start()
96
-    {
97
-        $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
98
-        if ($this->_is_caf) {
99
-            $content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
-                    'event_espresso') . '</p>';
101
-        } else {
102
-            $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
-                    'event_espresso') . '</p>';
104
-        }
95
+	protected function _start()
96
+	{
97
+		$content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
98
+		if ($this->_is_caf) {
99
+			$content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
+					'event_espresso') . '</p>';
101
+		} else {
102
+			$content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
+					'event_espresso') . '</p>';
104
+		}
105 105
         
106
-        return $content;
107
-    }
106
+		return $content;
107
+	}
108 108
     
109
-    protected function _name_stop()
110
-    {
111
-        return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
-            'event_espresso') . '</p>';
113
-    }
109
+	protected function _name_stop()
110
+	{
111
+		return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
+			'event_espresso') . '</p>';
113
+	}
114 114
     
115
-    protected function _description_stop()
116
-    {
117
-        return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
118
-    }
115
+	protected function _description_stop()
116
+	{
117
+		return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
118
+	}
119 119
     
120
-    protected function _show_group_name_stop()
121
-    {
122
-        return '<p>' . __('View if the name of the question group should be shown to customers.',
123
-            'event_espresso') . '</p>';
124
-    }
120
+	protected function _show_group_name_stop()
121
+	{
122
+		return '<p>' . __('View if the name of the question group should be shown to customers.',
123
+			'event_espresso') . '</p>';
124
+	}
125 125
     
126
-    protected function _show_group_description_stop()
127
-    {
128
-        return '<p>' . __('View if the description of the question group should be shown to customers.',
129
-            'event_espresso') . '</p>';
130
-    }
126
+	protected function _show_group_description_stop()
127
+	{
128
+		return '<p>' . __('View if the description of the question group should be shown to customers.',
129
+			'event_espresso') . '</p>';
130
+	}
131 131
     
132
-    protected function _bulk_actions_stop()
133
-    {
134
-        return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
135
-    }
132
+	protected function _bulk_actions_stop()
133
+	{
134
+		return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
135
+	}
136 136
     
137
-    protected function _search_stop()
138
-    {
139
-        return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
140
-            'event_espresso') . '</p>';
141
-    }
137
+	protected function _search_stop()
138
+	{
139
+		return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
140
+			'event_espresso') . '</p>';
141
+	}
142 142
     
143
-    protected function _add_new_question_group_stop()
144
-    {
145
-        return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
146
-    }
143
+	protected function _add_new_question_group_stop()
144
+	{
145
+		return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
146
+	}
147 147
 }
148 148
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
     
95 95
     protected function _start()
96 96
     {
97
-        $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
97
+        $content = '<h3>'.__('Question Groups', 'event_espresso').'</h3>';
98 98
         if ($this->_is_caf) {
99
-            $content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
-                    'event_espresso') . '</p>';
99
+            $content .= '<p>'.__('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
+                    'event_espresso').'</p>';
101 101
         } else {
102
-            $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
-                    'event_espresso') . '</p>';
102
+            $content .= '<p>'.__('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
+                    'event_espresso').'</p>';
104 104
         }
105 105
         
106 106
         return $content;
@@ -108,40 +108,40 @@  discard block
 block discarded – undo
108 108
     
109 109
     protected function _name_stop()
110 110
     {
111
-        return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
-            'event_espresso') . '</p>';
111
+        return '<p>'.__('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
+            'event_espresso').'</p>';
113 113
     }
114 114
     
115 115
     protected function _description_stop()
116 116
     {
117
-        return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
117
+        return '<p>'.__('View the question group description.', 'event_espresso').'</p>';
118 118
     }
119 119
     
120 120
     protected function _show_group_name_stop()
121 121
     {
122
-        return '<p>' . __('View if the name of the question group should be shown to customers.',
123
-            'event_espresso') . '</p>';
122
+        return '<p>'.__('View if the name of the question group should be shown to customers.',
123
+            'event_espresso').'</p>';
124 124
     }
125 125
     
126 126
     protected function _show_group_description_stop()
127 127
     {
128
-        return '<p>' . __('View if the description of the question group should be shown to customers.',
129
-            'event_espresso') . '</p>';
128
+        return '<p>'.__('View if the description of the question group should be shown to customers.',
129
+            'event_espresso').'</p>';
130 130
     }
131 131
     
132 132
     protected function _bulk_actions_stop()
133 133
     {
134
-        return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
134
+        return '<p>'.__('Perform bulk actions to multiple question groups.', 'event_espresso').'</p>';
135 135
     }
136 136
     
137 137
     protected function _search_stop()
138 138
     {
139
-        return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
140
-            'event_espresso') . '</p>';
139
+        return '<p>'.__('Search through questions. The following sources will be searched: question group name and question group description.',
140
+            'event_espresso').'</p>';
141 141
     }
142 142
     
143 143
     protected function _add_new_question_group_stop()
144 144
     {
145
-        return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
145
+        return '<p>'.__('Click here to create a new question group.', 'event_espresso').'</p>';
146 146
     }
147 147
 }
148 148
\ No newline at end of file
Please login to merge, or discard this patch.
general_settings/help_tours/Your_Organization_Help_Tour.class.php 2 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
-    exit('NO direct script access allowed');
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -18,121 +18,121 @@  discard block
 block discarded – undo
18 18
 class Your_Organization_Help_Tour extends EE_Help_Tour
19 19
 {
20 20
     
21
-    protected function _set_tour_properties()
22
-    {
23
-        $this->_label = __('Your Organization Tour', 'event_espresso');
24
-        $this->_slug  = 'your-organization-joyride';
25
-    }
21
+	protected function _set_tour_properties()
22
+	{
23
+		$this->_label = __('Your Organization Tour', 'event_espresso');
24
+		$this->_slug  = 'your-organization-joyride';
25
+	}
26 26
     
27 27
     
28
-    protected function _set_tour_stops()
29
-    {
30
-        $this->_stops = array(
31
-            10 => array(
32
-                'content' => $this->_start(),
33
-            ),
34
-            30 => array(
35
-                'id'      => 'contact_info_h4',
36
-                'content' => $this->_contact_information_stop(),
37
-                'options' => array(
38
-                    'tipLocation'    => 'left',
39
-                    'tipAdjustmentY' => -50,
40
-                    'tipAdjustmentX' => 15
41
-                )
42
-            ),
43
-            40 => array(
44
-                'id'      => 'upload_image',
45
-                'content' => $this->_upload_image_stop(),
46
-                'options' => array(
47
-                    'tipLocation'    => 'right',
48
-                    'tipAdjustmentY' => -50,
49
-                    'tipAdjustmentX' => 15
50
-                )
51
-            ),
52
-            50 => array(
53
-                'id'      => 'organization_facebook',
54
-                'content' => $this->_organization_facebook_stop(),
55
-                'options' => array(
56
-                    'tipLocation'    => 'right',
57
-                    'tipAdjustmentY' => -50,
58
-                    'tipAdjustmentX' => 15
59
-                )
60
-            ),
61
-            60 => array(
62
-                'id'      => 'ueip_optin',
63
-                'content' => $this->_ueip_option_stop(),
64
-                'options' => array(
65
-                    'tipLocation'    => 'right',
66
-                    'tipAdjustmentY' => -50,
67
-                    'tipAdjustmentX' => 15
68
-                )
69
-            ),
70
-            70 => array(
71
-                'id'      => 'espresso_major_buttons_wrapper',
72
-                'content' => $this->_end_tour_stop(),
73
-                'options' => array(
74
-                    'tipLocation'    => 'right',
75
-                    'tipAdjustmentY' => -50,
76
-                    'tipAdjustmentX' => 185
77
-                )
78
-            )
79
-        );
28
+	protected function _set_tour_stops()
29
+	{
30
+		$this->_stops = array(
31
+			10 => array(
32
+				'content' => $this->_start(),
33
+			),
34
+			30 => array(
35
+				'id'      => 'contact_info_h4',
36
+				'content' => $this->_contact_information_stop(),
37
+				'options' => array(
38
+					'tipLocation'    => 'left',
39
+					'tipAdjustmentY' => -50,
40
+					'tipAdjustmentX' => 15
41
+				)
42
+			),
43
+			40 => array(
44
+				'id'      => 'upload_image',
45
+				'content' => $this->_upload_image_stop(),
46
+				'options' => array(
47
+					'tipLocation'    => 'right',
48
+					'tipAdjustmentY' => -50,
49
+					'tipAdjustmentX' => 15
50
+				)
51
+			),
52
+			50 => array(
53
+				'id'      => 'organization_facebook',
54
+				'content' => $this->_organization_facebook_stop(),
55
+				'options' => array(
56
+					'tipLocation'    => 'right',
57
+					'tipAdjustmentY' => -50,
58
+					'tipAdjustmentX' => 15
59
+				)
60
+			),
61
+			60 => array(
62
+				'id'      => 'ueip_optin',
63
+				'content' => $this->_ueip_option_stop(),
64
+				'options' => array(
65
+					'tipLocation'    => 'right',
66
+					'tipAdjustmentY' => -50,
67
+					'tipAdjustmentX' => 15
68
+				)
69
+			),
70
+			70 => array(
71
+				'id'      => 'espresso_major_buttons_wrapper',
72
+				'content' => $this->_end_tour_stop(),
73
+				'options' => array(
74
+					'tipLocation'    => 'right',
75
+					'tipAdjustmentY' => -50,
76
+					'tipAdjustmentX' => 185
77
+				)
78
+			)
79
+		);
80 80
         
81
-        if (is_main_site()) {
82
-            $this->_stops[20] = array(
83
-                'id' => 'site_license_key',
84
-                'content' => $this->_site_license_key_stop(),
85
-                'options' => array(
86
-                    'tipLocation' => 'right',
87
-                    'tipAdjustmentY' => -50,
88
-                    'tipAdjustmentX' => 15
89
-                )
90
-            );
91
-        }
92
-        ksort( $this->_stops );
93
-    }
81
+		if (is_main_site()) {
82
+			$this->_stops[20] = array(
83
+				'id' => 'site_license_key',
84
+				'content' => $this->_site_license_key_stop(),
85
+				'options' => array(
86
+					'tipLocation' => 'right',
87
+					'tipAdjustmentY' => -50,
88
+					'tipAdjustmentX' => 15
89
+				)
90
+			);
91
+		}
92
+		ksort( $this->_stops );
93
+	}
94 94
     
95 95
     
96
-    protected function _start()
97
-    {
98
-        $content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
99
-        $content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
-                'event_espresso') . '</p>';
96
+	protected function _start()
97
+	{
98
+		$content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
99
+		$content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
+				'event_espresso') . '</p>';
101 101
         
102
-        return $content;
103
-    }
102
+		return $content;
103
+	}
104 104
     
105
-    protected function _site_license_key_stop()
106
-    {
107
-        return '<p>' . __('Enter your support license key here to enable one-click updates.',
108
-            'event_espresso') . '</p>';
109
-    }
105
+	protected function _site_license_key_stop()
106
+	{
107
+		return '<p>' . __('Enter your support license key here to enable one-click updates.',
108
+			'event_espresso') . '</p>';
109
+	}
110 110
     
111
-    protected function _contact_information_stop()
112
-    {
113
-        return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
-            'event_espresso') . '</p>';
115
-    }
111
+	protected function _contact_information_stop()
112
+	{
113
+		return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
+			'event_espresso') . '</p>';
115
+	}
116 116
     
117
-    protected function _upload_image_stop()
118
-    {
119
-        return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
120
-    }
117
+	protected function _upload_image_stop()
118
+	{
119
+		return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
120
+	}
121 121
     
122
-    protected function _organization_facebook_stop()
123
-    {
124
-        return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
125
-    }
122
+	protected function _organization_facebook_stop()
123
+	{
124
+		return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
125
+	}
126 126
     
127
-    protected function _ueip_option_stop()
128
-    {
129
-        return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
-            'event_espresso') . '</p>';
131
-    }
127
+	protected function _ueip_option_stop()
128
+	{
129
+		return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
+			'event_espresso') . '</p>';
131
+	}
132 132
     
133
-    protected function _end_tour_stop()
134
-    {
135
-        return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
-            'event_espresso') . '</p>';
137
-    }
133
+	protected function _end_tour_stop()
134
+	{
135
+		return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
+			'event_espresso') . '</p>';
137
+	}
138 138
 }
139 139
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -89,50 +89,50 @@
 block discarded – undo
89 89
                 )
90 90
             );
91 91
         }
92
-        ksort( $this->_stops );
92
+        ksort($this->_stops);
93 93
     }
94 94
     
95 95
     
96 96
     protected function _start()
97 97
     {
98
-        $content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
99
-        $content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
-                'event_espresso') . '</p>';
98
+        $content = '<h3>'.__('Organization Settings', 'event_espresso').'</h3>';
99
+        $content .= '<p>'.__('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
+                'event_espresso').'</p>';
101 101
         
102 102
         return $content;
103 103
     }
104 104
     
105 105
     protected function _site_license_key_stop()
106 106
     {
107
-        return '<p>' . __('Enter your support license key here to enable one-click updates.',
108
-            'event_espresso') . '</p>';
107
+        return '<p>'.__('Enter your support license key here to enable one-click updates.',
108
+            'event_espresso').'</p>';
109 109
     }
110 110
     
111 111
     protected function _contact_information_stop()
112 112
     {
113
-        return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
-            'event_espresso') . '</p>';
113
+        return '<p>'.__('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
+            'event_espresso').'</p>';
115 115
     }
116 116
     
117 117
     protected function _upload_image_stop()
118 118
     {
119
-        return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
119
+        return '<p>'.__('Add a logo. This can be used for invoices and tickets.', 'event_espresso').'</p>';
120 120
     }
121 121
     
122 122
     protected function _organization_facebook_stop()
123 123
     {
124
-        return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
124
+        return '<p>'.__('Add links to various social media networks.', 'event_espresso').'</p>';
125 125
     }
126 126
     
127 127
     protected function _ueip_option_stop()
128 128
     {
129
-        return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
-            'event_espresso') . '</p>';
129
+        return '<p>'.__('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
+            'event_espresso').'</p>';
131 131
     }
132 132
     
133 133
     protected function _end_tour_stop()
134 134
     {
135
-        return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
-            'event_espresso') . '</p>';
135
+        return '<p>'.__('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
+            'event_espresso').'</p>';
137 137
     }
138 138
 }
139 139
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/maintenance/templates/migration_options_from_ee3.template.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         <span class="dashicons dashicons-admin-tools"></span>
27 27
         <?php esc_html_e("Migration Options", "event_espresso"); ?>
28 28
         <span class="tiny-text lt-grey-text"> &nbsp; <?php esc_html_e(' to migrate or not to migrate?',
29
-                    "event_espresso"); ?></span>
29
+					"event_espresso"); ?></span>
30 30
     </h2>
31 31
     <div class="ee-table-wrap">
32 32
         <table>
@@ -35,24 +35,24 @@  discard block
 block discarded – undo
35 35
                 <td><h3><?php esc_html_e('1', 'event_espresso'); ?></h3></td>
36 36
                 <td>
37 37
                     <?php
38
-                    echo apply_filters(
39
-                            'FHEE__ee_migration_page__option_1_main',
40
-                            sprintf(
41
-                                    esc_html__('%1$sYes. I have backed up my database%2$s, %3$sunderstand the risks involved%4$s, and am ready to migrate my existing %5$s data to %6$s.',
42
-                                            "event_espresso"),
43
-                                    '<strong>',
44
-                                    '</strong>',
45
-                                    '<a id="migration-risks" class="" title="'
46
-                                    . esc_attr__('click for more details', "event_espresso")
47
-                                    . '">',
48
-                                    '</a>',
49
-                                    $current_db_state,
50
-                                    $next_db_state
51
-                            ),
52
-                            $current_db_state,
53
-                            $next_db_state
54
-                    );
55
-                    ?>
38
+					echo apply_filters(
39
+							'FHEE__ee_migration_page__option_1_main',
40
+							sprintf(
41
+									esc_html__('%1$sYes. I have backed up my database%2$s, %3$sunderstand the risks involved%4$s, and am ready to migrate my existing %5$s data to %6$s.',
42
+											"event_espresso"),
43
+									'<strong>',
44
+									'</strong>',
45
+									'<a id="migration-risks" class="" title="'
46
+									. esc_attr__('click for more details', "event_espresso")
47
+									. '">',
48
+									'</a>',
49
+									$current_db_state,
50
+									$next_db_state
51
+							),
52
+							$current_db_state,
53
+							$next_db_state
54
+					);
55
+					?>
56 56
                     <a id="display-migration-details"
57 57
                        class="display-the-hidden lt-grey-text smaller-text hide-if-no-js"
58 58
                        rel="migration-details"><?php esc_html_e('click for more details', "event_espresso"); ?>
@@ -61,37 +61,37 @@  discard block
 block discarded – undo
61 61
                        class="hide-the-displayed lt-grey-text smaller-text hide-if-no-js"
62 62
                        rel="migration-details"
63 63
                        style="display:none;"><?php echo sprintf(esc_html__('hide%1$sdetails%1$s-',
64
-                                'event_espresso'), '&nbsp;'); ?></a>
64
+								'event_espresso'), '&nbsp;'); ?></a>
65 65
                 </td>
66 66
                 <td>
67 67
                     <a id="db-backed-up"
68 68
                        class="toggle-migration-monitor button-primary"><?php echo apply_filters('FHEE__ee_migration_page__option_1_button_text',
69
-                                sprintf(esc_html__("Migrate My %s Data to %s", "event_espresso"), $current_db_state,
70
-                                        $next_db_state), $current_db_state, $next_db_state); ?></a>
69
+								sprintf(esc_html__("Migrate My %s Data to %s", "event_espresso"), $current_db_state,
70
+										$next_db_state), $current_db_state, $next_db_state); ?></a>
71 71
                 </td>
72 72
             </tr>
73 73
             <tr>
74 74
                 <td colspan="3" style="padding: 0">
75 75
                     <div id="migration-details-dv" style="display: none; padding: 1em;">
76 76
 <span class="reminder-spn"><?php printf(esc_html__("%s Important: %s Before migrating, please back up your database and files.",
77
-            "event_espresso"), "<b>", "</b>"); ?></span>
77
+			"event_espresso"), "<b>", "</b>"); ?></span>
78 78
                         <p>
79 79
                             <?php
80
-                            printf(
81
-                                    esc_html__('%1$sNot sure how to backup your existing data?%2$s Here is %3$sWordPress\'s explanation%7$s, and here\'s %6$sour explanation%7$s.%8$sYou can also search the WordPress plugin database for %4$s database backup plugins %7$s,%8$sor have one of our dedicated support technicians help you by purchasing a %5$sPriority Support Token%7$s.',
82
-                                            "event_espresso"),
83
-                                    '<b>',
84
-                                    '</b>',
85
-                                    "<a href='http://codex.wordpress.org/Backing_Up_Your_Database'>",
86
-                                    "<a href='"
87
-                                    . admin_url('plugin-install.php?tab=search&type=term&s=database+backup&plugin-search-input=Search+Plugins')
88
-                                    . "'>",
89
-                                    "<a href='http://eventespresso.com/product/priority-support-tokens/'>",
90
-                                    '<a href="http://eventespresso.com/wiki/how-to-back-up-your-site/">',
91
-                                    "</a>",
92
-                                    '<br/>'
93
-                            );
94
-                            ?>
80
+							printf(
81
+									esc_html__('%1$sNot sure how to backup your existing data?%2$s Here is %3$sWordPress\'s explanation%7$s, and here\'s %6$sour explanation%7$s.%8$sYou can also search the WordPress plugin database for %4$s database backup plugins %7$s,%8$sor have one of our dedicated support technicians help you by purchasing a %5$sPriority Support Token%7$s.',
82
+											"event_espresso"),
83
+									'<b>',
84
+									'</b>',
85
+									"<a href='http://codex.wordpress.org/Backing_Up_Your_Database'>",
86
+									"<a href='"
87
+									. admin_url('plugin-install.php?tab=search&type=term&s=database+backup&plugin-search-input=Search+Plugins')
88
+									. "'>",
89
+									"<a href='http://eventespresso.com/product/priority-support-tokens/'>",
90
+									'<a href="http://eventespresso.com/wiki/how-to-back-up-your-site/">',
91
+									"</a>",
92
+									'<br/>'
93
+							);
94
+							?>
95 95
                         </p>
96 96
                         <?php do_action('AHEE__ee_migration_page__option_1_extra_details'); ?>
97 97
                     </div>
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
                 <td><h3><?php esc_html_e('2', 'event_espresso'); ?></h3></td>
102 102
                 <td>
103 103
                     <?php echo apply_filters('FHEE__ee_migration_page__option_2_main',
104
-                            sprintf(esc_html__('I do NOT want to migrate my %1$s data to %2$s at this time and just want to use %3$s without migrating data.',
105
-                                    "event_espresso"), $current_db_state, $next_db_state,
106
-                                    $ultimate_db_state), $current_db_state, $next_db_state,
107
-                            $ultimate_db_state); ?><br/>
104
+							sprintf(esc_html__('I do NOT want to migrate my %1$s data to %2$s at this time and just want to use %3$s without migrating data.',
105
+									"event_espresso"), $current_db_state, $next_db_state,
106
+									$ultimate_db_state), $current_db_state, $next_db_state,
107
+							$ultimate_db_state); ?><br/>
108 108
                     <span class="reminder-spn"><?php esc_html_e('Please Note: In order to avoid errors, any existing Event Espresso data (events, ticket, registrations, etc) in your db will be erased! Regular WP data will NOT be affected.',
109
-                                'event_espresso'); ?></span>
109
+								'event_espresso'); ?></span>
110 110
                     <a id="display-no-migration-details"
111 111
                        class="display-the-hidden lt-grey-text smaller-text hide-if-no-js"
112 112
                        rel="no-migration-details"><?php esc_html_e('click for more details', "event_espresso"); ?>
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
                        class="hide-the-displayed lt-grey-text smaller-text hide-if-no-js"
116 116
                        rel="no-migration-details"
117 117
                        style="display:none;"><?php echo sprintf(esc_html__('hide%1$sdetails%1$s-',
118
-                                'event_espresso'), '&nbsp;'); ?></a>
118
+								'event_espresso'), '&nbsp;'); ?></a>
119 119
                 </td>
120 120
                 <td>
121 121
                     <a id="do-not-migrate" class="do-not-migrate button-primary"
122 122
                        href="<?php echo $reset_db_page_link; ?>"><?php echo apply_filters('FHEE__ee_migration_page__option_2_button_text',
123
-                                sprintf(esc_html__("Just Start %s and Delete Existing Data", "event_espresso"),
124
-                                        $ultimate_db_state), $ultimate_db_state); ?></a>
123
+								sprintf(esc_html__("Just Start %s and Delete Existing Data", "event_espresso"),
124
+										$ultimate_db_state), $ultimate_db_state); ?></a>
125 125
                 </td>
126 126
             </tr>
127 127
             <tr>
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
                     <div id="no-migration-details-dv" style="display: none; padding: 1em;">
130 130
                         <p>
131 131
                             <?php echo apply_filters('FHEE__ee_migration_page__option_2_details',
132
-                                    sprintf(esc_html__("If your existing Event and Registration Data is no longer relevant nor required, you can just start up %s without performing a data migration.",
133
-                                            "event_espresso"), $ultimate_db_state), $ultimate_db_state); ?>
132
+									sprintf(esc_html__("If your existing Event and Registration Data is no longer relevant nor required, you can just start up %s without performing a data migration.",
133
+											"event_espresso"), $ultimate_db_state), $ultimate_db_state); ?>
134 134
                         </p>
135 135
                     </div>
136 136
                 </td>
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_2_0.dms.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 //unfortunately, this needs to be done upon INCLUSION of this file,
13 13
 //instead of construction, because it only gets constructed on first page load
14 14
 //(all other times it gets resurrected from a wordpress option)
15
-$stages = glob(EE_CORE . 'data_migration_scripts/4_2_0_stages/*');
15
+$stages = glob(EE_CORE.'data_migration_scripts/4_2_0_stages/*');
16 16
 $class_to_filepath = array();
17 17
 if ( ! empty($stages)) {
18 18
     foreach ($stages as $filepath) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 //			echo "no version string provided: $version_string";
62 62
             //no version string provided... this must be pre 4.1
63 63
             //because since 4.1 we're
64
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
64
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
65 65
         } else {
66 66
 //			echo "$version_string doesnt apply";
67 67
             return false;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function schema_changes_before_migration()
81 81
     {
82 82
         //relies on 4.1's EEH_Activation::create_table
83
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
83
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
84 84
         $table_name = 'esp_answer';
85 85
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
86 86
 					REG_ID INT UNSIGNED NOT NULL,
Please login to merge, or discard this patch.
Indentation   +148 added lines, -148 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 $stages = glob(EE_CORE . 'data_migration_scripts/4_2_0_stages/*');
16 16
 $class_to_filepath = array();
17 17
 if ( ! empty($stages)) {
18
-    foreach ($stages as $filepath) {
19
-        $matches = array();
20
-        preg_match('~4_2_0_stages/(.*).dmsstage.php~', $filepath, $matches);
21
-        $class_to_filepath[$matches[1]] = $filepath;
22
-    }
18
+	foreach ($stages as $filepath) {
19
+		$matches = array();
20
+		preg_match('~4_2_0_stages/(.*).dmsstage.php~', $filepath, $matches);
21
+		$class_to_filepath[$matches[1]] = $filepath;
22
+	}
23 23
 }
24 24
 //give addons a chance to autoload their stages too
25 25
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_2_0__autoloaded_stages', $class_to_filepath);
@@ -32,57 +32,57 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 
35
-    /**
36
-     * EE_DMS_Core_4_2_0 constructor.
37
-     *
38
-     * @param TableManager  $table_manager
39
-     * @param TableAnalysis $table_analysis
40
-     */
41
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
42
-    {
43
-        $this->_pretty_name = esc_html__("Data Update to Event Espresso 4.2.0", "event_espresso");
44
-        $this->_priority = 10;
45
-        $this->_migration_stages = array(
46
-            new EE_DMS_4_2_0_question_group_questions(),
47
-            new EE_DMS_4_2_0_datetime_fields(),
48
-        );
49
-        parent::__construct($table_manager, $table_analysis);
50
-    }
35
+	/**
36
+	 * EE_DMS_Core_4_2_0 constructor.
37
+	 *
38
+	 * @param TableManager  $table_manager
39
+	 * @param TableAnalysis $table_analysis
40
+	 */
41
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
42
+	{
43
+		$this->_pretty_name = esc_html__("Data Update to Event Espresso 4.2.0", "event_espresso");
44
+		$this->_priority = 10;
45
+		$this->_migration_stages = array(
46
+			new EE_DMS_4_2_0_question_group_questions(),
47
+			new EE_DMS_4_2_0_datetime_fields(),
48
+		);
49
+		parent::__construct($table_manager, $table_analysis);
50
+	}
51 51
 
52 52
 
53 53
 
54
-    public function can_migrate_from_version($version_array)
55
-    {
56
-        $version_string = $version_array['Core'];
57
-        if (version_compare($version_string, '4.2.0', '<=') && version_compare($version_string, '4.1.0', '>=')) {
54
+	public function can_migrate_from_version($version_array)
55
+	{
56
+		$version_string = $version_array['Core'];
57
+		if (version_compare($version_string, '4.2.0', '<=') && version_compare($version_string, '4.1.0', '>=')) {
58 58
 //			echo "$version_string can be migrated fro";
59
-            return true;
60
-        } elseif ( ! $version_string) {
59
+			return true;
60
+		} elseif ( ! $version_string) {
61 61
 //			echo "no version string provided: $version_string";
62
-            //no version string provided... this must be pre 4.1
63
-            //because since 4.1 we're
64
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
65
-        } else {
62
+			//no version string provided... this must be pre 4.1
63
+			//because since 4.1 we're
64
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
65
+		} else {
66 66
 //			echo "$version_string doesnt apply";
67
-            return false;
68
-        }
69
-    }
67
+			return false;
68
+		}
69
+	}
70 70
 
71 71
 
72 72
 
73
-    public function schema_changes_before_migration()
74
-    {
75
-        //relies on 4.1's EEH_Activation::create_table
76
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
77
-        $table_name = 'esp_answer';
78
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
73
+	public function schema_changes_before_migration()
74
+	{
75
+		//relies on 4.1's EEH_Activation::create_table
76
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
77
+		$table_name = 'esp_answer';
78
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
79 79
 					REG_ID INT UNSIGNED NOT NULL,
80 80
 					QST_ID INT UNSIGNED NOT NULL,
81 81
 					ANS_value TEXT NOT NULL,
82 82
 					PRIMARY KEY  (ANS_ID)";
83
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
84
-        $table_name = 'esp_attendee_meta';
85
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
83
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
84
+		$table_name = 'esp_attendee_meta';
85
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
86 86
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
87 87
 						ATT_fname VARCHAR(45) NOT NULL,
88 88
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 								KEY ATT_fname (ATT_fname),
99 99
 								KEY ATT_lname (ATT_lname),
100 100
 								KEY ATT_email (ATT_email)";
101
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
102
-        $table_name = 'esp_country';
103
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
101
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
102
+		$table_name = 'esp_country';
103
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
104 104
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
105 105
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
106 106
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
117 117
 					  CNT_active TINYINT(1) DEFAULT '0',
118 118
 					  PRIMARY KEY  (CNT_ISO)";
119
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
120
-        $table_name = 'esp_datetime';
121
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
119
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
120
+		$table_name = 'esp_datetime';
121
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
122 122
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
123 123
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
124 124
 				  DTT_description TEXT NOT NULL,
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 						PRIMARY KEY  (DTT_ID),
134 134
 						KEY EVT_ID (EVT_ID),
135 135
 						KEY DTT_is_primary (DTT_is_primary)";
136
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
137
-        $table_name = 'esp_event_meta';
138
-        $sql = "
136
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
137
+		$table_name = 'esp_event_meta';
138
+		$sql = "
139 139
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
140 140
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
141 141
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -150,31 +150,31 @@  discard block
 block discarded – undo
150 150
 			EVT_external_URL VARCHAR(200) NULL,
151 151
 			EVT_donations TINYINT(1) NULL,
152 152
 			PRIMARY KEY  (EVTM_ID)";
153
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
154
-        $table_name = 'esp_event_question_group';
155
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
153
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
154
+		$table_name = 'esp_event_question_group';
155
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
156 156
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
157 157
 					QSG_ID INT UNSIGNED NOT NULL,
158 158
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
159 159
 					PRIMARY KEY  (EQG_ID)";
160
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
161
-        $table_name = 'esp_event_venue';
162
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
160
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
161
+		$table_name = 'esp_event_venue';
162
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
163 163
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
164 164
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
165 165
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
166 166
 				PRIMARY KEY  (EVV_ID)";
167
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
168
-        $table_name = 'esp_extra_meta';
169
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
167
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
168
+		$table_name = 'esp_extra_meta';
169
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
170 170
 				OBJ_ID INT(11) DEFAULT NULL,
171 171
 				EXM_type VARCHAR(45) DEFAULT NULL,
172 172
 				EXM_key VARCHAR(45) DEFAULT NULL,
173 173
 				EXM_value TEXT,
174 174
 				PRIMARY KEY  (EXM_ID)";
175
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
176
-        $table_name = 'esp_line_item';
177
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
175
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
176
+		$table_name = 'esp_line_item';
177
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
178 178
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
179 179
 				TXN_ID INT(11) DEFAULT NULL,
180 180
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -190,18 +190,18 @@  discard block
 block discarded – undo
190 190
 				OBJ_ID INT(11) DEFAULT NULL,
191 191
 				OBJ_type VARCHAR(45)DEFAULT NULL,
192 192
 				PRIMARY KEY  (LIN_ID)";
193
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
194
-        $table_name = 'esp_message_template';
195
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
193
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
194
+		$table_name = 'esp_message_template';
195
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
196 196
 					GRP_ID INT(10) UNSIGNED NOT NULL,
197 197
 					MTP_context VARCHAR(50) NOT NULL,
198 198
 					MTP_template_field VARCHAR(30) NOT NULL,
199 199
 					MTP_content TEXT NOT NULL,
200 200
 					PRIMARY KEY  (MTP_ID),
201 201
 					KEY GRP_ID (GRP_ID)";
202
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
203
-        $table_name = 'esp_message_template_group';
204
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
202
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
203
+		$table_name = 'esp_message_template_group';
204
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
205 205
 					EVT_ID BIGINT(20) UNSIGNED DEFAULT NULL,
206 206
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
207 207
 					MTP_messenger VARCHAR(30) NOT NULL,
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
 					PRIMARY KEY  (GRP_ID),
214 214
 					KEY EVT_ID (EVT_ID),
215 215
 					KEY MTP_user_id (MTP_user_id)";
216
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
217
-        $table_name = 'esp_payment';
218
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
216
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
217
+		$table_name = 'esp_payment';
218
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
219 219
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
220 220
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
221 221
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 					PRIMARY KEY  (PAY_ID),
232 232
 					KEY TXN_ID (TXN_ID),
233 233
 					KEY PAY_timestamp (PAY_timestamp)";
234
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
235
-        $table_name = "esp_ticket";
236
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
234
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
235
+		$table_name = "esp_ticket";
236
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
237 237
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
238 238
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
239 239
 					  TKT_description TEXT NOT NULL,
@@ -252,28 +252,28 @@  discard block
 block discarded – undo
252 252
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
253 253
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
254 254
 					  PRIMARY KEY  (TKT_ID)";
255
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
256
-        $table_name = "esp_ticket_price";
257
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
255
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
256
+		$table_name = "esp_ticket_price";
257
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
258 258
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
259 259
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
260 260
 					  PRIMARY KEY  (TKP_ID)";
261
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
262
-        $table_name = "esp_datetime_ticket";
263
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
261
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
262
+		$table_name = "esp_datetime_ticket";
263
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
264 264
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
265 265
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
266 266
 					  PRIMARY KEY  (DTK_ID)";
267
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
268
-        $table_name = "esp_ticket_template";
269
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
267
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
268
+		$table_name = "esp_ticket_template";
269
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
270 270
 					  TTM_name VARCHAR(45) NOT NULL,
271 271
 					  TTM_description TEXT,
272 272
 					  TTM_file VARCHAR(45),
273 273
 					  PRIMARY KEY  (TTM_ID)";
274
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
275
-        $table_name = "esp_price";
276
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
274
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
275
+		$table_name = "esp_price";
276
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
277 277
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
278 278
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
279 279
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 					  PRC_order TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
285 285
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
286 286
 					  PRIMARY KEY  (PRC_ID)";
287
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
288
-        $table_name = "esp_price_type";
289
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
287
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
288
+		$table_name = "esp_price_type";
289
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
290 290
 				  PRT_name VARCHAR(45) NOT NULL,
291 291
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
292 292
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
295 295
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
296 296
 				  PRIMARY KEY  (PRT_ID)";
297
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
298
-        $table_name = 'esp_question';
299
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
297
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
298
+		$table_name = 'esp_question';
299
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
300 300
 					QST_display_text TEXT NOT NULL,
301 301
 					QST_admin_label VARCHAR(255) NOT NULL,
302 302
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -308,10 +308,10 @@  discard block
 block discarded – undo
308 308
 					QST_wp_user BIGINT UNSIGNED NULL,
309 309
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
310 310
 					PRIMARY KEY  (QST_ID)';
311
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
312
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
313
-        $table_name = 'esp_question_group';
314
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
311
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
312
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
313
+		$table_name = 'esp_question_group';
314
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
315 315
 					QSG_name VARCHAR(255) NOT NULL,
316 316
 					QSG_identifier VARCHAR(100) NOT NULL,
317 317
 					QSG_desc TEXT NULL,
@@ -322,24 +322,24 @@  discard block
 block discarded – undo
322 322
 					QSG_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
323 323
 					PRIMARY KEY  (QSG_ID),
324 324
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
325
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
326
-        $table_name = 'esp_question_group_question';
327
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
325
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
326
+		$table_name = 'esp_question_group_question';
327
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
328 328
 					QSG_ID INT UNSIGNED NOT NULL,
329 329
 					QST_ID INT UNSIGNED NOT NULL,
330 330
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
331 331
 					PRIMARY KEY  (QGQ_ID) ";
332
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
333
-        $table_name = 'esp_question_option';
334
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
332
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
333
+		$table_name = 'esp_question_option';
334
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
335 335
 					QSO_value VARCHAR(255) NOT NULL,
336 336
 					QSO_desc TEXT NOT NULL,
337 337
 					QST_ID INT UNSIGNED NOT NULL,
338 338
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
339 339
 					PRIMARY KEY  (QSO_ID)";
340
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
-        $table_name = 'esp_registration';
342
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
340
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
+		$table_name = 'esp_registration';
342
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
343 343
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
344 344
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
345 345
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -362,25 +362,25 @@  discard block
 block discarded – undo
362 362
 					  KEY STS_ID (STS_ID),
363 363
 					  KEY REG_url_link (REG_url_link),
364 364
 					  KEY REG_code (REG_code)";
365
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
366
-        $table_name = 'esp_checkin';
367
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
365
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
366
+		$table_name = 'esp_checkin';
367
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
368 368
 					REG_ID INT(10) UNSIGNED NOT NULL,
369 369
 					DTT_ID INT(10) UNSIGNED NOT NULL,
370 370
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
371 371
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
372 372
 					PRIMARY KEY  (CHK_ID)";
373
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
374
-        $table_name = 'esp_state';
375
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
373
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
374
+		$table_name = 'esp_state';
375
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
376 376
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
377 377
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
378 378
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
379 379
 					  STA_active TINYINT(1) DEFAULT '1',
380 380
 					  PRIMARY KEY  (STA_ID)";
381
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
382
-        $table_name = 'esp_status';
383
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
381
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
382
+		$table_name = 'esp_status';
383
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
384 384
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
385 385
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
386 386
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -388,9 +388,9 @@  discard block
 block discarded – undo
388 388
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
389 389
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
390 390
 					  KEY STS_type (STS_type)";
391
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
392
-        $table_name = 'esp_transaction';
393
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
391
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
392
+		$table_name = 'esp_transaction';
393
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
394 394
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
395 395
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
396 396
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
 					  PRIMARY KEY  (TXN_ID),
401 401
 					  KEY TXN_timestamp (TXN_timestamp),
402 402
 					  KEY STS_ID (STS_ID)";
403
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
404
-        $table_name = 'esp_venue_meta';
405
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
403
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
404
+		$table_name = 'esp_venue_meta';
405
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
406 406
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
407 407
 			VNU_address VARCHAR(255) DEFAULT NULL,
408 408
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -420,38 +420,38 @@  discard block
 block discarded – undo
420 420
 			PRIMARY KEY  (VNUM_ID),
421 421
 			KEY STA_ID (STA_ID),
422 422
 			KEY CNT_ISO (CNT_ISO)";
423
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
424
-        $script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
425
-        //setting up the DEFAULT stats and countries is also essential for the data migrations to run
426
-        //(because many need to convert old string states to foreign keys into the states table)
427
-        $script_with_defaults->insert_default_states();
428
-        $script_with_defaults->insert_default_countries();
429
-        //setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
430
-        $script_with_defaults->insert_default_price_types();
431
-        $script_with_defaults->insert_default_prices();
432
-        $script_with_defaults->insert_default_tickets();
433
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
434
-        EE_Config::instance()->update_espresso_config(false, true);
435
-        return true;
436
-    }
423
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
424
+		$script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
425
+		//setting up the DEFAULT stats and countries is also essential for the data migrations to run
426
+		//(because many need to convert old string states to foreign keys into the states table)
427
+		$script_with_defaults->insert_default_states();
428
+		$script_with_defaults->insert_default_countries();
429
+		//setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
430
+		$script_with_defaults->insert_default_price_types();
431
+		$script_with_defaults->insert_default_prices();
432
+		$script_with_defaults->insert_default_tickets();
433
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
434
+		EE_Config::instance()->update_espresso_config(false, true);
435
+		return true;
436
+	}
437 437
 
438 438
 
439 439
 
440
-    /**
441
-     * We COULD clean up the esp_question.QST_order field here. We'll leave it for now
442
-     *
443
-     * @return boolean
444
-     */
445
-    public function schema_changes_after_migration()
446
-    {
447
-        return true;
448
-    }
440
+	/**
441
+	 * We COULD clean up the esp_question.QST_order field here. We'll leave it for now
442
+	 *
443
+	 * @return boolean
444
+	 */
445
+	public function schema_changes_after_migration()
446
+	{
447
+		return true;
448
+	}
449 449
 
450 450
 
451 451
 
452
-    public function migration_page_hooks()
453
-    {
454
-    }
452
+	public function migration_page_hooks()
453
+	{
454
+	}
455 455
 }
456 456
 
457 457
 
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_3_0.dms.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 //unfortunately, this needs to be done upon INCLUSION of this file,
12 12
 //instead of construction, because it only gets constructed on first page load
13 13
 //(all other times it gets resurrected from a wordpress option)
14
-$stages = glob(EE_CORE . 'data_migration_scripts/4_3_0_stages/*');
14
+$stages = glob(EE_CORE.'data_migration_scripts/4_3_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 if ( ! empty($stages)) {
17 17
     foreach ($stages as $filepath) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         } elseif ( ! $version_string) {
61 61
 //			echo "no version string provided: $version_string";
62 62
             //no version string provided... this must be pre 4.2
63
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
63
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
64 64
         } else {
65 65
 //			echo "$version_string doesnt apply";
66 66
             return false;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function schema_changes_before_migration()
80 80
     {
81 81
         //relies on 4.1's EEH_Activation::create_table
82
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
82
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
83 83
         $table_name = 'esp_answer';
84 84
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
85 85
 					REG_ID INT UNSIGNED NOT NULL,
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
     public function insert_default_tickets()
483 483
     {
484 484
         global $wpdb;
485
-        $ticket_table = $wpdb->prefix . "esp_ticket";
485
+        $ticket_table = $wpdb->prefix."esp_ticket";
486 486
         if ($this->_get_table_analysis()->tableExists($ticket_table)) {
487
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
487
+            $SQL = 'SELECT COUNT(TKT_ID) FROM '.$ticket_table;
488 488
             $tickets_exist = $wpdb->get_var($SQL);
489 489
             if ( ! $tickets_exist) {
490 490
                 $SQL = "INSERT INTO $ticket_table
@@ -496,9 +496,9 @@  discard block
 block discarded – undo
496 496
                 $wpdb->query($SQL);
497 497
             }
498 498
         }
499
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
499
+        $ticket_price_table = $wpdb->prefix."esp_ticket_price";
500 500
         if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
501
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
501
+            $SQL = 'SELECT COUNT(TKP_ID) FROM '.$ticket_price_table;
502 502
             $ticket_prc_exist = $wpdb->get_var($SQL);
503 503
             if ( ! $ticket_prc_exist) {
504 504
                 $SQL = "INSERT INTO $ticket_price_table
Please login to merge, or discard this patch.
Indentation   +193 added lines, -193 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 $stages = glob(EE_CORE . 'data_migration_scripts/4_3_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 if ( ! empty($stages)) {
17
-    foreach ($stages as $filepath) {
18
-        $matches = array();
19
-        preg_match('~4_3_0_stages/(.*).dmsstage.php~', $filepath, $matches);
20
-        $class_to_filepath[$matches[1]] = $filepath;
21
-    }
17
+	foreach ($stages as $filepath) {
18
+		$matches = array();
19
+		preg_match('~4_3_0_stages/(.*).dmsstage.php~', $filepath, $matches);
20
+		$class_to_filepath[$matches[1]] = $filepath;
21
+	}
22 22
 }
23 23
 //give addons a chance to autoload their stages too
24 24
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_3_0__autoloaded_stages', $class_to_filepath);
@@ -31,56 +31,56 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 
34
-    /**
35
-     * EE_DMS_Core_4_3_0 constructor.
36
-     *
37
-     * @param TableManager  $table_manager
38
-     * @param TableAnalysis $table_analysis
39
-     */
40
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
41
-    {
42
-        $this->_pretty_name = __("Data Update to Event Espresso 4.3.0", "event_espresso");
43
-        $this->_priority = 10;
44
-        $this->_migration_stages = array(
45
-            new EE_DMS_4_3_0_question_option_order(),
46
-            new EE_DMS_4_3_0_event_message_templates(),
47
-        );
48
-        parent::__construct($table_manager, $table_analysis);
49
-    }
34
+	/**
35
+	 * EE_DMS_Core_4_3_0 constructor.
36
+	 *
37
+	 * @param TableManager  $table_manager
38
+	 * @param TableAnalysis $table_analysis
39
+	 */
40
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
41
+	{
42
+		$this->_pretty_name = __("Data Update to Event Espresso 4.3.0", "event_espresso");
43
+		$this->_priority = 10;
44
+		$this->_migration_stages = array(
45
+			new EE_DMS_4_3_0_question_option_order(),
46
+			new EE_DMS_4_3_0_event_message_templates(),
47
+		);
48
+		parent::__construct($table_manager, $table_analysis);
49
+	}
50 50
 
51 51
 
52 52
 
53
-    public function can_migrate_from_version($version_array)
54
-    {
55
-        $version_string = $version_array['Core'];
56
-        if (version_compare($version_string, '4.3.0', '<=') && version_compare($version_string, '4.2.0', '>=')) {
53
+	public function can_migrate_from_version($version_array)
54
+	{
55
+		$version_string = $version_array['Core'];
56
+		if (version_compare($version_string, '4.3.0', '<=') && version_compare($version_string, '4.2.0', '>=')) {
57 57
 //			echo "$version_string can be migrated fro";
58
-            return true;
59
-        } elseif ( ! $version_string) {
58
+			return true;
59
+		} elseif ( ! $version_string) {
60 60
 //			echo "no version string provided: $version_string";
61
-            //no version string provided... this must be pre 4.2
62
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
63
-        } else {
61
+			//no version string provided... this must be pre 4.2
62
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
63
+		} else {
64 64
 //			echo "$version_string doesnt apply";
65
-            return false;
66
-        }
67
-    }
65
+			return false;
66
+		}
67
+	}
68 68
 
69 69
 
70 70
 
71
-    public function schema_changes_before_migration()
72
-    {
73
-        //relies on 4.1's EEH_Activation::create_table
74
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
75
-        $table_name = 'esp_answer';
76
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
71
+	public function schema_changes_before_migration()
72
+	{
73
+		//relies on 4.1's EEH_Activation::create_table
74
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
75
+		$table_name = 'esp_answer';
76
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
77 77
 					REG_ID INT UNSIGNED NOT NULL,
78 78
 					QST_ID INT UNSIGNED NOT NULL,
79 79
 					ANS_value TEXT NOT NULL,
80 80
 					PRIMARY KEY  (ANS_ID)";
81
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
82
-        $table_name = 'esp_attendee_meta';
83
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
81
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
82
+		$table_name = 'esp_attendee_meta';
83
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
84 84
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
85 85
 						ATT_fname VARCHAR(45) NOT NULL,
86 86
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
 								KEY ATT_fname (ATT_fname),
97 97
 								KEY ATT_lname (ATT_lname),
98 98
 								KEY ATT_email (ATT_email)";
99
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
100
-        $table_name = 'esp_country';
101
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
99
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
100
+		$table_name = 'esp_country';
101
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
102 102
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
103 103
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
104 104
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
115 115
 					  CNT_active TINYINT(1) DEFAULT '0',
116 116
 					  PRIMARY KEY  (CNT_ISO)";
117
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
118
-        $table_name = 'esp_datetime';
119
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
117
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
118
+		$table_name = 'esp_datetime';
119
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
120 120
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
121 121
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
122 122
 				  DTT_description TEXT NOT NULL,
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 						PRIMARY KEY  (DTT_ID),
132 132
 						KEY EVT_ID (EVT_ID),
133 133
 						KEY DTT_is_primary (DTT_is_primary)";
134
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
135
-        $table_name = 'esp_event_meta';
136
-        $sql = "
134
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
135
+		$table_name = 'esp_event_meta';
136
+		$sql = "
137 137
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
138 138
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
139 139
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -148,31 +148,31 @@  discard block
 block discarded – undo
148 148
 			EVT_external_URL VARCHAR(200) NULL,
149 149
 			EVT_donations TINYINT(1) NULL,
150 150
 			PRIMARY KEY  (EVTM_ID)";
151
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
152
-        $table_name = 'esp_event_question_group';
153
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
151
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
152
+		$table_name = 'esp_event_question_group';
153
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
154 154
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
155 155
 					QSG_ID INT UNSIGNED NOT NULL,
156 156
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
157 157
 					PRIMARY KEY  (EQG_ID)";
158
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
159
-        $table_name = 'esp_event_venue';
160
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
158
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
159
+		$table_name = 'esp_event_venue';
160
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
161 161
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
162 162
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
163 163
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
164 164
 				PRIMARY KEY  (EVV_ID)";
165
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
166
-        $table_name = 'esp_extra_meta';
167
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
165
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
166
+		$table_name = 'esp_extra_meta';
167
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
168 168
 				OBJ_ID INT(11) DEFAULT NULL,
169 169
 				EXM_type VARCHAR(45) DEFAULT NULL,
170 170
 				EXM_key VARCHAR(45) DEFAULT NULL,
171 171
 				EXM_value TEXT,
172 172
 				PRIMARY KEY  (EXM_ID)";
173
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
174
-        $table_name = 'esp_line_item';
175
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
173
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
174
+		$table_name = 'esp_line_item';
175
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
176 176
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
177 177
 				TXN_ID INT(11) DEFAULT NULL,
178 178
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -188,19 +188,19 @@  discard block
 block discarded – undo
188 188
 				OBJ_ID INT(11) DEFAULT NULL,
189 189
 				OBJ_type VARCHAR(45)DEFAULT NULL,
190 190
 				PRIMARY KEY  (LIN_ID)";
191
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
192
-        $table_name = 'esp_message_template';
193
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
191
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
192
+		$table_name = 'esp_message_template';
193
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
194 194
 					GRP_ID INT(10) UNSIGNED NOT NULL,
195 195
 					MTP_context VARCHAR(50) NOT NULL,
196 196
 					MTP_template_field VARCHAR(30) NOT NULL,
197 197
 					MTP_content TEXT NOT NULL,
198 198
 					PRIMARY KEY  (MTP_ID),
199 199
 					KEY GRP_ID (GRP_ID)";
200
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
201
-        $this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
202
-        $table_name = 'esp_message_template_group';
203
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
200
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
201
+		$this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
202
+		$table_name = 'esp_message_template_group';
203
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
204 204
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
205 205
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
206 206
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -212,17 +212,17 @@  discard block
 block discarded – undo
212 212
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
213 213
 					PRIMARY KEY  (GRP_ID),
214 214
 					KEY MTP_user_id (MTP_user_id)";
215
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
216
-        $table_name = 'esp_event_message_template';
217
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
215
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
216
+		$table_name = 'esp_event_message_template';
217
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
218 218
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
219 219
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
220 220
 					PRIMARY KEY  (EMT_ID),
221 221
 					KEY EVT_ID (EVT_ID),
222 222
 					KEY GRP_ID (GRP_ID)";
223
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
224
-        $table_name = 'esp_payment';
225
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
223
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
224
+		$table_name = 'esp_payment';
225
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
226 226
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
227 227
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
228 228
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -238,9 +238,9 @@  discard block
 block discarded – undo
238 238
 					PRIMARY KEY  (PAY_ID),
239 239
 					KEY TXN_ID (TXN_ID),
240 240
 					KEY PAY_timestamp (PAY_timestamp)";
241
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
242
-        $table_name = "esp_ticket";
243
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
241
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
242
+		$table_name = "esp_ticket";
243
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
244 244
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
245 245
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
246 246
 					  TKT_description TEXT NOT NULL,
@@ -260,28 +260,28 @@  discard block
 block discarded – undo
260 260
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
261 261
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
262 262
 					  PRIMARY KEY  (TKT_ID)";
263
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
264
-        $table_name = "esp_ticket_price";
265
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
263
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
264
+		$table_name = "esp_ticket_price";
265
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
266 266
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
267 267
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
268 268
 					  PRIMARY KEY  (TKP_ID)";
269
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
270
-        $table_name = "esp_datetime_ticket";
271
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
269
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
270
+		$table_name = "esp_datetime_ticket";
271
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
272 272
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
273 273
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
274 274
 					  PRIMARY KEY  (DTK_ID)";
275
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
276
-        $table_name = "esp_ticket_template";
277
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
275
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
276
+		$table_name = "esp_ticket_template";
277
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
278 278
 					  TTM_name VARCHAR(45) NOT NULL,
279 279
 					  TTM_description TEXT,
280 280
 					  TTM_file VARCHAR(45),
281 281
 					  PRIMARY KEY  (TTM_ID)";
282
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
283
-        $table_name = "esp_price";
284
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
282
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
283
+		$table_name = "esp_price";
284
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
285 285
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
286 286
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
287 287
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
 					  PRC_order TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
293 293
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
294 294
 					  PRIMARY KEY  (PRC_ID)";
295
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
296
-        $table_name = "esp_price_type";
297
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
295
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
296
+		$table_name = "esp_price_type";
297
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
298 298
 				  PRT_name VARCHAR(45) NOT NULL,
299 299
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
300 300
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -302,9 +302,9 @@  discard block
 block discarded – undo
302 302
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
303 303
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
304 304
 				  PRIMARY KEY  (PRT_ID)";
305
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
306
-        $table_name = 'esp_question';
307
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
305
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
306
+		$table_name = 'esp_question';
307
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
308 308
 					QST_display_text TEXT NOT NULL,
309 309
 					QST_admin_label VARCHAR(255) NOT NULL,
310 310
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -316,10 +316,10 @@  discard block
 block discarded – undo
316 316
 					QST_wp_user BIGINT UNSIGNED NULL,
317 317
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
318 318
 					PRIMARY KEY  (QST_ID)';
319
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
320
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
321
-        $table_name = 'esp_question_group';
322
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
319
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
320
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
321
+		$table_name = 'esp_question_group';
322
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
323 323
 					QSG_name VARCHAR(255) NOT NULL,
324 324
 					QSG_identifier VARCHAR(100) NOT NULL,
325 325
 					QSG_desc TEXT NULL,
@@ -330,25 +330,25 @@  discard block
 block discarded – undo
330 330
 					QSG_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
331 331
 					PRIMARY KEY  (QSG_ID),
332 332
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
333
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
334
-        $table_name = 'esp_question_group_question';
335
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
333
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
334
+		$table_name = 'esp_question_group_question';
335
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
336 336
 					QSG_ID INT UNSIGNED NOT NULL,
337 337
 					QST_ID INT UNSIGNED NOT NULL,
338 338
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
339 339
 					PRIMARY KEY  (QGQ_ID) ";
340
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
-        $table_name = 'esp_question_option';
342
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
340
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
+		$table_name = 'esp_question_option';
342
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
343 343
 					QSO_value VARCHAR(255) NOT NULL,
344 344
 					QSO_desc TEXT NOT NULL,
345 345
 					QST_ID INT UNSIGNED NOT NULL,
346 346
 					QSO_order INT UNSIGNED NOT NULL DEFAULT 0,
347 347
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
348 348
 					PRIMARY KEY  (QSO_ID)";
349
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
350
-        $table_name = 'esp_registration';
351
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
349
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
350
+		$table_name = 'esp_registration';
351
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
352 352
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
353 353
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
354 354
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -371,25 +371,25 @@  discard block
 block discarded – undo
371 371
 					  KEY STS_ID (STS_ID),
372 372
 					  KEY REG_url_link (REG_url_link),
373 373
 					  KEY REG_code (REG_code)";
374
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
375
-        $table_name = 'esp_checkin';
376
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
374
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
375
+		$table_name = 'esp_checkin';
376
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
377 377
 					REG_ID INT(10) UNSIGNED NOT NULL,
378 378
 					DTT_ID INT(10) UNSIGNED NOT NULL,
379 379
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
380 380
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
381 381
 					PRIMARY KEY  (CHK_ID)";
382
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
383
-        $table_name = 'esp_state';
384
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
382
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
383
+		$table_name = 'esp_state';
384
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
385 385
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
386 386
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
387 387
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
388 388
 					  STA_active TINYINT(1) DEFAULT '1',
389 389
 					  PRIMARY KEY  (STA_ID)";
390
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
391
-        $table_name = 'esp_status';
392
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
390
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
391
+		$table_name = 'esp_status';
392
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
393 393
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
394 394
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
395 395
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -397,9 +397,9 @@  discard block
 block discarded – undo
397 397
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
398 398
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
399 399
 					  KEY STS_type (STS_type)";
400
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
401
-        $table_name = 'esp_transaction';
402
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
400
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
401
+		$table_name = 'esp_transaction';
402
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
403 403
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
404 404
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
405 405
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 					  PRIMARY KEY  (TXN_ID),
410 410
 					  KEY TXN_timestamp (TXN_timestamp),
411 411
 					  KEY STS_ID (STS_ID)";
412
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
413
-        $table_name = 'esp_venue_meta';
414
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
412
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
413
+		$table_name = 'esp_venue_meta';
414
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
415 415
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
416 416
 			VNU_address VARCHAR(255) DEFAULT NULL,
417 417
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -429,79 +429,79 @@  discard block
 block discarded – undo
429 429
 			PRIMARY KEY  (VNUM_ID),
430 430
 			KEY STA_ID (STA_ID),
431 431
 			KEY CNT_ISO (CNT_ISO)";
432
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
433
-        $script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
434
-        //setting up the DEFAULT stats and countries is also essential for the data migrations to run
435
-        //(because many need to convert old string states to foreign keys into the states table)
436
-        $script_with_defaults->insert_default_states();
437
-        $script_with_defaults->insert_default_countries();
438
-        //setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
439
-        $script_with_defaults->insert_default_price_types();
440
-        $script_with_defaults->insert_default_prices();
441
-        //but the schema on the tickets table has changed since 4.1, so use our DEFAULT ticket method instead of 4.1's
442
-        $this->insert_default_tickets();
443
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
444
-        EE_Config::instance()->update_espresso_config(false, true);
445
-        return true;
446
-    }
447
-
448
-
449
-
450
-    /**
451
-     * @return boolean
452
-     */
453
-    public function schema_changes_after_migration()
454
-    {
455
-        return true;
456
-    }
457
-
458
-
459
-
460
-    public function migration_page_hooks()
461
-    {
462
-    }
463
-
464
-
465
-
466
-    /**
467
-     * insert DEFAULT ticket
468
-     * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field
469
-     *
470
-     * @access public
471
-     * @static
472
-     * @return void
473
-     */
474
-    public function insert_default_tickets()
475
-    {
476
-        global $wpdb;
477
-        $ticket_table = $wpdb->prefix . "esp_ticket";
478
-        if ($this->_get_table_analysis()->tableExists($ticket_table)) {
479
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
480
-            $tickets_exist = $wpdb->get_var($SQL);
481
-            if ( ! $tickets_exist) {
482
-                $SQL = "INSERT INTO $ticket_table
432
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
433
+		$script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
434
+		//setting up the DEFAULT stats and countries is also essential for the data migrations to run
435
+		//(because many need to convert old string states to foreign keys into the states table)
436
+		$script_with_defaults->insert_default_states();
437
+		$script_with_defaults->insert_default_countries();
438
+		//setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
439
+		$script_with_defaults->insert_default_price_types();
440
+		$script_with_defaults->insert_default_prices();
441
+		//but the schema on the tickets table has changed since 4.1, so use our DEFAULT ticket method instead of 4.1's
442
+		$this->insert_default_tickets();
443
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
444
+		EE_Config::instance()->update_espresso_config(false, true);
445
+		return true;
446
+	}
447
+
448
+
449
+
450
+	/**
451
+	 * @return boolean
452
+	 */
453
+	public function schema_changes_after_migration()
454
+	{
455
+		return true;
456
+	}
457
+
458
+
459
+
460
+	public function migration_page_hooks()
461
+	{
462
+	}
463
+
464
+
465
+
466
+	/**
467
+	 * insert DEFAULT ticket
468
+	 * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field
469
+	 *
470
+	 * @access public
471
+	 * @static
472
+	 * @return void
473
+	 */
474
+	public function insert_default_tickets()
475
+	{
476
+		global $wpdb;
477
+		$ticket_table = $wpdb->prefix . "esp_ticket";
478
+		if ($this->_get_table_analysis()->tableExists($ticket_table)) {
479
+			$SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
480
+			$tickets_exist = $wpdb->get_var($SQL);
481
+			if ( ! $tickets_exist) {
482
+				$SQL = "INSERT INTO $ticket_table
483 483
 					( TKT_ID, TTM_ID, TKT_name, TKT_description, TKT_qty, TKT_sold, TKT_uses, TKT_required, TKT_min, TKT_max, TKT_price, TKT_start_date, TKT_end_date, TKT_taxable, TKT_order, TKT_row, TKT_is_default, TKT_parent, TKT_deleted ) VALUES
484 484
 					( 1, 0, '"
485
-                       . __("Free Ticket", "event_espresso")
486
-                       . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, 0);";
487
-                $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL);
488
-                $wpdb->query($SQL);
489
-            }
490
-        }
491
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
492
-        if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
493
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
494
-            $ticket_prc_exist = $wpdb->get_var($SQL);
495
-            if ( ! $ticket_prc_exist) {
496
-                $SQL = "INSERT INTO $ticket_price_table
485
+					   . __("Free Ticket", "event_espresso")
486
+					   . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, 0);";
487
+				$SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL);
488
+				$wpdb->query($SQL);
489
+			}
490
+		}
491
+		$ticket_price_table = $wpdb->prefix . "esp_ticket_price";
492
+		if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
493
+			$SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
494
+			$ticket_prc_exist = $wpdb->get_var($SQL);
495
+			if ( ! $ticket_prc_exist) {
496
+				$SQL = "INSERT INTO $ticket_price_table
497 497
 				( TKP_ID, TKT_ID, PRC_ID ) VALUES
498 498
 				( 1, 1, 1 )
499 499
 				";
500
-                $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL);
501
-                $wpdb->query($SQL);
502
-            }
503
-        }
504
-    }
500
+				$SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL);
501
+				$wpdb->query($SQL);
502
+			}
503
+		}
504
+	}
505 505
 
506 506
 }
507 507
 
Please login to merge, or discard this patch.