Completed
Branch FET-8385-datetime-ticket-selec... (bfb5b4)
by
unknown
49:28 queued 38:10
created
caffeinated/core/libraries/shortcodes/EE_Question_List_Shortcodes.lib.php 1 patch
Indentation   +59 added lines, -59 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,77 +36,77 @@  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
-        foreach ($answers as $answer) {
100
-            $question = $answer->question();
101
-            if ($question instanceof EE_Question and $question->admin_only()) {
102
-                continue;
103
-            }
104
-            $ans_result .= $this->_shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes,
105
-                $this->_extra_data);
106
-        }
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
+		foreach ($answers as $answer) {
100
+			$question = $answer->question();
101
+			if ($question instanceof EE_Question and $question->admin_only()) {
102
+				continue;
103
+			}
104
+			$ans_result .= $this->_shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes,
105
+				$this->_extra_data);
106
+		}
107 107
         
108
-        return $ans_result;
109
-    }
108
+		return $ans_result;
109
+	}
110 110
     
111 111
     
112 112
 } //end EE_Question_List_Shortcodes class
Please login to merge, or discard this patch.
admin_pages/general_settings/General_Settings_Admin_Page.core.php 3 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
      *
599 599
      * @param    string $CNT_ISO
600 600
      *
601
-     * @return        mixed        string | array
601
+     * @return        string|null        string | array
602 602
      */
603 603
     public function display_country_settings($CNT_ISO = '')
604 604
     {
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
      *        delete_state
885 885
      *
886 886
      * @access    public
887
-     * @return        boolean | void
887
+     * @return        false|null | void
888 888
      */
889 889
     public function delete_state()
890 890
     {
@@ -1126,11 +1126,11 @@  discard block
 block discarded – undo
1126 1126
     /**
1127 1127
      * generates a dropdown of all parent pages - copied from WP core
1128 1128
      *
1129
-     * @param unknown_type $default
1130
-     * @param unknown_type $parent
1131
-     * @param unknown_type $level
1129
+     * @param integer $default
1130
+     * @param integer $parent
1131
+     * @param integer $level
1132 1132
      *
1133
-     * @return unknown
1133
+     * @return null|false
1134 1134
      */
1135 1135
     public static function page_settings_dropdown($default = 0, $parent = 0, $level = 0)
1136 1136
     {
Please login to merge, or discard this patch.
Indentation   +1025 added lines, -1025 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 use EventEspresso\admin_pages\general_settings\AdminOptionsSettings;
3 3
 
4 4
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
-    exit('NO direct script access allowed');
5
+	exit('NO direct script access allowed');
6 6
 }
7 7
 
8 8
 /**
@@ -22,1138 +22,1138 @@  discard block
 block discarded – undo
22 22
 {
23 23
     
24 24
     
25
-    /**
26
-     * _question_group
27
-     * holds the specific question group object for the question group details screen
28
-     * @var object
29
-     */
30
-    protected $_question_group;
25
+	/**
26
+	 * _question_group
27
+	 * holds the specific question group object for the question group details screen
28
+	 * @var object
29
+	 */
30
+	protected $_question_group;
31 31
     
32 32
     
33
-    public function __construct($routing = true)
34
-    {
35
-        parent::__construct($routing);
36
-    }
33
+	public function __construct($routing = true)
34
+	{
35
+		parent::__construct($routing);
36
+	}
37 37
     
38 38
     
39
-    protected function _init_page_props()
40
-    {
41
-        $this->page_slug        = GEN_SET_PG_SLUG;
42
-        $this->page_label       = GEN_SET_LABEL;
43
-        $this->_admin_base_url  = GEN_SET_ADMIN_URL;
44
-        $this->_admin_base_path = GEN_SET_ADMIN;
45
-    }
39
+	protected function _init_page_props()
40
+	{
41
+		$this->page_slug        = GEN_SET_PG_SLUG;
42
+		$this->page_label       = GEN_SET_LABEL;
43
+		$this->_admin_base_url  = GEN_SET_ADMIN_URL;
44
+		$this->_admin_base_path = GEN_SET_ADMIN;
45
+	}
46 46
     
47 47
     
48
-    protected function _ajax_hooks()
49
-    {
50
-        add_action('wp_ajax_espresso_display_country_settings', array($this, 'display_country_settings'));
51
-        add_action('wp_ajax_espresso_display_country_states', array($this, 'display_country_states'));
52
-        add_action('wp_ajax_espresso_delete_state', array($this, 'delete_state'), 10, 3);
53
-        add_action('wp_ajax_espresso_add_new_state', array($this, 'add_new_state'));
54
-    }
48
+	protected function _ajax_hooks()
49
+	{
50
+		add_action('wp_ajax_espresso_display_country_settings', array($this, 'display_country_settings'));
51
+		add_action('wp_ajax_espresso_display_country_states', array($this, 'display_country_states'));
52
+		add_action('wp_ajax_espresso_delete_state', array($this, 'delete_state'), 10, 3);
53
+		add_action('wp_ajax_espresso_add_new_state', array($this, 'add_new_state'));
54
+	}
55 55
     
56 56
     
57
-    protected function _define_page_props()
58
-    {
59
-        $this->_admin_page_title = GEN_SET_LABEL;
60
-        $this->_labels           = array(
61
-            'publishbox' => __('Update Settings', 'event_espresso')
62
-        );
63
-    }
57
+	protected function _define_page_props()
58
+	{
59
+		$this->_admin_page_title = GEN_SET_LABEL;
60
+		$this->_labels           = array(
61
+			'publishbox' => __('Update Settings', 'event_espresso')
62
+		);
63
+	}
64 64
     
65 65
     
66
-    protected function _set_page_routes()
67
-    {
68
-        $this->_page_routes = array(
66
+	protected function _set_page_routes()
67
+	{
68
+		$this->_page_routes = array(
69 69
             
70
-            'critical_pages'                => array(
71
-                'func'       => '_espresso_page_settings',
72
-                'capability' => 'manage_options'
73
-            ),
74
-            'update_espresso_page_settings' => array(
75
-                'func'       => '_update_espresso_page_settings',
76
-                'capability' => 'manage_options',
77
-                'noheader'   => true,
78
-            ),
79
-            'default'                       => array(
80
-                'func'       => '_your_organization_settings',
81
-                'capability' => 'manage_options',
82
-            ),
70
+			'critical_pages'                => array(
71
+				'func'       => '_espresso_page_settings',
72
+				'capability' => 'manage_options'
73
+			),
74
+			'update_espresso_page_settings' => array(
75
+				'func'       => '_update_espresso_page_settings',
76
+				'capability' => 'manage_options',
77
+				'noheader'   => true,
78
+			),
79
+			'default'                       => array(
80
+				'func'       => '_your_organization_settings',
81
+				'capability' => 'manage_options',
82
+			),
83 83
             
84
-            'update_your_organization_settings' => array(
85
-                'func'       => '_update_your_organization_settings',
86
-                'capability' => 'manage_options',
87
-                'noheader'   => true,
88
-            ),
84
+			'update_your_organization_settings' => array(
85
+				'func'       => '_update_your_organization_settings',
86
+				'capability' => 'manage_options',
87
+				'noheader'   => true,
88
+			),
89 89
             
90
-            'admin_option_settings' => array(
91
-                'func'       => '_admin_option_settings',
92
-                'capability' => 'manage_options',
93
-            ),
90
+			'admin_option_settings' => array(
91
+				'func'       => '_admin_option_settings',
92
+				'capability' => 'manage_options',
93
+			),
94 94
             
95
-            'update_admin_option_settings' => array(
96
-                'func'       => '_update_admin_option_settings',
97
-                'capability' => 'manage_options',
98
-                'noheader'   => true,
99
-            ),
95
+			'update_admin_option_settings' => array(
96
+				'func'       => '_update_admin_option_settings',
97
+				'capability' => 'manage_options',
98
+				'noheader'   => true,
99
+			),
100 100
             
101
-            'country_settings' => array(
102
-                'func'       => '_country_settings',
103
-                'capability' => 'manage_options'
104
-            ),
101
+			'country_settings' => array(
102
+				'func'       => '_country_settings',
103
+				'capability' => 'manage_options'
104
+			),
105 105
             
106
-            'update_country_settings' => array(
107
-                'func'       => '_update_country_settings',
108
-                'capability' => 'manage_options',
109
-                'noheader'   => true,
110
-            ),
106
+			'update_country_settings' => array(
107
+				'func'       => '_update_country_settings',
108
+				'capability' => 'manage_options',
109
+				'noheader'   => true,
110
+			),
111 111
             
112
-            'display_country_settings' => array(
113
-                'func'       => 'display_country_settings',
114
-                'capability' => 'manage_options',
115
-                'noheader'   => true,
116
-            ),
112
+			'display_country_settings' => array(
113
+				'func'       => 'display_country_settings',
114
+				'capability' => 'manage_options',
115
+				'noheader'   => true,
116
+			),
117 117
             
118
-            'add_new_state' => array(
119
-                'func'       => 'add_new_state',
120
-                'capability' => 'manage_options',
121
-                'noheader'   => true,
122
-            ),
118
+			'add_new_state' => array(
119
+				'func'       => 'add_new_state',
120
+				'capability' => 'manage_options',
121
+				'noheader'   => true,
122
+			),
123 123
             
124
-            'delete_state' => array(
125
-                'func'       => 'delete_state',
126
-                'capability' => 'manage_options',
127
-                'noheader'   => true,
128
-            )
129
-        );
130
-    }
131
-    
132
-    
133
-    protected function _set_page_config()
134
-    {
135
-        $this->_page_config = array(
136
-            'critical_pages'        => array(
137
-                'nav'           => array(
138
-                    'label' => __('Critical Pages', 'event_espresso'),
139
-                    'order' => 50
140
-                ),
141
-                'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
142
-                'help_tabs'     => array(
143
-                    'general_settings_critical_pages_help_tab' => array(
144
-                        'title'    => __('Critical Pages', 'event_espresso'),
145
-                        'filename' => 'general_settings_critical_pages'
146
-                    )
147
-                ),
148
-                'help_tour'     => array('Critical_Pages_Help_Tour'),
149
-                'require_nonce' => false
150
-            ),
151
-            'default'               => array(
152
-                'nav'           => array(
153
-                    'label' => __('Your Organization', 'event_espresso'),
154
-                    'order' => 20
155
-                ),
156
-                'help_tabs'     => array(
157
-                    'general_settings_your_organization_help_tab' => array(
158
-                        'title'    => __('Your Organization', 'event_espresso'),
159
-                        'filename' => 'general_settings_your_organization'
160
-                    )
161
-                ),
162
-                'help_tour'     => array('Your_Organization_Help_Tour'),
163
-                'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
164
-                'require_nonce' => false
165
-            ),
166
-            'admin_option_settings' => array(
167
-                'nav'           => array(
168
-                    'label' => __('Admin Options', 'event_espresso'),
169
-                    'order' => 60
170
-                ),
171
-                'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
172
-                'help_tabs'     => array(
173
-                    'general_settings_admin_options_help_tab' => array(
174
-                        'title'    => __('Admin Options', 'event_espresso'),
175
-                        'filename' => 'general_settings_admin_options'
176
-                    )
177
-                ),
178
-                'help_tour'     => array('Admin_Options_Help_Tour'),
179
-                'require_nonce' => false
180
-            ),
181
-            'country_settings'      => array(
182
-                'nav'           => array(
183
-                    'label' => __('Countries', 'event_espresso'),
184
-                    'order' => 70
185
-                ),
186
-                'help_tabs'     => array(
187
-                    'general_settings_countries_help_tab' => array(
188
-                        'title'    => __('Countries', 'event_espresso'),
189
-                        'filename' => 'general_settings_countries'
190
-                    )
191
-                ),
192
-                'help_tour'     => array('Countries_Help_Tour'),
193
-                'require_nonce' => false
194
-            )
195
-        );
196
-    }
197
-    
198
-    
199
-    protected function _add_screen_options()
200
-    {
201
-    }
202
-    
203
-    protected function _add_feature_pointers()
204
-    {
205
-    }
206
-    
207
-    public function load_scripts_styles()
208
-    {
209
-        //styles
210
-        wp_enqueue_style('espresso-ui-theme');
211
-        //scripts
212
-        wp_enqueue_script('ee_admin_js');
213
-    }
214
-    
215
-    public function admin_init()
216
-    {
217
-        EE_Registry::$i18n_js_strings['invalid_server_response'] = __('An error occurred! Your request may have been processed, but a valid response from the server was not received. Please refresh the page and try again.',
218
-            'event_espresso');
219
-        EE_Registry::$i18n_js_strings['error_occurred']          = __('An error occurred! Please refresh the page and try again.',
220
-            'event_espresso');
221
-        EE_Registry::$i18n_js_strings['confirm_delete_state']    = __('Are you sure you want to delete this State / Province?',
222
-            'event_espresso');
223
-        $protocol                                                = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
224
-        EE_Registry::$i18n_js_strings['ajax_url']                = admin_url('admin-ajax.php?page=espresso_general_settings',
225
-            $protocol);
226
-    }
227
-    
228
-    public function admin_notices()
229
-    {
230
-    }
231
-    
232
-    public function admin_footer_scripts()
233
-    {
234
-    }
235
-    
236
-    
237
-    public function load_scripts_styles_default()
238
-    {
239
-        //styles
240
-        wp_enqueue_style('thickbox');
241
-        //scripts
242
-        wp_enqueue_script('media-upload');
243
-        wp_enqueue_script('thickbox');
244
-        wp_register_script('organization_settings', GEN_SET_ASSETS_URL . 'your_organization_settings.js',
245
-            array('jquery', 'media-upload', 'thickbox'), EVENT_ESPRESSO_VERSION, true);
246
-        wp_register_style('organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION);
247
-        wp_enqueue_script('organization_settings');
248
-        wp_enqueue_style('organization-css');
249
-        $confirm_image_delete = array(
250
-            'text' => __('Do you really want to delete this image? Please remember to save your settings to complete the removal.',
251
-                'event_espresso')
252
-        );
253
-        wp_localize_script('organization_settings', 'confirm_image_delete', $confirm_image_delete);
124
+			'delete_state' => array(
125
+				'func'       => 'delete_state',
126
+				'capability' => 'manage_options',
127
+				'noheader'   => true,
128
+			)
129
+		);
130
+	}
131
+    
132
+    
133
+	protected function _set_page_config()
134
+	{
135
+		$this->_page_config = array(
136
+			'critical_pages'        => array(
137
+				'nav'           => array(
138
+					'label' => __('Critical Pages', 'event_espresso'),
139
+					'order' => 50
140
+				),
141
+				'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
142
+				'help_tabs'     => array(
143
+					'general_settings_critical_pages_help_tab' => array(
144
+						'title'    => __('Critical Pages', 'event_espresso'),
145
+						'filename' => 'general_settings_critical_pages'
146
+					)
147
+				),
148
+				'help_tour'     => array('Critical_Pages_Help_Tour'),
149
+				'require_nonce' => false
150
+			),
151
+			'default'               => array(
152
+				'nav'           => array(
153
+					'label' => __('Your Organization', 'event_espresso'),
154
+					'order' => 20
155
+				),
156
+				'help_tabs'     => array(
157
+					'general_settings_your_organization_help_tab' => array(
158
+						'title'    => __('Your Organization', 'event_espresso'),
159
+						'filename' => 'general_settings_your_organization'
160
+					)
161
+				),
162
+				'help_tour'     => array('Your_Organization_Help_Tour'),
163
+				'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
164
+				'require_nonce' => false
165
+			),
166
+			'admin_option_settings' => array(
167
+				'nav'           => array(
168
+					'label' => __('Admin Options', 'event_espresso'),
169
+					'order' => 60
170
+				),
171
+				'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')),
172
+				'help_tabs'     => array(
173
+					'general_settings_admin_options_help_tab' => array(
174
+						'title'    => __('Admin Options', 'event_espresso'),
175
+						'filename' => 'general_settings_admin_options'
176
+					)
177
+				),
178
+				'help_tour'     => array('Admin_Options_Help_Tour'),
179
+				'require_nonce' => false
180
+			),
181
+			'country_settings'      => array(
182
+				'nav'           => array(
183
+					'label' => __('Countries', 'event_espresso'),
184
+					'order' => 70
185
+				),
186
+				'help_tabs'     => array(
187
+					'general_settings_countries_help_tab' => array(
188
+						'title'    => __('Countries', 'event_espresso'),
189
+						'filename' => 'general_settings_countries'
190
+					)
191
+				),
192
+				'help_tour'     => array('Countries_Help_Tour'),
193
+				'require_nonce' => false
194
+			)
195
+		);
196
+	}
197
+    
198
+    
199
+	protected function _add_screen_options()
200
+	{
201
+	}
202
+    
203
+	protected function _add_feature_pointers()
204
+	{
205
+	}
206
+    
207
+	public function load_scripts_styles()
208
+	{
209
+		//styles
210
+		wp_enqueue_style('espresso-ui-theme');
211
+		//scripts
212
+		wp_enqueue_script('ee_admin_js');
213
+	}
214
+    
215
+	public function admin_init()
216
+	{
217
+		EE_Registry::$i18n_js_strings['invalid_server_response'] = __('An error occurred! Your request may have been processed, but a valid response from the server was not received. Please refresh the page and try again.',
218
+			'event_espresso');
219
+		EE_Registry::$i18n_js_strings['error_occurred']          = __('An error occurred! Please refresh the page and try again.',
220
+			'event_espresso');
221
+		EE_Registry::$i18n_js_strings['confirm_delete_state']    = __('Are you sure you want to delete this State / Province?',
222
+			'event_espresso');
223
+		$protocol                                                = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
224
+		EE_Registry::$i18n_js_strings['ajax_url']                = admin_url('admin-ajax.php?page=espresso_general_settings',
225
+			$protocol);
226
+	}
227
+    
228
+	public function admin_notices()
229
+	{
230
+	}
231
+    
232
+	public function admin_footer_scripts()
233
+	{
234
+	}
235
+    
236
+    
237
+	public function load_scripts_styles_default()
238
+	{
239
+		//styles
240
+		wp_enqueue_style('thickbox');
241
+		//scripts
242
+		wp_enqueue_script('media-upload');
243
+		wp_enqueue_script('thickbox');
244
+		wp_register_script('organization_settings', GEN_SET_ASSETS_URL . 'your_organization_settings.js',
245
+			array('jquery', 'media-upload', 'thickbox'), EVENT_ESPRESSO_VERSION, true);
246
+		wp_register_style('organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION);
247
+		wp_enqueue_script('organization_settings');
248
+		wp_enqueue_style('organization-css');
249
+		$confirm_image_delete = array(
250
+			'text' => __('Do you really want to delete this image? Please remember to save your settings to complete the removal.',
251
+				'event_espresso')
252
+		);
253
+		wp_localize_script('organization_settings', 'confirm_image_delete', $confirm_image_delete);
254 254
         
255
-    }
256
-    
257
-    public function load_scripts_styles_country_settings()
258
-    {
259
-        //scripts
260
-        wp_register_script('gen_settings_countries', GEN_SET_ASSETS_URL . 'gen_settings_countries.js',
261
-            array('ee_admin_js'), EVENT_ESPRESSO_VERSION, true);
262
-        wp_register_style('organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION);
263
-        wp_enqueue_script('gen_settings_countries');
264
-        wp_enqueue_style('organization-css');
255
+	}
256
+    
257
+	public function load_scripts_styles_country_settings()
258
+	{
259
+		//scripts
260
+		wp_register_script('gen_settings_countries', GEN_SET_ASSETS_URL . 'gen_settings_countries.js',
261
+			array('ee_admin_js'), EVENT_ESPRESSO_VERSION, true);
262
+		wp_register_style('organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION);
263
+		wp_enqueue_script('gen_settings_countries');
264
+		wp_enqueue_style('organization-css');
265 265
         
266
-    }
267
-    
268
-    
269
-    /*************        Espresso Pages        *************/
270
-    /**
271
-     * _espresso_page_settings
272
-     *
273
-     * @throws \EE_Error
274
-     */
275
-    protected function _espresso_page_settings()
276
-    {
277
-        // Check to make sure all of the main pages are setup properly,
278
-        // if not create the default pages and display an admin notice
279
-        EEH_Activation::verify_default_pages_exist();
280
-        $this->_transient_garbage_collection();
281
-        $this->_template_args['values']             = $this->_yes_no_values;
282
-        $this->_template_args['reg_page_id']        = isset(EE_Registry::instance()->CFG->core->reg_page_id)
283
-            ? EE_Registry::instance()->CFG->core->reg_page_id
284
-            : null;
285
-        $this->_template_args['reg_page_obj']       = isset(EE_Registry::instance()->CFG->core->reg_page_id)
286
-            ? get_page(EE_Registry::instance()->CFG->core->reg_page_id)
287
-            : false;
288
-        $this->_template_args['txn_page_id']        = isset(EE_Registry::instance()->CFG->core->txn_page_id)
289
-            ? EE_Registry::instance()->CFG->core->txn_page_id
290
-            : null;
291
-        $this->_template_args['txn_page_obj']       = isset(EE_Registry::instance()->CFG->core->txn_page_id)
292
-            ? get_page(EE_Registry::instance()->CFG->core->txn_page_id)
293
-            : false;
294
-        $this->_template_args['thank_you_page_id']  = isset(EE_Registry::instance()->CFG->core->thank_you_page_id)
295
-            ? EE_Registry::instance()->CFG->core->thank_you_page_id
296
-            : null;
297
-        $this->_template_args['thank_you_page_obj'] = isset(EE_Registry::instance()->CFG->core->thank_you_page_id)
298
-            ? get_page(EE_Registry::instance()->CFG->core->thank_you_page_id)
299
-            : false;
300
-        $this->_template_args['cancel_page_id']     = isset(EE_Registry::instance()->CFG->core->cancel_page_id)
301
-            ? EE_Registry::instance()->CFG->core->cancel_page_id
302
-            : null;
303
-        $this->_template_args['cancel_page_obj']    = isset(EE_Registry::instance()->CFG->core->cancel_page_id)
304
-            ? get_page(EE_Registry::instance()->CFG->core->cancel_page_id)
305
-            : false;
306
-        $this->_set_add_edit_form_tags('update_espresso_page_settings');
307
-        $this->_set_publish_post_box_vars(null, false, false, null, false);
308
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(
309
-            GEN_SET_TEMPLATE_PATH . 'espresso_page_settings.template.php',
310
-            $this->_template_args,
311
-            true
312
-        );
313
-        $this->display_admin_page_with_sidebar();
266
+	}
267
+    
268
+    
269
+	/*************        Espresso Pages        *************/
270
+	/**
271
+	 * _espresso_page_settings
272
+	 *
273
+	 * @throws \EE_Error
274
+	 */
275
+	protected function _espresso_page_settings()
276
+	{
277
+		// Check to make sure all of the main pages are setup properly,
278
+		// if not create the default pages and display an admin notice
279
+		EEH_Activation::verify_default_pages_exist();
280
+		$this->_transient_garbage_collection();
281
+		$this->_template_args['values']             = $this->_yes_no_values;
282
+		$this->_template_args['reg_page_id']        = isset(EE_Registry::instance()->CFG->core->reg_page_id)
283
+			? EE_Registry::instance()->CFG->core->reg_page_id
284
+			: null;
285
+		$this->_template_args['reg_page_obj']       = isset(EE_Registry::instance()->CFG->core->reg_page_id)
286
+			? get_page(EE_Registry::instance()->CFG->core->reg_page_id)
287
+			: false;
288
+		$this->_template_args['txn_page_id']        = isset(EE_Registry::instance()->CFG->core->txn_page_id)
289
+			? EE_Registry::instance()->CFG->core->txn_page_id
290
+			: null;
291
+		$this->_template_args['txn_page_obj']       = isset(EE_Registry::instance()->CFG->core->txn_page_id)
292
+			? get_page(EE_Registry::instance()->CFG->core->txn_page_id)
293
+			: false;
294
+		$this->_template_args['thank_you_page_id']  = isset(EE_Registry::instance()->CFG->core->thank_you_page_id)
295
+			? EE_Registry::instance()->CFG->core->thank_you_page_id
296
+			: null;
297
+		$this->_template_args['thank_you_page_obj'] = isset(EE_Registry::instance()->CFG->core->thank_you_page_id)
298
+			? get_page(EE_Registry::instance()->CFG->core->thank_you_page_id)
299
+			: false;
300
+		$this->_template_args['cancel_page_id']     = isset(EE_Registry::instance()->CFG->core->cancel_page_id)
301
+			? EE_Registry::instance()->CFG->core->cancel_page_id
302
+			: null;
303
+		$this->_template_args['cancel_page_obj']    = isset(EE_Registry::instance()->CFG->core->cancel_page_id)
304
+			? get_page(EE_Registry::instance()->CFG->core->cancel_page_id)
305
+			: false;
306
+		$this->_set_add_edit_form_tags('update_espresso_page_settings');
307
+		$this->_set_publish_post_box_vars(null, false, false, null, false);
308
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template(
309
+			GEN_SET_TEMPLATE_PATH . 'espresso_page_settings.template.php',
310
+			$this->_template_args,
311
+			true
312
+		);
313
+		$this->display_admin_page_with_sidebar();
314 314
         
315
-    }
316
-    
317
-    protected function _update_espresso_page_settings()
318
-    {
319
-        // capture incoming request data
320
-        $reg_page_id       = isset($this->_req_data['reg_page_id']) ? absint($this->_req_data['reg_page_id']) : EE_Registry::instance()->CFG->core->reg_page_id;
321
-        $txn_page_id       = isset($this->_req_data['txn_page_id']) ? absint($this->_req_data['txn_page_id']) : EE_Registry::instance()->CFG->core->txn_page_id;
322
-        $thank_you_page_id = isset($this->_req_data['thank_you_page_id']) ? absint($this->_req_data['thank_you_page_id']) : EE_Registry::instance()->CFG->core->thank_you_page_id;
323
-        $cancel_page_id    = isset($this->_req_data['cancel_page_id']) ? absint($this->_req_data['cancel_page_id']) : EE_Registry::instance()->CFG->core->cancel_page_id;
324
-        // pack critical_pages into an array
325
-        $critical_pages = array(
326
-            'reg_page_id'       => $reg_page_id,
327
-            'txn_page_id'       => $txn_page_id,
328
-            'thank_you_page_id' => $thank_you_page_id,
329
-            'cancel_page_id'    => $cancel_page_id
330
-        );
331
-        foreach ($critical_pages as $critical_page_name => $critical_page_id) {
332
-            // has the page changed ?
333
-            if (EE_Registry::instance()->CFG->core->{$critical_page_name} !== $critical_page_id) {
334
-                // grab post object for old page
335
-                $post = get_post(EE_Registry::instance()->CFG->core->{$critical_page_name});
336
-                // update post shortcodes for old page
337
-                EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save($critical_page_id, $post);
338
-                // grab post object for new page
339
-                $post = get_post($critical_page_id);
340
-                // update post shortcodes for new page
341
-                EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save($critical_page_id, $post);
342
-            }
343
-        }
344
-        // set page IDs
345
-        EE_Registry::instance()->CFG->core->reg_page_id       = $reg_page_id;
346
-        EE_Registry::instance()->CFG->core->txn_page_id       = $txn_page_id;
347
-        EE_Registry::instance()->CFG->core->thank_you_page_id = $thank_you_page_id;
348
-        EE_Registry::instance()->CFG->core->cancel_page_id    = $cancel_page_id;
315
+	}
316
+    
317
+	protected function _update_espresso_page_settings()
318
+	{
319
+		// capture incoming request data
320
+		$reg_page_id       = isset($this->_req_data['reg_page_id']) ? absint($this->_req_data['reg_page_id']) : EE_Registry::instance()->CFG->core->reg_page_id;
321
+		$txn_page_id       = isset($this->_req_data['txn_page_id']) ? absint($this->_req_data['txn_page_id']) : EE_Registry::instance()->CFG->core->txn_page_id;
322
+		$thank_you_page_id = isset($this->_req_data['thank_you_page_id']) ? absint($this->_req_data['thank_you_page_id']) : EE_Registry::instance()->CFG->core->thank_you_page_id;
323
+		$cancel_page_id    = isset($this->_req_data['cancel_page_id']) ? absint($this->_req_data['cancel_page_id']) : EE_Registry::instance()->CFG->core->cancel_page_id;
324
+		// pack critical_pages into an array
325
+		$critical_pages = array(
326
+			'reg_page_id'       => $reg_page_id,
327
+			'txn_page_id'       => $txn_page_id,
328
+			'thank_you_page_id' => $thank_you_page_id,
329
+			'cancel_page_id'    => $cancel_page_id
330
+		);
331
+		foreach ($critical_pages as $critical_page_name => $critical_page_id) {
332
+			// has the page changed ?
333
+			if (EE_Registry::instance()->CFG->core->{$critical_page_name} !== $critical_page_id) {
334
+				// grab post object for old page
335
+				$post = get_post(EE_Registry::instance()->CFG->core->{$critical_page_name});
336
+				// update post shortcodes for old page
337
+				EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save($critical_page_id, $post);
338
+				// grab post object for new page
339
+				$post = get_post($critical_page_id);
340
+				// update post shortcodes for new page
341
+				EventEspresso\core\admin\PostShortcodeTracking::parse_post_content_on_save($critical_page_id, $post);
342
+			}
343
+		}
344
+		// set page IDs
345
+		EE_Registry::instance()->CFG->core->reg_page_id       = $reg_page_id;
346
+		EE_Registry::instance()->CFG->core->txn_page_id       = $txn_page_id;
347
+		EE_Registry::instance()->CFG->core->thank_you_page_id = $thank_you_page_id;
348
+		EE_Registry::instance()->CFG->core->cancel_page_id    = $cancel_page_id;
349 349
         
350
-        EE_Registry::instance()->CFG->core = apply_filters('FHEE__General_Settings_Admin_Page___update_espresso_page_settings__CFG_core',
351
-            EE_Registry::instance()->CFG->core, $this->_req_data);
350
+		EE_Registry::instance()->CFG->core = apply_filters('FHEE__General_Settings_Admin_Page___update_espresso_page_settings__CFG_core',
351
+			EE_Registry::instance()->CFG->core, $this->_req_data);
352 352
         
353
-        $what       = __('Critical Pages & Shortcodes', 'event_espresso');
354
-        $success    = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG->core, __FILE__,
355
-            __FUNCTION__, __LINE__);
356
-        $query_args = array(
357
-            'action' => 'critical_pages'
358
-        );
359
-        $this->_redirect_after_action(false, '', '', $query_args, true);
353
+		$what       = __('Critical Pages & Shortcodes', 'event_espresso');
354
+		$success    = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG->core, __FILE__,
355
+			__FUNCTION__, __LINE__);
356
+		$query_args = array(
357
+			'action' => 'critical_pages'
358
+		);
359
+		$this->_redirect_after_action(false, '', '', $query_args, true);
360 360
         
361
-    }
361
+	}
362 362
     
363 363
     
364
-    /*************        Your Organization        *************/
364
+	/*************        Your Organization        *************/
365 365
     
366 366
     
367
-    protected function _your_organization_settings()
368
-    {
367
+	protected function _your_organization_settings()
368
+	{
369 369
         
370
-        $this->_template_args['site_license_key']       = isset(EE_Registry::instance()->NET_CFG->core->site_license_key) ? EE_Registry::instance()->NET_CFG->core->get_pretty('site_license_key') : '';
371
-        $this->_template_args['organization_name']      = isset(EE_Registry::instance()->CFG->organization->name) ? EE_Registry::instance()->CFG->organization->get_pretty('name') : '';
372
-        $this->_template_args['organization_address_1'] = isset(EE_Registry::instance()->CFG->organization->address_1) ? EE_Registry::instance()->CFG->organization->get_pretty('address_1') : '';
373
-        $this->_template_args['organization_address_2'] = isset(EE_Registry::instance()->CFG->organization->address_2) ? EE_Registry::instance()->CFG->organization->get_pretty('address_2') : '';
374
-        $this->_template_args['organization_city']      = isset(EE_Registry::instance()->CFG->organization->city) ? EE_Registry::instance()->CFG->organization->get_pretty('city') : '';
375
-        $this->_template_args['organization_zip']       = isset(EE_Registry::instance()->CFG->organization->zip) ? EE_Registry::instance()->CFG->organization->get_pretty('zip') : '';
376
-        $this->_template_args['organization_email']     = isset(EE_Registry::instance()->CFG->organization->email) ? EE_Registry::instance()->CFG->organization->get_pretty('email') : '';
377
-        $this->_template_args['organization_phone']     = isset(EE_Registry::instance()->CFG->organization->phone) ? EE_Registry::instance()->CFG->organization->get_pretty('phone') : '';
378
-        $this->_template_args['organization_vat']       = isset(EE_Registry::instance()->CFG->organization->vat) ? EE_Registry::instance()->CFG->organization->get_pretty('vat') : '';
379
-        $this->_template_args['currency_sign']          = isset(EE_Registry::instance()->CFG->currency->sign) ? EE_Registry::instance()->CFG->currency->get_pretty('sign') : '$';
380
-        $this->_template_args['organization_logo_url']  = isset(EE_Registry::instance()->CFG->organization->logo_url) ? EE_Registry::instance()->CFG->organization->get_pretty('logo_url') : false;
381
-        $this->_template_args['organization_facebook']  = isset(EE_Registry::instance()->CFG->organization->facebook) ? EE_Registry::instance()->CFG->organization->get_pretty('facebook') : '';
382
-        $this->_template_args['organization_twitter']   = isset(EE_Registry::instance()->CFG->organization->twitter) ? EE_Registry::instance()->CFG->organization->get_pretty('twitter') : '';
383
-        $this->_template_args['organization_linkedin']  = isset(EE_Registry::instance()->CFG->organization->linkedin) ? EE_Registry::instance()->CFG->organization->get_pretty('linkedin') : '';
384
-        $this->_template_args['organization_pinterest'] = isset(EE_Registry::instance()->CFG->organization->pinterest) ? EE_Registry::instance()->CFG->organization->get_pretty('pinterest') : '';
385
-        $this->_template_args['organization_google']    = isset(EE_Registry::instance()->CFG->organization->google) ? EE_Registry::instance()->CFG->organization->get_pretty('google') : '';
386
-        $this->_template_args['organization_instagram'] = isset(EE_Registry::instance()->CFG->organization->instagram) ? EE_Registry::instance()->CFG->organization->get_pretty('instagram') : '';
387
-        //UXIP settings
388
-        $this->_template_args['ee_ueip_optin'] = isset(EE_Registry::instance()->CFG->core->ee_ueip_optin) ? EE_Registry::instance()->CFG->core->get_pretty('ee_ueip_optin') : true;
370
+		$this->_template_args['site_license_key']       = isset(EE_Registry::instance()->NET_CFG->core->site_license_key) ? EE_Registry::instance()->NET_CFG->core->get_pretty('site_license_key') : '';
371
+		$this->_template_args['organization_name']      = isset(EE_Registry::instance()->CFG->organization->name) ? EE_Registry::instance()->CFG->organization->get_pretty('name') : '';
372
+		$this->_template_args['organization_address_1'] = isset(EE_Registry::instance()->CFG->organization->address_1) ? EE_Registry::instance()->CFG->organization->get_pretty('address_1') : '';
373
+		$this->_template_args['organization_address_2'] = isset(EE_Registry::instance()->CFG->organization->address_2) ? EE_Registry::instance()->CFG->organization->get_pretty('address_2') : '';
374
+		$this->_template_args['organization_city']      = isset(EE_Registry::instance()->CFG->organization->city) ? EE_Registry::instance()->CFG->organization->get_pretty('city') : '';
375
+		$this->_template_args['organization_zip']       = isset(EE_Registry::instance()->CFG->organization->zip) ? EE_Registry::instance()->CFG->organization->get_pretty('zip') : '';
376
+		$this->_template_args['organization_email']     = isset(EE_Registry::instance()->CFG->organization->email) ? EE_Registry::instance()->CFG->organization->get_pretty('email') : '';
377
+		$this->_template_args['organization_phone']     = isset(EE_Registry::instance()->CFG->organization->phone) ? EE_Registry::instance()->CFG->organization->get_pretty('phone') : '';
378
+		$this->_template_args['organization_vat']       = isset(EE_Registry::instance()->CFG->organization->vat) ? EE_Registry::instance()->CFG->organization->get_pretty('vat') : '';
379
+		$this->_template_args['currency_sign']          = isset(EE_Registry::instance()->CFG->currency->sign) ? EE_Registry::instance()->CFG->currency->get_pretty('sign') : '$';
380
+		$this->_template_args['organization_logo_url']  = isset(EE_Registry::instance()->CFG->organization->logo_url) ? EE_Registry::instance()->CFG->organization->get_pretty('logo_url') : false;
381
+		$this->_template_args['organization_facebook']  = isset(EE_Registry::instance()->CFG->organization->facebook) ? EE_Registry::instance()->CFG->organization->get_pretty('facebook') : '';
382
+		$this->_template_args['organization_twitter']   = isset(EE_Registry::instance()->CFG->organization->twitter) ? EE_Registry::instance()->CFG->organization->get_pretty('twitter') : '';
383
+		$this->_template_args['organization_linkedin']  = isset(EE_Registry::instance()->CFG->organization->linkedin) ? EE_Registry::instance()->CFG->organization->get_pretty('linkedin') : '';
384
+		$this->_template_args['organization_pinterest'] = isset(EE_Registry::instance()->CFG->organization->pinterest) ? EE_Registry::instance()->CFG->organization->get_pretty('pinterest') : '';
385
+		$this->_template_args['organization_google']    = isset(EE_Registry::instance()->CFG->organization->google) ? EE_Registry::instance()->CFG->organization->get_pretty('google') : '';
386
+		$this->_template_args['organization_instagram'] = isset(EE_Registry::instance()->CFG->organization->instagram) ? EE_Registry::instance()->CFG->organization->get_pretty('instagram') : '';
387
+		//UXIP settings
388
+		$this->_template_args['ee_ueip_optin'] = isset(EE_Registry::instance()->CFG->core->ee_ueip_optin) ? EE_Registry::instance()->CFG->core->get_pretty('ee_ueip_optin') : true;
389 389
         
390
-        $STA_ID                         = isset(EE_Registry::instance()->CFG->organization->STA_ID) ? EE_Registry::instance()->CFG->organization->STA_ID : 4;
391
-        $this->_template_args['states'] = new EE_Question_Form_Input(
392
-            EE_Question::new_instance(array(
393
-                'QST_ID'           => 0,
394
-                'QST_display_text' => __('State/Province', 'event_espresso'),
395
-                'QST_system'       => 'admin-state'
396
-            )),
397
-            EE_Answer::new_instance(array(
398
-                'ANS_ID'    => 0,
399
-                'ANS_value' => $STA_ID
400
-            )),
401
-            array(
402
-                'input_id'       => 'organization_state',
403
-                'input_name'     => 'organization_state',
404
-                'input_prefix'   => '',
405
-                'append_qstn_id' => false
406
-            )
407
-        );
390
+		$STA_ID                         = isset(EE_Registry::instance()->CFG->organization->STA_ID) ? EE_Registry::instance()->CFG->organization->STA_ID : 4;
391
+		$this->_template_args['states'] = new EE_Question_Form_Input(
392
+			EE_Question::new_instance(array(
393
+				'QST_ID'           => 0,
394
+				'QST_display_text' => __('State/Province', 'event_espresso'),
395
+				'QST_system'       => 'admin-state'
396
+			)),
397
+			EE_Answer::new_instance(array(
398
+				'ANS_ID'    => 0,
399
+				'ANS_value' => $STA_ID
400
+			)),
401
+			array(
402
+				'input_id'       => 'organization_state',
403
+				'input_name'     => 'organization_state',
404
+				'input_prefix'   => '',
405
+				'append_qstn_id' => false
406
+			)
407
+		);
408 408
         
409
-        $CNT_ISO                           = isset(EE_Registry::instance()->CFG->organization->CNT_ISO) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US';
410
-        $this->_template_args['countries'] = new EE_Question_Form_Input(
411
-            EE_Question::new_instance(array(
412
-                'QST_ID'           => 0,
413
-                'QST_display_text' => __('Country', 'event_espresso'),
414
-                'QST_system'       => 'admin-country'
415
-            )),
416
-            EE_Answer::new_instance(array(
417
-                'ANS_ID'    => 0,
418
-                'ANS_value' => $CNT_ISO
419
-            )),
420
-            array(
421
-                'input_id'       => 'organization_country',
422
-                'input_name'     => 'organization_country',
423
-                'input_prefix'   => '',
424
-                'append_qstn_id' => false
425
-            )
426
-        );
409
+		$CNT_ISO                           = isset(EE_Registry::instance()->CFG->organization->CNT_ISO) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US';
410
+		$this->_template_args['countries'] = new EE_Question_Form_Input(
411
+			EE_Question::new_instance(array(
412
+				'QST_ID'           => 0,
413
+				'QST_display_text' => __('Country', 'event_espresso'),
414
+				'QST_system'       => 'admin-country'
415
+			)),
416
+			EE_Answer::new_instance(array(
417
+				'ANS_ID'    => 0,
418
+				'ANS_value' => $CNT_ISO
419
+			)),
420
+			array(
421
+				'input_id'       => 'organization_country',
422
+				'input_name'     => 'organization_country',
423
+				'input_prefix'   => '',
424
+				'append_qstn_id' => false
425
+			)
426
+		);
427 427
         
428
-        add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2);
429
-        add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
428
+		add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2);
429
+		add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
430 430
         
431
-        //PUE verification stuff
432
-        $ver_option_key                                    = 'puvererr_' . basename(EE_PLUGIN_BASENAME);
433
-        $verify_fail                                       = get_option($ver_option_key);
434
-        $this->_template_args['site_license_key_verified'] = $verify_fail || ! empty($verify_fail) || (empty($this->_template_args['site_license_key']) && empty($verify_fail)) ? '<span class="dashicons dashicons-admin-network ee-icon-color-ee-red ee-icon-size-20"></span>' : '<span class="dashicons dashicons-admin-network ee-icon-color-ee-green ee-icon-size-20"></span>';
431
+		//PUE verification stuff
432
+		$ver_option_key                                    = 'puvererr_' . basename(EE_PLUGIN_BASENAME);
433
+		$verify_fail                                       = get_option($ver_option_key);
434
+		$this->_template_args['site_license_key_verified'] = $verify_fail || ! empty($verify_fail) || (empty($this->_template_args['site_license_key']) && empty($verify_fail)) ? '<span class="dashicons dashicons-admin-network ee-icon-color-ee-red ee-icon-size-20"></span>' : '<span class="dashicons dashicons-admin-network ee-icon-color-ee-green ee-icon-size-20"></span>';
435 435
         
436
-        $this->_set_add_edit_form_tags('update_your_organization_settings');
437
-        $this->_set_publish_post_box_vars(null, false, false, null, false);
438
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'your_organization_settings.template.php',
439
-            $this->_template_args, true);
436
+		$this->_set_add_edit_form_tags('update_your_organization_settings');
437
+		$this->_set_publish_post_box_vars(null, false, false, null, false);
438
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'your_organization_settings.template.php',
439
+			$this->_template_args, true);
440 440
         
441
-        $this->display_admin_page_with_sidebar();
442
-    }
443
-    
444
-    protected function _update_your_organization_settings()
445
-    {
446
-        if (is_main_site()) {
447
-            EE_Registry::instance()->NET_CFG->core->site_license_key = isset($this->_req_data['site_license_key']) ? sanitize_text_field($this->_req_data['site_license_key']) : EE_Registry::instance()->NET_CFG->core->site_license_key;
448
-        }
449
-        EE_Registry::instance()->CFG->organization->name      = isset($this->_req_data['organization_name']) ? sanitize_text_field($this->_req_data['organization_name']) : EE_Registry::instance()->CFG->organization->name;
450
-        EE_Registry::instance()->CFG->organization->address_1 = isset($this->_req_data['organization_address_1']) ? sanitize_text_field($this->_req_data['organization_address_1']) : EE_Registry::instance()->CFG->organization->address_1;
451
-        EE_Registry::instance()->CFG->organization->address_2 = isset($this->_req_data['organization_address_2']) ? sanitize_text_field($this->_req_data['organization_address_2']) : EE_Registry::instance()->CFG->organization->address_2;
452
-        EE_Registry::instance()->CFG->organization->city      = isset($this->_req_data['organization_city']) ? sanitize_text_field($this->_req_data['organization_city']) : EE_Registry::instance()->CFG->organization->city;
453
-        EE_Registry::instance()->CFG->organization->STA_ID    = isset($this->_req_data['organization_state']) ? absint($this->_req_data['organization_state']) : EE_Registry::instance()->CFG->organization->STA_ID;
454
-        EE_Registry::instance()->CFG->organization->CNT_ISO   = isset($this->_req_data['organization_country']) ? sanitize_text_field($this->_req_data['organization_country']) : EE_Registry::instance()->CFG->organization->CNT_ISO;
455
-        EE_Registry::instance()->CFG->organization->zip       = isset($this->_req_data['organization_zip']) ? sanitize_text_field($this->_req_data['organization_zip']) : EE_Registry::instance()->CFG->organization->zip;
456
-        EE_Registry::instance()->CFG->organization->email     = isset($this->_req_data['organization_email']) ? sanitize_email($this->_req_data['organization_email']) : EE_Registry::instance()->CFG->organization->email;
457
-        EE_Registry::instance()->CFG->organization->vat       = isset($this->_req_data['organization_vat']) ? sanitize_text_field($this->_req_data['organization_vat']) : EE_Registry::instance()->CFG->organization->vat;
458
-        EE_Registry::instance()->CFG->organization->phone     = isset($this->_req_data['organization_phone']) ? sanitize_text_field($this->_req_data['organization_phone']) : EE_Registry::instance()->CFG->organization->phone;
459
-        EE_Registry::instance()->CFG->organization->logo_url  = isset($this->_req_data['organization_logo_url']) ? esc_url_raw($this->_req_data['organization_logo_url']) : EE_Registry::instance()->CFG->organization->logo_url;
460
-        EE_Registry::instance()->CFG->organization->facebook  = isset($this->_req_data['organization_facebook']) ? esc_url_raw($this->_req_data['organization_facebook']) : EE_Registry::instance()->CFG->organization->facebook;
461
-        EE_Registry::instance()->CFG->organization->twitter   = isset($this->_req_data['organization_twitter']) ? esc_url_raw($this->_req_data['organization_twitter']) : EE_Registry::instance()->CFG->organization->twitter;
462
-        EE_Registry::instance()->CFG->organization->linkedin  = isset($this->_req_data['organization_linkedin']) ? esc_url_raw($this->_req_data['organization_linkedin']) : EE_Registry::instance()->CFG->organization->linkedin;
463
-        EE_Registry::instance()->CFG->organization->pinterest = isset($this->_req_data['organization_pinterest']) ? esc_url_raw($this->_req_data['organization_pinterest']) : EE_Registry::instance()->CFG->organization->pinterest;
464
-        EE_Registry::instance()->CFG->organization->google    = isset($this->_req_data['organization_google']) ? esc_url_raw($this->_req_data['organization_google']) : EE_Registry::instance()->CFG->organization->google;
465
-        EE_Registry::instance()->CFG->organization->instagram = isset($this->_req_data['organization_instagram']) ? esc_url_raw($this->_req_data['organization_instagram']) : EE_Registry::instance()->CFG->organization->instagram;
466
-        EE_Registry::instance()->CFG->core->ee_ueip_optin     = isset($this->_req_data['ueip_optin']) && ! empty($this->_req_data['ueip_optin']) ? $this->_req_data['ueip_optin'] : EE_Registry::instance()->CFG->core->ee_ueip_optin;
441
+		$this->display_admin_page_with_sidebar();
442
+	}
443
+    
444
+	protected function _update_your_organization_settings()
445
+	{
446
+		if (is_main_site()) {
447
+			EE_Registry::instance()->NET_CFG->core->site_license_key = isset($this->_req_data['site_license_key']) ? sanitize_text_field($this->_req_data['site_license_key']) : EE_Registry::instance()->NET_CFG->core->site_license_key;
448
+		}
449
+		EE_Registry::instance()->CFG->organization->name      = isset($this->_req_data['organization_name']) ? sanitize_text_field($this->_req_data['organization_name']) : EE_Registry::instance()->CFG->organization->name;
450
+		EE_Registry::instance()->CFG->organization->address_1 = isset($this->_req_data['organization_address_1']) ? sanitize_text_field($this->_req_data['organization_address_1']) : EE_Registry::instance()->CFG->organization->address_1;
451
+		EE_Registry::instance()->CFG->organization->address_2 = isset($this->_req_data['organization_address_2']) ? sanitize_text_field($this->_req_data['organization_address_2']) : EE_Registry::instance()->CFG->organization->address_2;
452
+		EE_Registry::instance()->CFG->organization->city      = isset($this->_req_data['organization_city']) ? sanitize_text_field($this->_req_data['organization_city']) : EE_Registry::instance()->CFG->organization->city;
453
+		EE_Registry::instance()->CFG->organization->STA_ID    = isset($this->_req_data['organization_state']) ? absint($this->_req_data['organization_state']) : EE_Registry::instance()->CFG->organization->STA_ID;
454
+		EE_Registry::instance()->CFG->organization->CNT_ISO   = isset($this->_req_data['organization_country']) ? sanitize_text_field($this->_req_data['organization_country']) : EE_Registry::instance()->CFG->organization->CNT_ISO;
455
+		EE_Registry::instance()->CFG->organization->zip       = isset($this->_req_data['organization_zip']) ? sanitize_text_field($this->_req_data['organization_zip']) : EE_Registry::instance()->CFG->organization->zip;
456
+		EE_Registry::instance()->CFG->organization->email     = isset($this->_req_data['organization_email']) ? sanitize_email($this->_req_data['organization_email']) : EE_Registry::instance()->CFG->organization->email;
457
+		EE_Registry::instance()->CFG->organization->vat       = isset($this->_req_data['organization_vat']) ? sanitize_text_field($this->_req_data['organization_vat']) : EE_Registry::instance()->CFG->organization->vat;
458
+		EE_Registry::instance()->CFG->organization->phone     = isset($this->_req_data['organization_phone']) ? sanitize_text_field($this->_req_data['organization_phone']) : EE_Registry::instance()->CFG->organization->phone;
459
+		EE_Registry::instance()->CFG->organization->logo_url  = isset($this->_req_data['organization_logo_url']) ? esc_url_raw($this->_req_data['organization_logo_url']) : EE_Registry::instance()->CFG->organization->logo_url;
460
+		EE_Registry::instance()->CFG->organization->facebook  = isset($this->_req_data['organization_facebook']) ? esc_url_raw($this->_req_data['organization_facebook']) : EE_Registry::instance()->CFG->organization->facebook;
461
+		EE_Registry::instance()->CFG->organization->twitter   = isset($this->_req_data['organization_twitter']) ? esc_url_raw($this->_req_data['organization_twitter']) : EE_Registry::instance()->CFG->organization->twitter;
462
+		EE_Registry::instance()->CFG->organization->linkedin  = isset($this->_req_data['organization_linkedin']) ? esc_url_raw($this->_req_data['organization_linkedin']) : EE_Registry::instance()->CFG->organization->linkedin;
463
+		EE_Registry::instance()->CFG->organization->pinterest = isset($this->_req_data['organization_pinterest']) ? esc_url_raw($this->_req_data['organization_pinterest']) : EE_Registry::instance()->CFG->organization->pinterest;
464
+		EE_Registry::instance()->CFG->organization->google    = isset($this->_req_data['organization_google']) ? esc_url_raw($this->_req_data['organization_google']) : EE_Registry::instance()->CFG->organization->google;
465
+		EE_Registry::instance()->CFG->organization->instagram = isset($this->_req_data['organization_instagram']) ? esc_url_raw($this->_req_data['organization_instagram']) : EE_Registry::instance()->CFG->organization->instagram;
466
+		EE_Registry::instance()->CFG->core->ee_ueip_optin     = isset($this->_req_data['ueip_optin']) && ! empty($this->_req_data['ueip_optin']) ? $this->_req_data['ueip_optin'] : EE_Registry::instance()->CFG->core->ee_ueip_optin;
467 467
         
468
-        EE_Registry::instance()->CFG->currency = new EE_Currency_Config(EE_Registry::instance()->CFG->organization->CNT_ISO);
468
+		EE_Registry::instance()->CFG->currency = new EE_Currency_Config(EE_Registry::instance()->CFG->organization->CNT_ISO);
469 469
         
470
-        EE_Registry::instance()->CFG = apply_filters('FHEE__General_Settings_Admin_Page___update_your_organization_settings__CFG',
471
-            EE_Registry::instance()->CFG);
470
+		EE_Registry::instance()->CFG = apply_filters('FHEE__General_Settings_Admin_Page___update_your_organization_settings__CFG',
471
+			EE_Registry::instance()->CFG);
472 472
         
473
-        $what    = 'Your Organization Settings';
474
-        $success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG, __FILE__, __FUNCTION__,
475
-            __LINE__);
473
+		$what    = 'Your Organization Settings';
474
+		$success = $this->_update_espresso_configuration($what, EE_Registry::instance()->CFG, __FILE__, __FUNCTION__,
475
+			__LINE__);
476 476
         
477
-        $this->_redirect_after_action($success, $what, 'updated', array('action' => 'default'));
477
+		$this->_redirect_after_action($success, $what, 'updated', array('action' => 'default'));
478 478
         
479
-    }
480
-    
481
-    
482
-    
483
-    /*************        Admin Options        *************/
484
-    
485
-    
486
-    /**
487
-     * _admin_option_settings
488
-     *
489
-     * @throws \EE_Error
490
-     * @throws \LogicException
491
-     */
492
-    protected function _admin_option_settings()
493
-    {
494
-        $this->_template_args['admin_page_content'] = '';
495
-        try {
496
-            $admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance());
497
-            // still need this for the old school form in Extend_General_Settings_Admin_Page
498
-            $this->_template_args['values'] = $this->_yes_no_values;
499
-            // also need to account for the do_action that was in the old template
500
-            $admin_options_settings_form->setTemplateArgs($this->_template_args);
501
-            $this->_template_args['admin_page_content'] = $admin_options_settings_form->display();
502
-        } catch (Exception $e) {
503
-            EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
504
-        }
505
-        $this->_set_add_edit_form_tags('update_admin_option_settings');
506
-        $this->_set_publish_post_box_vars(null, false, false, null, false);
507
-        $this->display_admin_page_with_sidebar();
508
-    }
509
-    
510
-    
511
-    /**
512
-     * _update_admin_option_settings
513
-     *
514
-     * @throws \EE_Error
515
-     * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
516
-     * @throws \EventEspresso\core\exceptions\InvalidFormSubmissionException
517
-     * @throws \InvalidArgumentException
518
-     * @throws \LogicException
519
-     */
520
-    protected function _update_admin_option_settings()
521
-    {
522
-        try {
523
-            $admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance());
524
-            $admin_options_settings_form->process($this->_req_data[$admin_options_settings_form->slug()]);
525
-            EE_Registry::instance()->CFG->admin = apply_filters(
526
-                'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
527
-                EE_Registry::instance()->CFG->admin
528
-            );
529
-        } catch (Exception $e) {
530
-            EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
531
-        }
532
-        $this->_redirect_after_action(
533
-            apply_filters(
534
-                'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success',
535
-                $this->_update_espresso_configuration(
536
-                    'Admin Options',
537
-                    EE_Registry::instance()->CFG->admin,
538
-                    __FILE__, __FUNCTION__, __LINE__
539
-                )
540
-            ),
541
-            'Admin Options',
542
-            'updated',
543
-            array('action' => 'admin_option_settings')
544
-        );
479
+	}
480
+    
481
+    
482
+    
483
+	/*************        Admin Options        *************/
484
+    
485
+    
486
+	/**
487
+	 * _admin_option_settings
488
+	 *
489
+	 * @throws \EE_Error
490
+	 * @throws \LogicException
491
+	 */
492
+	protected function _admin_option_settings()
493
+	{
494
+		$this->_template_args['admin_page_content'] = '';
495
+		try {
496
+			$admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance());
497
+			// still need this for the old school form in Extend_General_Settings_Admin_Page
498
+			$this->_template_args['values'] = $this->_yes_no_values;
499
+			// also need to account for the do_action that was in the old template
500
+			$admin_options_settings_form->setTemplateArgs($this->_template_args);
501
+			$this->_template_args['admin_page_content'] = $admin_options_settings_form->display();
502
+		} catch (Exception $e) {
503
+			EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
504
+		}
505
+		$this->_set_add_edit_form_tags('update_admin_option_settings');
506
+		$this->_set_publish_post_box_vars(null, false, false, null, false);
507
+		$this->display_admin_page_with_sidebar();
508
+	}
509
+    
510
+    
511
+	/**
512
+	 * _update_admin_option_settings
513
+	 *
514
+	 * @throws \EE_Error
515
+	 * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
516
+	 * @throws \EventEspresso\core\exceptions\InvalidFormSubmissionException
517
+	 * @throws \InvalidArgumentException
518
+	 * @throws \LogicException
519
+	 */
520
+	protected function _update_admin_option_settings()
521
+	{
522
+		try {
523
+			$admin_options_settings_form = new AdminOptionsSettings(EE_Registry::instance());
524
+			$admin_options_settings_form->process($this->_req_data[$admin_options_settings_form->slug()]);
525
+			EE_Registry::instance()->CFG->admin = apply_filters(
526
+				'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
527
+				EE_Registry::instance()->CFG->admin
528
+			);
529
+		} catch (Exception $e) {
530
+			EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
531
+		}
532
+		$this->_redirect_after_action(
533
+			apply_filters(
534
+				'FHEE__General_Settings_Admin_Page___update_admin_option_settings__success',
535
+				$this->_update_espresso_configuration(
536
+					'Admin Options',
537
+					EE_Registry::instance()->CFG->admin,
538
+					__FILE__, __FUNCTION__, __LINE__
539
+				)
540
+			),
541
+			'Admin Options',
542
+			'updated',
543
+			array('action' => 'admin_option_settings')
544
+		);
545 545
         
546
-    }
546
+	}
547 547
     
548 548
     
549
-    /*************        Countries        *************/
549
+	/*************        Countries        *************/
550 550
     
551 551
     
552
-    protected function _country_settings()
553
-    {
552
+	protected function _country_settings()
553
+	{
554 554
         
555
-        $CNT_ISO = isset(EE_Registry::instance()->CFG->organization->CNT_ISO) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US';
556
-        $CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : $CNT_ISO;
555
+		$CNT_ISO = isset(EE_Registry::instance()->CFG->organization->CNT_ISO) ? EE_Registry::instance()->CFG->organization->CNT_ISO : 'US';
556
+		$CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : $CNT_ISO;
557 557
         
558
-        //load field generator helper
558
+		//load field generator helper
559 559
         
560
-        $this->_template_args['values'] = $this->_yes_no_values;
560
+		$this->_template_args['values'] = $this->_yes_no_values;
561 561
         
562
-        $this->_template_args['countries'] = new EE_Question_Form_Input(
563
-            EE_Question::new_instance(array(
564
-                'QST_ID'           => 0,
565
-                'QST_display_text' => __('Select Country', 'event_espresso'),
566
-                'QST_system'       => 'admin-country'
567
-            )),
568
-            EE_Answer::new_instance(array(
569
-                'ANS_ID'    => 0,
570
-                'ANS_value' => $CNT_ISO
571
-            )),
572
-            array(
573
-                'input_id'       => 'country',
574
-                'input_name'     => 'country',
575
-                'input_prefix'   => '',
576
-                'append_qstn_id' => false
577
-            )
578
-        );
562
+		$this->_template_args['countries'] = new EE_Question_Form_Input(
563
+			EE_Question::new_instance(array(
564
+				'QST_ID'           => 0,
565
+				'QST_display_text' => __('Select Country', 'event_espresso'),
566
+				'QST_system'       => 'admin-country'
567
+			)),
568
+			EE_Answer::new_instance(array(
569
+				'ANS_ID'    => 0,
570
+				'ANS_value' => $CNT_ISO
571
+			)),
572
+			array(
573
+				'input_id'       => 'country',
574
+				'input_name'     => 'country',
575
+				'input_prefix'   => '',
576
+				'append_qstn_id' => false
577
+			)
578
+		);
579 579
 //		EEH_Debug_Tools::printr( $this->_template_args['countries'], 'countries  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
580 580
         
581
-        add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2);
582
-        add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
583
-        $this->_template_args['country_details_settings'] = $this->display_country_settings();
584
-        $this->_template_args['country_states_settings']  = $this->display_country_states();
581
+		add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2);
582
+		add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
583
+		$this->_template_args['country_details_settings'] = $this->display_country_settings();
584
+		$this->_template_args['country_states_settings']  = $this->display_country_states();
585 585
         
586
-        $this->_set_add_edit_form_tags('update_country_settings');
587
-        $this->_set_publish_post_box_vars(null, false, false, null, false);
588
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'countries_settings.template.php',
589
-            $this->_template_args, true);
590
-        $this->display_admin_page_with_no_sidebar();
591
-    }
592
-    
593
-    
594
-    /**
595
-     *        display_country_settings
596
-     *
597
-     * @access    public
598
-     *
599
-     * @param    string $CNT_ISO
600
-     *
601
-     * @return        mixed        string | array
602
-     */
603
-    public function display_country_settings($CNT_ISO = '')
604
-    {
586
+		$this->_set_add_edit_form_tags('update_country_settings');
587
+		$this->_set_publish_post_box_vars(null, false, false, null, false);
588
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'countries_settings.template.php',
589
+			$this->_template_args, true);
590
+		$this->display_admin_page_with_no_sidebar();
591
+	}
592
+    
593
+    
594
+	/**
595
+	 *        display_country_settings
596
+	 *
597
+	 * @access    public
598
+	 *
599
+	 * @param    string $CNT_ISO
600
+	 *
601
+	 * @return        mixed        string | array
602
+	 */
603
+	public function display_country_settings($CNT_ISO = '')
604
+	{
605 605
         
606
-        $CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : $CNT_ISO;
607
-        if ( ! $CNT_ISO) {
608
-            return '';
609
-        }
606
+		$CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : $CNT_ISO;
607
+		if ( ! $CNT_ISO) {
608
+			return '';
609
+		}
610 610
         
611
-        // for ajax
612
-        remove_all_filters('FHEE__EEH_Form_Fields__label_html');
613
-        remove_all_filters('FHEE__EEH_Form_Fields__input_html');
614
-        add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2);
615
-        add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
616
-        $country = EEM_Country::instance()->get_one_by_ID($CNT_ISO);
617
-        //EEH_Debug_Tools::printr( $country, '$country  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
618
-        $country_input_types            = array(
619
-            'CNT_active'      => array(
620
-                'type'             => 'RADIO_BTN',
621
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
622
-                'class'            => '',
623
-                'options'          => $this->_yes_no_values,
624
-                'use_desc_4_label' => true
625
-            ),
626
-            'CNT_ISO'         => array(
627
-                'type'       => 'TEXT',
628
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
629
-                'class'      => 'small-text'
630
-            ),
631
-            'CNT_ISO3'        => array(
632
-                'type'       => 'TEXT',
633
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
634
-                'class'      => 'small-text'
635
-            ),
636
-            'RGN_ID'          => array(
637
-                'type'       => 'TEXT',
638
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
639
-                'class'      => 'small-text'
640
-            ),
641
-            'CNT_name'        => array(
642
-                'type'       => 'TEXT',
643
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
644
-                'class'      => 'regular-text'
645
-            ),
646
-            'CNT_cur_code'    => array(
647
-                'type'       => 'TEXT',
648
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
649
-                'class'      => 'small-text'
650
-            ),
651
-            'CNT_cur_single'  => array(
652
-                'type'       => 'TEXT',
653
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
654
-                'class'      => 'medium-text'
655
-            ),
656
-            'CNT_cur_plural'  => array(
657
-                'type'       => 'TEXT',
658
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
659
-                'class'      => 'medium-text'
660
-            ),
661
-            'CNT_cur_sign'    => array(
662
-                'type'         => 'TEXT',
663
-                'input_name'   => 'cntry[' . $CNT_ISO . ']',
664
-                'class'        => 'small-text',
665
-                'htmlentities' => false
666
-            ),
667
-            'CNT_cur_sign_b4' => array(
668
-                'type'             => 'RADIO_BTN',
669
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
670
-                'class'            => '',
671
-                'options'          => $this->_yes_no_values,
672
-                'use_desc_4_label' => true
673
-            ),
674
-            'CNT_cur_dec_plc' => array(
675
-                'type'       => 'RADIO_BTN',
676
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
677
-                'class'      => '',
678
-                'options'    => array(
679
-                    array('id' => 0, 'text' => ''),
680
-                    array('id' => 1, 'text' => ''),
681
-                    array('id' => 2, 'text' => ''),
682
-                    array('id' => 3, 'text' => '')
683
-                )
684
-            ),
685
-            'CNT_cur_dec_mrk' => array(
686
-                'type'             => 'RADIO_BTN',
687
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
688
-                'class'            => '',
689
-                'options'          => array(
690
-                    array(
691
-                        'id'   => ',',
692
-                        'text' => __(', (comma)', 'event_espresso')
693
-                    ),
694
-                    array('id' => '.', 'text' => __('. (decimal)', 'event_espresso'))
695
-                ),
696
-                'use_desc_4_label' => true
697
-            ),
698
-            'CNT_cur_thsnds'  => array(
699
-                'type'             => 'RADIO_BTN',
700
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
701
-                'class'            => '',
702
-                'options'          => array(
703
-                    array(
704
-                        'id'   => ',',
705
-                        'text' => __(', (comma)', 'event_espresso')
706
-                    ),
707
-                    array('id' => '.', 'text' => __('. (decimal)', 'event_espresso'))
708
-                ),
709
-                'use_desc_4_label' => true
710
-            ),
711
-            'CNT_tel_code'    => array(
712
-                'type'       => 'TEXT',
713
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
714
-                'class'      => 'small-text'
715
-            ),
716
-            'CNT_is_EU'       => array(
717
-                'type'             => 'RADIO_BTN',
718
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
719
-                'class'            => '',
720
-                'options'          => $this->_yes_no_values,
721
-                'use_desc_4_label' => true
722
-            )
723
-        );
724
-        $this->_template_args['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object($country,
725
-            $country_input_types);
726
-        $country_details_settings       = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'country_details_settings.template.php',
727
-            $this->_template_args, true);
611
+		// for ajax
612
+		remove_all_filters('FHEE__EEH_Form_Fields__label_html');
613
+		remove_all_filters('FHEE__EEH_Form_Fields__input_html');
614
+		add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'country_form_field_label_wrap'), 10, 2);
615
+		add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
616
+		$country = EEM_Country::instance()->get_one_by_ID($CNT_ISO);
617
+		//EEH_Debug_Tools::printr( $country, '$country  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
618
+		$country_input_types            = array(
619
+			'CNT_active'      => array(
620
+				'type'             => 'RADIO_BTN',
621
+				'input_name'       => 'cntry[' . $CNT_ISO . ']',
622
+				'class'            => '',
623
+				'options'          => $this->_yes_no_values,
624
+				'use_desc_4_label' => true
625
+			),
626
+			'CNT_ISO'         => array(
627
+				'type'       => 'TEXT',
628
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
629
+				'class'      => 'small-text'
630
+			),
631
+			'CNT_ISO3'        => array(
632
+				'type'       => 'TEXT',
633
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
634
+				'class'      => 'small-text'
635
+			),
636
+			'RGN_ID'          => array(
637
+				'type'       => 'TEXT',
638
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
639
+				'class'      => 'small-text'
640
+			),
641
+			'CNT_name'        => array(
642
+				'type'       => 'TEXT',
643
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
644
+				'class'      => 'regular-text'
645
+			),
646
+			'CNT_cur_code'    => array(
647
+				'type'       => 'TEXT',
648
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
649
+				'class'      => 'small-text'
650
+			),
651
+			'CNT_cur_single'  => array(
652
+				'type'       => 'TEXT',
653
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
654
+				'class'      => 'medium-text'
655
+			),
656
+			'CNT_cur_plural'  => array(
657
+				'type'       => 'TEXT',
658
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
659
+				'class'      => 'medium-text'
660
+			),
661
+			'CNT_cur_sign'    => array(
662
+				'type'         => 'TEXT',
663
+				'input_name'   => 'cntry[' . $CNT_ISO . ']',
664
+				'class'        => 'small-text',
665
+				'htmlentities' => false
666
+			),
667
+			'CNT_cur_sign_b4' => array(
668
+				'type'             => 'RADIO_BTN',
669
+				'input_name'       => 'cntry[' . $CNT_ISO . ']',
670
+				'class'            => '',
671
+				'options'          => $this->_yes_no_values,
672
+				'use_desc_4_label' => true
673
+			),
674
+			'CNT_cur_dec_plc' => array(
675
+				'type'       => 'RADIO_BTN',
676
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
677
+				'class'      => '',
678
+				'options'    => array(
679
+					array('id' => 0, 'text' => ''),
680
+					array('id' => 1, 'text' => ''),
681
+					array('id' => 2, 'text' => ''),
682
+					array('id' => 3, 'text' => '')
683
+				)
684
+			),
685
+			'CNT_cur_dec_mrk' => array(
686
+				'type'             => 'RADIO_BTN',
687
+				'input_name'       => 'cntry[' . $CNT_ISO . ']',
688
+				'class'            => '',
689
+				'options'          => array(
690
+					array(
691
+						'id'   => ',',
692
+						'text' => __(', (comma)', 'event_espresso')
693
+					),
694
+					array('id' => '.', 'text' => __('. (decimal)', 'event_espresso'))
695
+				),
696
+				'use_desc_4_label' => true
697
+			),
698
+			'CNT_cur_thsnds'  => array(
699
+				'type'             => 'RADIO_BTN',
700
+				'input_name'       => 'cntry[' . $CNT_ISO . ']',
701
+				'class'            => '',
702
+				'options'          => array(
703
+					array(
704
+						'id'   => ',',
705
+						'text' => __(', (comma)', 'event_espresso')
706
+					),
707
+					array('id' => '.', 'text' => __('. (decimal)', 'event_espresso'))
708
+				),
709
+				'use_desc_4_label' => true
710
+			),
711
+			'CNT_tel_code'    => array(
712
+				'type'       => 'TEXT',
713
+				'input_name' => 'cntry[' . $CNT_ISO . ']',
714
+				'class'      => 'small-text'
715
+			),
716
+			'CNT_is_EU'       => array(
717
+				'type'             => 'RADIO_BTN',
718
+				'input_name'       => 'cntry[' . $CNT_ISO . ']',
719
+				'class'            => '',
720
+				'options'          => $this->_yes_no_values,
721
+				'use_desc_4_label' => true
722
+			)
723
+		);
724
+		$this->_template_args['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object($country,
725
+			$country_input_types);
726
+		$country_details_settings       = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'country_details_settings.template.php',
727
+			$this->_template_args, true);
728 728
         
729
-        if (defined('DOING_AJAX')) {
730
-            $notices = EE_Error::get_notices(false, false, false);
731
-            echo json_encode(array(
732
-                'return_data' => $country_details_settings,
733
-                'success'     => $notices['success'],
734
-                'errors'      => $notices['errors']
735
-            ));
736
-            die();
737
-        } else {
738
-            return $country_details_settings;
739
-        }
729
+		if (defined('DOING_AJAX')) {
730
+			$notices = EE_Error::get_notices(false, false, false);
731
+			echo json_encode(array(
732
+				'return_data' => $country_details_settings,
733
+				'success'     => $notices['success'],
734
+				'errors'      => $notices['errors']
735
+			));
736
+			die();
737
+		} else {
738
+			return $country_details_settings;
739
+		}
740 740
         
741
-    }
742
-    
743
-    
744
-    /**
745
-     *        display_country_states
746
-     *
747
-     * @access    public
748
-     *
749
-     * @param    string $CNT_ISO
750
-     *
751
-     * @return        string
752
-     */
753
-    public function display_country_states($CNT_ISO = '')
754
-    {
741
+	}
742
+    
743
+    
744
+	/**
745
+	 *        display_country_states
746
+	 *
747
+	 * @access    public
748
+	 *
749
+	 * @param    string $CNT_ISO
750
+	 *
751
+	 * @return        string
752
+	 */
753
+	public function display_country_states($CNT_ISO = '')
754
+	{
755 755
         
756
-        $CNT_ISO = isset($this->_req_data['country']) ? sanitize_text_field($this->_req_data['country']) : $CNT_ISO;
756
+		$CNT_ISO = isset($this->_req_data['country']) ? sanitize_text_field($this->_req_data['country']) : $CNT_ISO;
757 757
         
758
-        if ( ! $CNT_ISO) {
759
-            return '';
760
-        }
761
-        // for ajax
762
-        remove_all_filters('FHEE__EEH_Form_Fields__label_html');
763
-        remove_all_filters('FHEE__EEH_Form_Fields__input_html');
764
-        add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'state_form_field_label_wrap'), 10, 2);
765
-        add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'state_form_field_input__wrap'), 10, 2);
766
-        $states = EEM_State::instance()->get_all_states_for_these_countries(array($CNT_ISO => $CNT_ISO));
758
+		if ( ! $CNT_ISO) {
759
+			return '';
760
+		}
761
+		// for ajax
762
+		remove_all_filters('FHEE__EEH_Form_Fields__label_html');
763
+		remove_all_filters('FHEE__EEH_Form_Fields__input_html');
764
+		add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'state_form_field_label_wrap'), 10, 2);
765
+		add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'state_form_field_input__wrap'), 10, 2);
766
+		$states = EEM_State::instance()->get_all_states_for_these_countries(array($CNT_ISO => $CNT_ISO));
767 767
 
768 768
 //			echo '<h4>$CNT_ISO : ' . $CNT_ISO . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
769 769
 //			global $wpdb;
770 770
 //			echo '<h4>' . $wpdb->last_query . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
771 771
 //			EEH_Debug_Tools::printr( $states, '$states  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
772
-        if ($states) {
773
-            foreach ($states as $STA_ID => $state) {
774
-                if ($state instanceof EE_State) {
775
-                    //STA_abbrev 	STA_name 	STA_active
776
-                    $state_input_types                                           = array(
777
-                        'STA_abbrev' => array(
778
-                            'type'       => 'TEXT',
779
-                            'input_name' => 'states[' . $STA_ID . ']',
780
-                            'class'      => 'mid-text'
781
-                        ),
782
-                        'STA_name'   => array(
783
-                            'type'       => 'TEXT',
784
-                            'input_name' => 'states[' . $STA_ID . ']',
785
-                            'class'      => 'regular-text'
786
-                        ),
787
-                        'STA_active' => array(
788
-                            'type'             => 'RADIO_BTN',
789
-                            'input_name'       => 'states[' . $STA_ID . ']',
790
-                            'options'          => $this->_yes_no_values,
791
-                            'use_desc_4_label' => true
792
-                        )
793
-                    );
794
-                    $this->_template_args['states'][$STA_ID]['inputs']           = EE_Question_Form_Input::generate_question_form_inputs_for_object($state,
795
-                        $state_input_types);
796
-                    $query_args                                                  = array(
797
-                        'action'     => 'delete_state',
798
-                        'STA_ID'     => $STA_ID,
799
-                        'CNT_ISO'    => $CNT_ISO,
800
-                        'STA_abbrev' => $state->abbrev()
801
-                    );
802
-                    $this->_template_args['states'][$STA_ID]['delete_state_url'] = EE_Admin_Page::add_query_args_and_nonce($query_args,
803
-                        GEN_SET_ADMIN_URL);
804
-                }
805
-            }
806
-        } else {
807
-            $this->_template_args['states'] = false;
808
-        }
772
+		if ($states) {
773
+			foreach ($states as $STA_ID => $state) {
774
+				if ($state instanceof EE_State) {
775
+					//STA_abbrev 	STA_name 	STA_active
776
+					$state_input_types                                           = array(
777
+						'STA_abbrev' => array(
778
+							'type'       => 'TEXT',
779
+							'input_name' => 'states[' . $STA_ID . ']',
780
+							'class'      => 'mid-text'
781
+						),
782
+						'STA_name'   => array(
783
+							'type'       => 'TEXT',
784
+							'input_name' => 'states[' . $STA_ID . ']',
785
+							'class'      => 'regular-text'
786
+						),
787
+						'STA_active' => array(
788
+							'type'             => 'RADIO_BTN',
789
+							'input_name'       => 'states[' . $STA_ID . ']',
790
+							'options'          => $this->_yes_no_values,
791
+							'use_desc_4_label' => true
792
+						)
793
+					);
794
+					$this->_template_args['states'][$STA_ID]['inputs']           = EE_Question_Form_Input::generate_question_form_inputs_for_object($state,
795
+						$state_input_types);
796
+					$query_args                                                  = array(
797
+						'action'     => 'delete_state',
798
+						'STA_ID'     => $STA_ID,
799
+						'CNT_ISO'    => $CNT_ISO,
800
+						'STA_abbrev' => $state->abbrev()
801
+					);
802
+					$this->_template_args['states'][$STA_ID]['delete_state_url'] = EE_Admin_Page::add_query_args_and_nonce($query_args,
803
+						GEN_SET_ADMIN_URL);
804
+				}
805
+			}
806
+		} else {
807
+			$this->_template_args['states'] = false;
808
+		}
809 809
 //		EEH_Debug_Tools::printr( $this->_template_args['states'], 'states  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
810
-        $this->_template_args['add_new_state_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'add_new_state'),
811
-            GEN_SET_ADMIN_URL);
810
+		$this->_template_args['add_new_state_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'add_new_state'),
811
+			GEN_SET_ADMIN_URL);
812 812
         
813
-        $state_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'state_details_settings.template.php',
814
-            $this->_template_args, true);
813
+		$state_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'state_details_settings.template.php',
814
+			$this->_template_args, true);
815 815
         
816
-        if (defined('DOING_AJAX')) {
817
-            $notices = EE_Error::get_notices(false, false, false);
818
-            echo json_encode(array(
819
-                'return_data' => $state_details_settings,
820
-                'success'     => $notices['success'],
821
-                'errors'      => $notices['errors']
822
-            ));
823
-            die();
824
-        } else {
825
-            return $state_details_settings;
826
-        }
816
+		if (defined('DOING_AJAX')) {
817
+			$notices = EE_Error::get_notices(false, false, false);
818
+			echo json_encode(array(
819
+				'return_data' => $state_details_settings,
820
+				'success'     => $notices['success'],
821
+				'errors'      => $notices['errors']
822
+			));
823
+			die();
824
+		} else {
825
+			return $state_details_settings;
826
+		}
827 827
         
828
-    }
828
+	}
829 829
     
830 830
     
831
-    /**
832
-     *        add_new_state
833
-     *
834
-     * @access    public
835
-     * @return        void
836
-     */
837
-    public function add_new_state()
838
-    {
831
+	/**
832
+	 *        add_new_state
833
+	 *
834
+	 * @access    public
835
+	 * @return        void
836
+	 */
837
+	public function add_new_state()
838
+	{
839 839
         
840
-        $success = true;
840
+		$success = true;
841 841
         
842
-        $CNT_ISO = isset($this->_req_data['CNT_ISO']) ? strtoupper(sanitize_text_field($this->_req_data['CNT_ISO'])) : false;
843
-        if ( ! $CNT_ISO) {
844
-            EE_Error::add_error(__('No Country ISO code or an invalid Country ISO code was received.',
845
-                'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
846
-            $success = false;
847
-        }
848
-        $STA_abbrev = isset($this->_req_data['STA_abbrev']) ? sanitize_text_field($this->_req_data['STA_abbrev']) : false;
849
-        if ( ! $STA_abbrev) {
850
-            EE_Error::add_error(__('No State ISO code or an invalid State ISO code was received.', 'event_espresso'),
851
-                __FILE__, __FUNCTION__, __LINE__);
852
-            $success = false;
853
-        }
854
-        $STA_name = isset($this->_req_data['STA_name']) ? sanitize_text_field($this->_req_data['STA_name']) :
855
-            false;
856
-        if ( ! $STA_name) {
857
-            EE_Error::add_error(__('No State name or an invalid State name was received.', 'event_espresso'), __FILE__,
858
-                __FUNCTION__, __LINE__);
859
-            $success = false;
860
-        }
842
+		$CNT_ISO = isset($this->_req_data['CNT_ISO']) ? strtoupper(sanitize_text_field($this->_req_data['CNT_ISO'])) : false;
843
+		if ( ! $CNT_ISO) {
844
+			EE_Error::add_error(__('No Country ISO code or an invalid Country ISO code was received.',
845
+				'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
846
+			$success = false;
847
+		}
848
+		$STA_abbrev = isset($this->_req_data['STA_abbrev']) ? sanitize_text_field($this->_req_data['STA_abbrev']) : false;
849
+		if ( ! $STA_abbrev) {
850
+			EE_Error::add_error(__('No State ISO code or an invalid State ISO code was received.', 'event_espresso'),
851
+				__FILE__, __FUNCTION__, __LINE__);
852
+			$success = false;
853
+		}
854
+		$STA_name = isset($this->_req_data['STA_name']) ? sanitize_text_field($this->_req_data['STA_name']) :
855
+			false;
856
+		if ( ! $STA_name) {
857
+			EE_Error::add_error(__('No State name or an invalid State name was received.', 'event_espresso'), __FILE__,
858
+				__FUNCTION__, __LINE__);
859
+			$success = false;
860
+		}
861 861
         
862
-        if ($success) {
863
-            $cols_n_values = array(
864
-                'CNT_ISO'    => $CNT_ISO,
865
-                'STA_abbrev' => $STA_abbrev,
866
-                'STA_name'   => $STA_name,
867
-                'STA_active' => true
868
-            );
869
-            $success       = EEM_State::instance()->insert($cols_n_values);
870
-            EE_Error::add_success(__('The State was added successfully.', 'event_espresso'));
871
-        }
862
+		if ($success) {
863
+			$cols_n_values = array(
864
+				'CNT_ISO'    => $CNT_ISO,
865
+				'STA_abbrev' => $STA_abbrev,
866
+				'STA_name'   => $STA_name,
867
+				'STA_active' => true
868
+			);
869
+			$success       = EEM_State::instance()->insert($cols_n_values);
870
+			EE_Error::add_success(__('The State was added successfully.', 'event_espresso'));
871
+		}
872 872
         
873
-        if (defined('DOING_AJAX')) {
874
-            $notices = EE_Error::get_notices(false, false, false);
875
-            echo json_encode(array_merge($notices, array('return_data' => $CNT_ISO)));
876
-            die();
877
-        } else {
878
-            $this->_redirect_after_action($success, 'State', 'added', array('action' => 'country_settings'));
879
-        }
880
-    }
881
-    
882
-    
883
-    /**
884
-     *        delete_state
885
-     *
886
-     * @access    public
887
-     * @return        boolean | void
888
-     */
889
-    public function delete_state()
890
-    {
891
-        $CNT_ISO    = isset($this->_req_data['CNT_ISO']) ? strtoupper(sanitize_text_field($this->_req_data['CNT_ISO'])) : false;
892
-        $STA_ID     = isset($this->_req_data['STA_ID']) ? sanitize_text_field($this->_req_data['STA_ID']) : false;
893
-        $STA_abbrev = isset($this->_req_data['STA_abbrev']) ? sanitize_text_field($this->_req_data['STA_abbrev']) : false;
894
-        if ( ! $STA_ID) {
895
-            EE_Error::add_error(__('No State ID or an invalid State ID was received.', 'event_espresso'), __FILE__,
896
-                __FUNCTION__, __LINE__);
873
+		if (defined('DOING_AJAX')) {
874
+			$notices = EE_Error::get_notices(false, false, false);
875
+			echo json_encode(array_merge($notices, array('return_data' => $CNT_ISO)));
876
+			die();
877
+		} else {
878
+			$this->_redirect_after_action($success, 'State', 'added', array('action' => 'country_settings'));
879
+		}
880
+	}
881
+    
882
+    
883
+	/**
884
+	 *        delete_state
885
+	 *
886
+	 * @access    public
887
+	 * @return        boolean | void
888
+	 */
889
+	public function delete_state()
890
+	{
891
+		$CNT_ISO    = isset($this->_req_data['CNT_ISO']) ? strtoupper(sanitize_text_field($this->_req_data['CNT_ISO'])) : false;
892
+		$STA_ID     = isset($this->_req_data['STA_ID']) ? sanitize_text_field($this->_req_data['STA_ID']) : false;
893
+		$STA_abbrev = isset($this->_req_data['STA_abbrev']) ? sanitize_text_field($this->_req_data['STA_abbrev']) : false;
894
+		if ( ! $STA_ID) {
895
+			EE_Error::add_error(__('No State ID or an invalid State ID was received.', 'event_espresso'), __FILE__,
896
+				__FUNCTION__, __LINE__);
897 897
             
898
-            return false;
899
-        }
900
-        $success = EEM_State::instance()->delete_by_ID($STA_ID);
901
-        if ($success !== false) {
902
-            do_action('AHEE__General_Settings_Admin_Page__delete_state__state_deleted', $CNT_ISO, $STA_ID,
903
-                array('STA_abbrev' => $STA_abbrev));
904
-            EE_Error::add_success(__('The State was deleted successfully.', 'event_espresso'));
905
-        }
906
-        if (defined('DOING_AJAX')) {
907
-            $notices                = EE_Error::get_notices(false, false);
908
-            $notices['return_data'] = true;
909
-            echo json_encode($notices);
910
-            die();
911
-        } else {
912
-            $this->_redirect_after_action($success, 'State', 'deleted', array('action' => 'country_settings'));
913
-        }
914
-    }
915
-    
916
-    
917
-    /**
918
-     *        _update_country_settings
919
-     *
920
-     * @access    protected
921
-     * @return        void
922
-     */
923
-    protected function _update_country_settings()
924
-    {
898
+			return false;
899
+		}
900
+		$success = EEM_State::instance()->delete_by_ID($STA_ID);
901
+		if ($success !== false) {
902
+			do_action('AHEE__General_Settings_Admin_Page__delete_state__state_deleted', $CNT_ISO, $STA_ID,
903
+				array('STA_abbrev' => $STA_abbrev));
904
+			EE_Error::add_success(__('The State was deleted successfully.', 'event_espresso'));
905
+		}
906
+		if (defined('DOING_AJAX')) {
907
+			$notices                = EE_Error::get_notices(false, false);
908
+			$notices['return_data'] = true;
909
+			echo json_encode($notices);
910
+			die();
911
+		} else {
912
+			$this->_redirect_after_action($success, 'State', 'deleted', array('action' => 'country_settings'));
913
+		}
914
+	}
915
+    
916
+    
917
+	/**
918
+	 *        _update_country_settings
919
+	 *
920
+	 * @access    protected
921
+	 * @return        void
922
+	 */
923
+	protected function _update_country_settings()
924
+	{
925 925
 //		EEH_Debug_Tools::printr( $this->_req_data, '$this->_req_data  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
926
-        // grab the country ISO code
927
-        $CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : false;
928
-        if ( ! $CNT_ISO) {
929
-            EE_Error::add_error(__('No Country ISO code or an invalid Country ISO code was received.',
930
-                'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
926
+		// grab the country ISO code
927
+		$CNT_ISO = isset($this->_req_data['country']) ? strtoupper(sanitize_text_field($this->_req_data['country'])) : false;
928
+		if ( ! $CNT_ISO) {
929
+			EE_Error::add_error(__('No Country ISO code or an invalid Country ISO code was received.',
930
+				'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
931 931
             
932
-            return;
933
-        }
934
-        $cols_n_values                    = array();
935
-        $cols_n_values['CNT_ISO3']        = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3']) ? strtoupper(sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3'])) : false;
936
-        $cols_n_values['RGN_ID']          = isset($this->_req_data['cntry'][$CNT_ISO]['RGN_ID']) ? absint($this->_req_data['cntry'][$CNT_ISO]['RGN_ID']) : null;
937
-        $cols_n_values['CNT_name']        = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_name']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_name']) : null;
938
-        $cols_n_values['CNT_cur_code']    = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code']) ? strtoupper(sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code'])) : 'USD';
939
-        $cols_n_values['CNT_cur_single']  = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single']) : 'dollar';
940
-        $cols_n_values['CNT_cur_plural']  = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural']) : 'dollars';
941
-        $cols_n_values['CNT_cur_sign']    = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign']) : '$';
942
-        $cols_n_values['CNT_cur_sign_b4'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4']) : true;
943
-        $cols_n_values['CNT_cur_dec_plc'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc']) : 2;
944
-        $cols_n_values['CNT_cur_dec_mrk'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk']) : '.';
945
-        $cols_n_values['CNT_cur_thsnds']  = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds']) : ',';
946
-        $cols_n_values['CNT_tel_code']    = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code']) : null;
947
-        $cols_n_values['CNT_is_EU']       = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU']) : false;
948
-        $cols_n_values['CNT_active']      = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_active']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_active']) : false;
949
-        // allow filtering of country data
950
-        $cols_n_values = apply_filters('FHEE__General_Settings_Admin_Page___update_country_settings__cols_n_values',
951
-            $cols_n_values);
952
-        //EEH_Debug_Tools::printr( $cols_n_values, '$cols_n_values  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
953
-        // where values
954
-        $where_cols_n_values = array(array('CNT_ISO' => $CNT_ISO));
955
-        // run the update
956
-        $success = EEM_Country::instance()->update($cols_n_values, $where_cols_n_values);
932
+			return;
933
+		}
934
+		$cols_n_values                    = array();
935
+		$cols_n_values['CNT_ISO3']        = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3']) ? strtoupper(sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_ISO3'])) : false;
936
+		$cols_n_values['RGN_ID']          = isset($this->_req_data['cntry'][$CNT_ISO]['RGN_ID']) ? absint($this->_req_data['cntry'][$CNT_ISO]['RGN_ID']) : null;
937
+		$cols_n_values['CNT_name']        = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_name']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_name']) : null;
938
+		$cols_n_values['CNT_cur_code']    = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code']) ? strtoupper(sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_code'])) : 'USD';
939
+		$cols_n_values['CNT_cur_single']  = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_single']) : 'dollar';
940
+		$cols_n_values['CNT_cur_plural']  = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_plural']) : 'dollars';
941
+		$cols_n_values['CNT_cur_sign']    = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign']) : '$';
942
+		$cols_n_values['CNT_cur_sign_b4'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_sign_b4']) : true;
943
+		$cols_n_values['CNT_cur_dec_plc'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_plc']) : 2;
944
+		$cols_n_values['CNT_cur_dec_mrk'] = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_dec_mrk']) : '.';
945
+		$cols_n_values['CNT_cur_thsnds']  = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_cur_thsnds']) : ',';
946
+		$cols_n_values['CNT_tel_code']    = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code']) ? sanitize_text_field($this->_req_data['cntry'][$CNT_ISO]['CNT_tel_code']) : null;
947
+		$cols_n_values['CNT_is_EU']       = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_is_EU']) : false;
948
+		$cols_n_values['CNT_active']      = isset($this->_req_data['cntry'][$CNT_ISO]['CNT_active']) ? absint($this->_req_data['cntry'][$CNT_ISO]['CNT_active']) : false;
949
+		// allow filtering of country data
950
+		$cols_n_values = apply_filters('FHEE__General_Settings_Admin_Page___update_country_settings__cols_n_values',
951
+			$cols_n_values);
952
+		//EEH_Debug_Tools::printr( $cols_n_values, '$cols_n_values  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
953
+		// where values
954
+		$where_cols_n_values = array(array('CNT_ISO' => $CNT_ISO));
955
+		// run the update
956
+		$success = EEM_Country::instance()->update($cols_n_values, $where_cols_n_values);
957 957
 //		global $wpdb;
958 958
 //		echo '<h4>' . $wpdb->last_query . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
959 959
 //		echo '<h4>$success : ' . $success . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
960
-        if (isset($this->_req_data['states']) && is_array($this->_req_data['states']) && $success !== false) {
961
-            // allow filtering of states data
962
-            $states = apply_filters('FHEE__General_Settings_Admin_Page___update_country_settings__states',
963
-                $this->_req_data['states']);
960
+		if (isset($this->_req_data['states']) && is_array($this->_req_data['states']) && $success !== false) {
961
+			// allow filtering of states data
962
+			$states = apply_filters('FHEE__General_Settings_Admin_Page___update_country_settings__states',
963
+				$this->_req_data['states']);
964 964
 //			EEH_Debug_Tools::printr( $states, '$states  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
965
-            // loop thru state data ( looks like : states[75][STA_name] )
966
-            foreach ($states as $STA_ID => $state) {
967
-                $cols_n_values = array(
968
-                    'CNT_ISO'    => $CNT_ISO,
969
-                    'STA_abbrev' => sanitize_text_field($state['STA_abbrev']),
970
-                    'STA_name'   => sanitize_text_field($state['STA_name']),
971
-                    'STA_active' => (bool)absint($state['STA_active'])
972
-                );
973
-                // where values
974
-                $where_cols_n_values = array(array('STA_ID' => $STA_ID));
975
-                // run the update
976
-                $success = EEM_State::instance()->update($cols_n_values, $where_cols_n_values);
977
-                if ($success !== false) {
978
-                    do_action('AHEE__General_Settings_Admin_Page__update_country_settings__state_saved', $CNT_ISO,
979
-                        $STA_ID, $cols_n_values);
980
-                }
981
-            }
982
-        }
983
-        // check if country being edited matches org option country, and if so, then  update EE_Config with new settings
984
-        if (isset(EE_Registry::instance()->CFG->organization->CNT_ISO) && $CNT_ISO == EE_Registry::instance()->CFG->organization->CNT_ISO) {
985
-            EE_Registry::instance()->CFG->currency = new EE_Currency_Config($CNT_ISO);
986
-            EE_Registry::instance()->CFG->update_espresso_config();
987
-        }
988
-        $this->_redirect_after_action($success, 'Countries', 'updated',
989
-            array('action' => 'country_settings', 'country' => $CNT_ISO));
990
-    }
991
-    
992
-    
993
-    /**
994
-     *        form_form_field_label_wrap
995
-     *
996
-     * @access        public
997
-     *
998
-     * @param        string $label
999
-     *
1000
-     * @return        string
1001
-     */
1002
-    public function country_form_field_label_wrap($label, $required_text)
1003
-    {
1004
-        return '
965
+			// loop thru state data ( looks like : states[75][STA_name] )
966
+			foreach ($states as $STA_ID => $state) {
967
+				$cols_n_values = array(
968
+					'CNT_ISO'    => $CNT_ISO,
969
+					'STA_abbrev' => sanitize_text_field($state['STA_abbrev']),
970
+					'STA_name'   => sanitize_text_field($state['STA_name']),
971
+					'STA_active' => (bool)absint($state['STA_active'])
972
+				);
973
+				// where values
974
+				$where_cols_n_values = array(array('STA_ID' => $STA_ID));
975
+				// run the update
976
+				$success = EEM_State::instance()->update($cols_n_values, $where_cols_n_values);
977
+				if ($success !== false) {
978
+					do_action('AHEE__General_Settings_Admin_Page__update_country_settings__state_saved', $CNT_ISO,
979
+						$STA_ID, $cols_n_values);
980
+				}
981
+			}
982
+		}
983
+		// check if country being edited matches org option country, and if so, then  update EE_Config with new settings
984
+		if (isset(EE_Registry::instance()->CFG->organization->CNT_ISO) && $CNT_ISO == EE_Registry::instance()->CFG->organization->CNT_ISO) {
985
+			EE_Registry::instance()->CFG->currency = new EE_Currency_Config($CNT_ISO);
986
+			EE_Registry::instance()->CFG->update_espresso_config();
987
+		}
988
+		$this->_redirect_after_action($success, 'Countries', 'updated',
989
+			array('action' => 'country_settings', 'country' => $CNT_ISO));
990
+	}
991
+    
992
+    
993
+	/**
994
+	 *        form_form_field_label_wrap
995
+	 *
996
+	 * @access        public
997
+	 *
998
+	 * @param        string $label
999
+	 *
1000
+	 * @return        string
1001
+	 */
1002
+	public function country_form_field_label_wrap($label, $required_text)
1003
+	{
1004
+		return '
1005 1005
 			<tr>
1006 1006
 				<th>
1007 1007
 					' . $label . '
1008 1008
 				</th>';
1009
-    }
1010
-    
1011
-    
1012
-    /**
1013
-     *        form_form_field_input__wrap
1014
-     *
1015
-     * @access        public
1016
-     *
1017
-     * @param        string $label
1018
-     *
1019
-     * @return        string
1020
-     */
1021
-    public function country_form_field_input__wrap($input, $label)
1022
-    {
1023
-        return '
1009
+	}
1010
+    
1011
+    
1012
+	/**
1013
+	 *        form_form_field_input__wrap
1014
+	 *
1015
+	 * @access        public
1016
+	 *
1017
+	 * @param        string $label
1018
+	 *
1019
+	 * @return        string
1020
+	 */
1021
+	public function country_form_field_input__wrap($input, $label)
1022
+	{
1023
+		return '
1024 1024
 				<td class="general-settings-country-input-td">
1025 1025
 					' . $input . '
1026 1026
 				</td>
1027 1027
 			</tr>';
1028
-    }
1029
-    
1030
-    
1031
-    /**
1032
-     *        form_form_field_label_wrap
1033
-     *
1034
-     * @access        public
1035
-     *
1036
-     * @param        string $label
1037
-     * @param        string $required_text
1038
-     *
1039
-     * @return        string
1040
-     */
1041
-    public function state_form_field_label_wrap($label, $required_text)
1042
-    {
1043
-        return $required_text;
1044
-    }
1045
-    
1046
-    
1047
-    /**
1048
-     *        form_form_field_input__wrap
1049
-     *
1050
-     * @access        public
1051
-     *
1052
-     * @param        string $label
1053
-     *
1054
-     * @return        string
1055
-     */
1056
-    public function state_form_field_input__wrap($input, $label)
1057
-    {
1058
-        return '
1028
+	}
1029
+    
1030
+    
1031
+	/**
1032
+	 *        form_form_field_label_wrap
1033
+	 *
1034
+	 * @access        public
1035
+	 *
1036
+	 * @param        string $label
1037
+	 * @param        string $required_text
1038
+	 *
1039
+	 * @return        string
1040
+	 */
1041
+	public function state_form_field_label_wrap($label, $required_text)
1042
+	{
1043
+		return $required_text;
1044
+	}
1045
+    
1046
+    
1047
+	/**
1048
+	 *        form_form_field_input__wrap
1049
+	 *
1050
+	 * @access        public
1051
+	 *
1052
+	 * @param        string $label
1053
+	 *
1054
+	 * @return        string
1055
+	 */
1056
+	public function state_form_field_input__wrap($input, $label)
1057
+	{
1058
+		return '
1059 1059
 				<td class="general-settings-country-state-input-td">
1060 1060
 					' . $input . '
1061 1061
 				</td>';
1062 1062
         
1063
-    }
1063
+	}
1064 1064
     
1065 1065
     
1066 1066
     
1067 1067
     
1068 1068
     
1069 1069
     
1070
-    /***********/
1070
+	/***********/
1071 1071
     
1072 1072
     
1073
-    /**
1074
-     * displays edit and view links for critical EE pages
1075
-     *
1076
-     * @access public
1077
-     *
1078
-     * @param int $ee_page_id
1079
-     *
1080
-     * @return string
1081
-     */
1082
-    public static function edit_view_links($ee_page_id)
1083
-    {
1084
-        $links = '<a href="' . add_query_arg(array('post' => $ee_page_id, 'action' => 'edit'),
1085
-                admin_url('post.php')) . '" >' . __('Edit', 'event_espresso') . '</a>';
1086
-        $links .= ' &nbsp;|&nbsp; ';
1087
-        $links .= '<a href="' . get_permalink($ee_page_id) . '" >' . __('View', 'event_espresso') . '</a>';
1073
+	/**
1074
+	 * displays edit and view links for critical EE pages
1075
+	 *
1076
+	 * @access public
1077
+	 *
1078
+	 * @param int $ee_page_id
1079
+	 *
1080
+	 * @return string
1081
+	 */
1082
+	public static function edit_view_links($ee_page_id)
1083
+	{
1084
+		$links = '<a href="' . add_query_arg(array('post' => $ee_page_id, 'action' => 'edit'),
1085
+				admin_url('post.php')) . '" >' . __('Edit', 'event_espresso') . '</a>';
1086
+		$links .= ' &nbsp;|&nbsp; ';
1087
+		$links .= '<a href="' . get_permalink($ee_page_id) . '" >' . __('View', 'event_espresso') . '</a>';
1088 1088
         
1089
-        return $links;
1090
-    }
1091
-    
1092
-    
1093
-    /**
1094
-     * displays page and shortcode status for critical EE pages
1095
-     *
1096
-     * @param WP page object $ee_page
1097
-     *
1098
-     * @return string
1099
-     */
1100
-    public static function page_and_shortcode_status($ee_page, $shortcode)
1101
-    {
1089
+		return $links;
1090
+	}
1091
+    
1092
+    
1093
+	/**
1094
+	 * displays page and shortcode status for critical EE pages
1095
+	 *
1096
+	 * @param WP page object $ee_page
1097
+	 *
1098
+	 * @return string
1099
+	 */
1100
+	public static function page_and_shortcode_status($ee_page, $shortcode)
1101
+	{
1102 1102
         
1103
-        // page status
1104
-        if (isset($ee_page->post_status) && $ee_page->post_status == 'publish') {
1105
-            $pg_colour = 'green';
1106
-            $pg_status = sprintf(__('Page%sStatus%sOK', 'event_espresso'), '&nbsp;', '&nbsp;');
1107
-        } else {
1108
-            $pg_colour = 'red';
1109
-            $pg_status = sprintf(__('Page%sVisibility%sProblem', 'event_espresso'), '&nbsp;', '&nbsp;');
1110
-        }
1103
+		// page status
1104
+		if (isset($ee_page->post_status) && $ee_page->post_status == 'publish') {
1105
+			$pg_colour = 'green';
1106
+			$pg_status = sprintf(__('Page%sStatus%sOK', 'event_espresso'), '&nbsp;', '&nbsp;');
1107
+		} else {
1108
+			$pg_colour = 'red';
1109
+			$pg_status = sprintf(__('Page%sVisibility%sProblem', 'event_espresso'), '&nbsp;', '&nbsp;');
1110
+		}
1111 1111
         
1112
-        // shortcode status
1113
-        if (isset($ee_page->post_content) && strpos($ee_page->post_content, $shortcode) !== false) {
1114
-            $sc_colour = 'green';
1115
-            $sc_status = sprintf(__('Shortcode%sOK', 'event_espresso'), '&nbsp;');
1116
-        } else {
1117
-            $sc_colour = 'red';
1118
-            $sc_status = sprintf(__('Shortcode%sProblem', 'event_espresso'), '&nbsp;');
1119
-        }
1112
+		// shortcode status
1113
+		if (isset($ee_page->post_content) && strpos($ee_page->post_content, $shortcode) !== false) {
1114
+			$sc_colour = 'green';
1115
+			$sc_status = sprintf(__('Shortcode%sOK', 'event_espresso'), '&nbsp;');
1116
+		} else {
1117
+			$sc_colour = 'red';
1118
+			$sc_status = sprintf(__('Shortcode%sProblem', 'event_espresso'), '&nbsp;');
1119
+		}
1120 1120
         
1121
-        return '<span style="color:' . $pg_colour . '; margin-right:2em;"><strong>' . $pg_status . '</strong></span><span style="color:' . $sc_colour . '"><strong>' . $sc_status . '</strong></span>';
1121
+		return '<span style="color:' . $pg_colour . '; margin-right:2em;"><strong>' . $pg_status . '</strong></span><span style="color:' . $sc_colour . '"><strong>' . $sc_status . '</strong></span>';
1122 1122
         
1123
-    }
1124
-    
1125
-    
1126
-    /**
1127
-     * generates a dropdown of all parent pages - copied from WP core
1128
-     *
1129
-     * @param unknown_type $default
1130
-     * @param unknown_type $parent
1131
-     * @param unknown_type $level
1132
-     *
1133
-     * @return unknown
1134
-     */
1135
-    public static function page_settings_dropdown($default = 0, $parent = 0, $level = 0)
1136
-    {
1137
-        global $wpdb;
1138
-        $items = $wpdb->get_results($wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' AND post_status != 'trash' ORDER BY menu_order",
1139
-            $parent));
1123
+	}
1124
+    
1125
+    
1126
+	/**
1127
+	 * generates a dropdown of all parent pages - copied from WP core
1128
+	 *
1129
+	 * @param unknown_type $default
1130
+	 * @param unknown_type $parent
1131
+	 * @param unknown_type $level
1132
+	 *
1133
+	 * @return unknown
1134
+	 */
1135
+	public static function page_settings_dropdown($default = 0, $parent = 0, $level = 0)
1136
+	{
1137
+		global $wpdb;
1138
+		$items = $wpdb->get_results($wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' AND post_status != 'trash' ORDER BY menu_order",
1139
+			$parent));
1140 1140
         
1141
-        if ($items) {
1142
-            foreach ($items as $item) {
1143
-                $pad = str_repeat('&nbsp;', $level * 3);
1144
-                if ($item->ID == $default) {
1145
-                    $current = ' selected="selected"';
1146
-                } else {
1147
-                    $current = '';
1148
-                }
1141
+		if ($items) {
1142
+			foreach ($items as $item) {
1143
+				$pad = str_repeat('&nbsp;', $level * 3);
1144
+				if ($item->ID == $default) {
1145
+					$current = ' selected="selected"';
1146
+				} else {
1147
+					$current = '';
1148
+				}
1149 1149
                 
1150
-                echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>";
1151
-                parent_dropdown($default, $item->ID, $level + 1);
1152
-            }
1153
-        } else {
1154
-            return false;
1155
-        }
1156
-    }
1150
+				echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>";
1151
+				parent_dropdown($default, $item->ID, $level + 1);
1152
+			}
1153
+		} else {
1154
+			return false;
1155
+		}
1156
+	}
1157 1157
     
1158 1158
     
1159 1159
 } //ends Forms_Admin_Page class
Please login to merge, or discard this patch.
Spacing   +41 added lines, -42 removed lines patch added patch discarded remove patch
@@ -241,9 +241,9 @@  discard block
 block discarded – undo
241 241
         //scripts
242 242
         wp_enqueue_script('media-upload');
243 243
         wp_enqueue_script('thickbox');
244
-        wp_register_script('organization_settings', GEN_SET_ASSETS_URL . 'your_organization_settings.js',
244
+        wp_register_script('organization_settings', GEN_SET_ASSETS_URL.'your_organization_settings.js',
245 245
             array('jquery', 'media-upload', 'thickbox'), EVENT_ESPRESSO_VERSION, true);
246
-        wp_register_style('organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION);
246
+        wp_register_style('organization-css', GEN_SET_ASSETS_URL.'organization.css', array(), EVENT_ESPRESSO_VERSION);
247 247
         wp_enqueue_script('organization_settings');
248 248
         wp_enqueue_style('organization-css');
249 249
         $confirm_image_delete = array(
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
     public function load_scripts_styles_country_settings()
258 258
     {
259 259
         //scripts
260
-        wp_register_script('gen_settings_countries', GEN_SET_ASSETS_URL . 'gen_settings_countries.js',
260
+        wp_register_script('gen_settings_countries', GEN_SET_ASSETS_URL.'gen_settings_countries.js',
261 261
             array('ee_admin_js'), EVENT_ESPRESSO_VERSION, true);
262
-        wp_register_style('organization-css', GEN_SET_ASSETS_URL . 'organization.css', array(), EVENT_ESPRESSO_VERSION);
262
+        wp_register_style('organization-css', GEN_SET_ASSETS_URL.'organization.css', array(), EVENT_ESPRESSO_VERSION);
263 263
         wp_enqueue_script('gen_settings_countries');
264 264
         wp_enqueue_style('organization-css');
265 265
         
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         $this->_set_add_edit_form_tags('update_espresso_page_settings');
307 307
         $this->_set_publish_post_box_vars(null, false, false, null, false);
308 308
         $this->_template_args['admin_page_content'] = EEH_Template::display_template(
309
-            GEN_SET_TEMPLATE_PATH . 'espresso_page_settings.template.php',
309
+            GEN_SET_TEMPLATE_PATH.'espresso_page_settings.template.php',
310 310
             $this->_template_args,
311 311
             true
312 312
         );
@@ -429,13 +429,13 @@  discard block
 block discarded – undo
429 429
         add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
430 430
         
431 431
         //PUE verification stuff
432
-        $ver_option_key                                    = 'puvererr_' . basename(EE_PLUGIN_BASENAME);
432
+        $ver_option_key                                    = 'puvererr_'.basename(EE_PLUGIN_BASENAME);
433 433
         $verify_fail                                       = get_option($ver_option_key);
434 434
         $this->_template_args['site_license_key_verified'] = $verify_fail || ! empty($verify_fail) || (empty($this->_template_args['site_license_key']) && empty($verify_fail)) ? '<span class="dashicons dashicons-admin-network ee-icon-color-ee-red ee-icon-size-20"></span>' : '<span class="dashicons dashicons-admin-network ee-icon-color-ee-green ee-icon-size-20"></span>';
435 435
         
436 436
         $this->_set_add_edit_form_tags('update_your_organization_settings');
437 437
         $this->_set_publish_post_box_vars(null, false, false, null, false);
438
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'your_organization_settings.template.php',
438
+        $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'your_organization_settings.template.php',
439 439
             $this->_template_args, true);
440 440
         
441 441
         $this->display_admin_page_with_sidebar();
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         
586 586
         $this->_set_add_edit_form_tags('update_country_settings');
587 587
         $this->_set_publish_post_box_vars(null, false, false, null, false);
588
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'countries_settings.template.php',
588
+        $this->_template_args['admin_page_content'] = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'countries_settings.template.php',
589 589
             $this->_template_args, true);
590 590
         $this->display_admin_page_with_no_sidebar();
591 591
     }
@@ -615,65 +615,65 @@  discard block
 block discarded – undo
615 615
         add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'country_form_field_input__wrap'), 10, 2);
616 616
         $country = EEM_Country::instance()->get_one_by_ID($CNT_ISO);
617 617
         //EEH_Debug_Tools::printr( $country, '$country  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
618
-        $country_input_types            = array(
618
+        $country_input_types = array(
619 619
             'CNT_active'      => array(
620 620
                 'type'             => 'RADIO_BTN',
621
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
621
+                'input_name'       => 'cntry['.$CNT_ISO.']',
622 622
                 'class'            => '',
623 623
                 'options'          => $this->_yes_no_values,
624 624
                 'use_desc_4_label' => true
625 625
             ),
626 626
             'CNT_ISO'         => array(
627 627
                 'type'       => 'TEXT',
628
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
628
+                'input_name' => 'cntry['.$CNT_ISO.']',
629 629
                 'class'      => 'small-text'
630 630
             ),
631 631
             'CNT_ISO3'        => array(
632 632
                 'type'       => 'TEXT',
633
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
633
+                'input_name' => 'cntry['.$CNT_ISO.']',
634 634
                 'class'      => 'small-text'
635 635
             ),
636 636
             'RGN_ID'          => array(
637 637
                 'type'       => 'TEXT',
638
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
638
+                'input_name' => 'cntry['.$CNT_ISO.']',
639 639
                 'class'      => 'small-text'
640 640
             ),
641 641
             'CNT_name'        => array(
642 642
                 'type'       => 'TEXT',
643
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
643
+                'input_name' => 'cntry['.$CNT_ISO.']',
644 644
                 'class'      => 'regular-text'
645 645
             ),
646 646
             'CNT_cur_code'    => array(
647 647
                 'type'       => 'TEXT',
648
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
648
+                'input_name' => 'cntry['.$CNT_ISO.']',
649 649
                 'class'      => 'small-text'
650 650
             ),
651 651
             'CNT_cur_single'  => array(
652 652
                 'type'       => 'TEXT',
653
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
653
+                'input_name' => 'cntry['.$CNT_ISO.']',
654 654
                 'class'      => 'medium-text'
655 655
             ),
656 656
             'CNT_cur_plural'  => array(
657 657
                 'type'       => 'TEXT',
658
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
658
+                'input_name' => 'cntry['.$CNT_ISO.']',
659 659
                 'class'      => 'medium-text'
660 660
             ),
661 661
             'CNT_cur_sign'    => array(
662 662
                 'type'         => 'TEXT',
663
-                'input_name'   => 'cntry[' . $CNT_ISO . ']',
663
+                'input_name'   => 'cntry['.$CNT_ISO.']',
664 664
                 'class'        => 'small-text',
665 665
                 'htmlentities' => false
666 666
             ),
667 667
             'CNT_cur_sign_b4' => array(
668 668
                 'type'             => 'RADIO_BTN',
669
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
669
+                'input_name'       => 'cntry['.$CNT_ISO.']',
670 670
                 'class'            => '',
671 671
                 'options'          => $this->_yes_no_values,
672 672
                 'use_desc_4_label' => true
673 673
             ),
674 674
             'CNT_cur_dec_plc' => array(
675 675
                 'type'       => 'RADIO_BTN',
676
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
676
+                'input_name' => 'cntry['.$CNT_ISO.']',
677 677
                 'class'      => '',
678 678
                 'options'    => array(
679 679
                     array('id' => 0, 'text' => ''),
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
             ),
685 685
             'CNT_cur_dec_mrk' => array(
686 686
                 'type'             => 'RADIO_BTN',
687
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
687
+                'input_name'       => 'cntry['.$CNT_ISO.']',
688 688
                 'class'            => '',
689 689
                 'options'          => array(
690 690
                     array(
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
             ),
698 698
             'CNT_cur_thsnds'  => array(
699 699
                 'type'             => 'RADIO_BTN',
700
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
700
+                'input_name'       => 'cntry['.$CNT_ISO.']',
701 701
                 'class'            => '',
702 702
                 'options'          => array(
703 703
                     array(
@@ -710,12 +710,12 @@  discard block
 block discarded – undo
710 710
             ),
711 711
             'CNT_tel_code'    => array(
712 712
                 'type'       => 'TEXT',
713
-                'input_name' => 'cntry[' . $CNT_ISO . ']',
713
+                'input_name' => 'cntry['.$CNT_ISO.']',
714 714
                 'class'      => 'small-text'
715 715
             ),
716 716
             'CNT_is_EU'       => array(
717 717
                 'type'             => 'RADIO_BTN',
718
-                'input_name'       => 'cntry[' . $CNT_ISO . ']',
718
+                'input_name'       => 'cntry['.$CNT_ISO.']',
719 719
                 'class'            => '',
720 720
                 'options'          => $this->_yes_no_values,
721 721
                 'use_desc_4_label' => true
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
         );
724 724
         $this->_template_args['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object($country,
725 725
             $country_input_types);
726
-        $country_details_settings       = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'country_details_settings.template.php',
726
+        $country_details_settings       = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'country_details_settings.template.php',
727 727
             $this->_template_args, true);
728 728
         
729 729
         if (defined('DOING_AJAX')) {
@@ -773,20 +773,20 @@  discard block
 block discarded – undo
773 773
             foreach ($states as $STA_ID => $state) {
774 774
                 if ($state instanceof EE_State) {
775 775
                     //STA_abbrev 	STA_name 	STA_active
776
-                    $state_input_types                                           = array(
776
+                    $state_input_types = array(
777 777
                         'STA_abbrev' => array(
778 778
                             'type'       => 'TEXT',
779
-                            'input_name' => 'states[' . $STA_ID . ']',
779
+                            'input_name' => 'states['.$STA_ID.']',
780 780
                             'class'      => 'mid-text'
781 781
                         ),
782 782
                         'STA_name'   => array(
783 783
                             'type'       => 'TEXT',
784
-                            'input_name' => 'states[' . $STA_ID . ']',
784
+                            'input_name' => 'states['.$STA_ID.']',
785 785
                             'class'      => 'regular-text'
786 786
                         ),
787 787
                         'STA_active' => array(
788 788
                             'type'             => 'RADIO_BTN',
789
-                            'input_name'       => 'states[' . $STA_ID . ']',
789
+                            'input_name'       => 'states['.$STA_ID.']',
790 790
                             'options'          => $this->_yes_no_values,
791 791
                             'use_desc_4_label' => true
792 792
                         )
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
         $this->_template_args['add_new_state_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'add_new_state'),
811 811
             GEN_SET_ADMIN_URL);
812 812
         
813
-        $state_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'state_details_settings.template.php',
813
+        $state_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH.'state_details_settings.template.php',
814 814
             $this->_template_args, true);
815 815
         
816 816
         if (defined('DOING_AJAX')) {
@@ -851,8 +851,7 @@  discard block
 block discarded – undo
851 851
                 __FILE__, __FUNCTION__, __LINE__);
852 852
             $success = false;
853 853
         }
854
-        $STA_name = isset($this->_req_data['STA_name']) ? sanitize_text_field($this->_req_data['STA_name']) :
855
-            false;
854
+        $STA_name = isset($this->_req_data['STA_name']) ? sanitize_text_field($this->_req_data['STA_name']) : false;
856 855
         if ( ! $STA_name) {
857 856
             EE_Error::add_error(__('No State name or an invalid State name was received.', 'event_espresso'), __FILE__,
858 857
                 __FUNCTION__, __LINE__);
@@ -866,7 +865,7 @@  discard block
 block discarded – undo
866 865
                 'STA_name'   => $STA_name,
867 866
                 'STA_active' => true
868 867
             );
869
-            $success       = EEM_State::instance()->insert($cols_n_values);
868
+            $success = EEM_State::instance()->insert($cols_n_values);
870 869
             EE_Error::add_success(__('The State was added successfully.', 'event_espresso'));
871 870
         }
872 871
         
@@ -968,7 +967,7 @@  discard block
 block discarded – undo
968 967
                     'CNT_ISO'    => $CNT_ISO,
969 968
                     'STA_abbrev' => sanitize_text_field($state['STA_abbrev']),
970 969
                     'STA_name'   => sanitize_text_field($state['STA_name']),
971
-                    'STA_active' => (bool)absint($state['STA_active'])
970
+                    'STA_active' => (bool) absint($state['STA_active'])
972 971
                 );
973 972
                 // where values
974 973
                 $where_cols_n_values = array(array('STA_ID' => $STA_ID));
@@ -1004,7 +1003,7 @@  discard block
 block discarded – undo
1004 1003
         return '
1005 1004
 			<tr>
1006 1005
 				<th>
1007
-					' . $label . '
1006
+					' . $label.'
1008 1007
 				</th>';
1009 1008
     }
1010 1009
     
@@ -1022,7 +1021,7 @@  discard block
 block discarded – undo
1022 1021
     {
1023 1022
         return '
1024 1023
 				<td class="general-settings-country-input-td">
1025
-					' . $input . '
1024
+					' . $input.'
1026 1025
 				</td>
1027 1026
 			</tr>';
1028 1027
     }
@@ -1057,7 +1056,7 @@  discard block
 block discarded – undo
1057 1056
     {
1058 1057
         return '
1059 1058
 				<td class="general-settings-country-state-input-td">
1060
-					' . $input . '
1059
+					' . $input.'
1061 1060
 				</td>';
1062 1061
         
1063 1062
     }
@@ -1081,10 +1080,10 @@  discard block
 block discarded – undo
1081 1080
      */
1082 1081
     public static function edit_view_links($ee_page_id)
1083 1082
     {
1084
-        $links = '<a href="' . add_query_arg(array('post' => $ee_page_id, 'action' => 'edit'),
1085
-                admin_url('post.php')) . '" >' . __('Edit', 'event_espresso') . '</a>';
1083
+        $links = '<a href="'.add_query_arg(array('post' => $ee_page_id, 'action' => 'edit'),
1084
+                admin_url('post.php')).'" >'.__('Edit', 'event_espresso').'</a>';
1086 1085
         $links .= ' &nbsp;|&nbsp; ';
1087
-        $links .= '<a href="' . get_permalink($ee_page_id) . '" >' . __('View', 'event_espresso') . '</a>';
1086
+        $links .= '<a href="'.get_permalink($ee_page_id).'" >'.__('View', 'event_espresso').'</a>';
1088 1087
         
1089 1088
         return $links;
1090 1089
     }
@@ -1118,7 +1117,7 @@  discard block
 block discarded – undo
1118 1117
             $sc_status = sprintf(__('Shortcode%sProblem', 'event_espresso'), '&nbsp;');
1119 1118
         }
1120 1119
         
1121
-        return '<span style="color:' . $pg_colour . '; margin-right:2em;"><strong>' . $pg_status . '</strong></span><span style="color:' . $sc_colour . '"><strong>' . $sc_status . '</strong></span>';
1120
+        return '<span style="color:'.$pg_colour.'; margin-right:2em;"><strong>'.$pg_status.'</strong></span><span style="color:'.$sc_colour.'"><strong>'.$sc_status.'</strong></span>';
1122 1121
         
1123 1122
     }
1124 1123
     
@@ -1147,7 +1146,7 @@  discard block
 block discarded – undo
1147 1146
                     $current = '';
1148 1147
                 }
1149 1148
                 
1150
-                echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>";
1149
+                echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad ".esc_html($item->post_title)."</option>";
1151 1150
                 parent_dropdown($default, $item->ID, $level + 1);
1152 1151
             }
1153 1152
         } else {
Please login to merge, or discard this patch.
general_settings/help_tours/Your_Organization_Help_Tour.class.php 2 patches
Indentation   +94 added lines, -94 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
 /**
@@ -16,109 +16,109 @@  discard block
 block discarded – undo
16 16
 class Your_Organization_Help_Tour extends EE_Help_Tour
17 17
 {
18 18
     
19
-    protected function _set_tour_properties()
20
-    {
21
-        $this->_label = __('Your Organization Tour', 'event_espresso');
22
-        $this->_slug  = 'your-organization-joyride';
23
-    }
19
+	protected function _set_tour_properties()
20
+	{
21
+		$this->_label = __('Your Organization Tour', 'event_espresso');
22
+		$this->_slug  = 'your-organization-joyride';
23
+	}
24 24
     
25 25
     
26
-    protected function _set_tour_stops()
27
-    {
28
-        $this->_stops = array(
29
-            10 => array(
30
-                'content' => $this->_start(),
31
-            ),
26
+	protected function _set_tour_stops()
27
+	{
28
+		$this->_stops = array(
29
+			10 => array(
30
+				'content' => $this->_start(),
31
+			),
32 32
             
33
-            30 => array(
34
-                'id'      => 'contact_info_h4',
35
-                'content' => $this->_contact_information_stop(),
36
-                'options' => array(
37
-                    'tipLocation'    => 'left',
38
-                    'tipAdjustmentY' => -50,
39
-                    'tipAdjustmentX' => 15
40
-                )
41
-            ),
42
-            40 => array(
43
-                'id'      => 'upload_image',
44
-                'content' => $this->_upload_image_stop(),
45
-                'options' => array(
46
-                    'tipLocation'    => 'right',
47
-                    'tipAdjustmentY' => -50,
48
-                    'tipAdjustmentX' => 15
49
-                )
50
-            ),
51
-            50 => array(
52
-                'id'      => 'organization_facebook',
53
-                'content' => $this->_organization_facebook_stop(),
54
-                'options' => array(
55
-                    'tipLocation'    => 'right',
56
-                    'tipAdjustmentY' => -50,
57
-                    'tipAdjustmentX' => 15
58
-                )
59
-            ),
60
-            60 => array(
61
-                'id'      => 'ueip_optin',
62
-                'content' => $this->_ueip_option_stop(),
63
-                'options' => array(
64
-                    'tipLocation'    => 'right',
65
-                    'tipAdjustmentY' => -50,
66
-                    'tipAdjustmentX' => 15
67
-                )
68
-            ),
69
-            70 => array(
70
-                'id'      => 'espresso_major_buttons_wrapper',
71
-                'content' => $this->_end_tour_stop(),
72
-                'options' => array(
73
-                    'tipLocation'    => 'right',
74
-                    'tipAdjustmentY' => -50,
75
-                    'tipAdjustmentX' => 185
76
-                )
77
-            )
78
-        );
79
-    }
33
+			30 => array(
34
+				'id'      => 'contact_info_h4',
35
+				'content' => $this->_contact_information_stop(),
36
+				'options' => array(
37
+					'tipLocation'    => 'left',
38
+					'tipAdjustmentY' => -50,
39
+					'tipAdjustmentX' => 15
40
+				)
41
+			),
42
+			40 => array(
43
+				'id'      => 'upload_image',
44
+				'content' => $this->_upload_image_stop(),
45
+				'options' => array(
46
+					'tipLocation'    => 'right',
47
+					'tipAdjustmentY' => -50,
48
+					'tipAdjustmentX' => 15
49
+				)
50
+			),
51
+			50 => array(
52
+				'id'      => 'organization_facebook',
53
+				'content' => $this->_organization_facebook_stop(),
54
+				'options' => array(
55
+					'tipLocation'    => 'right',
56
+					'tipAdjustmentY' => -50,
57
+					'tipAdjustmentX' => 15
58
+				)
59
+			),
60
+			60 => array(
61
+				'id'      => 'ueip_optin',
62
+				'content' => $this->_ueip_option_stop(),
63
+				'options' => array(
64
+					'tipLocation'    => 'right',
65
+					'tipAdjustmentY' => -50,
66
+					'tipAdjustmentX' => 15
67
+				)
68
+			),
69
+			70 => array(
70
+				'id'      => 'espresso_major_buttons_wrapper',
71
+				'content' => $this->_end_tour_stop(),
72
+				'options' => array(
73
+					'tipLocation'    => 'right',
74
+					'tipAdjustmentY' => -50,
75
+					'tipAdjustmentX' => 185
76
+				)
77
+			)
78
+		);
79
+	}
80 80
     
81 81
     
82
-    protected function _start()
83
-    {
84
-        $content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
85
-        $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.',
86
-                'event_espresso') . '</p>';
82
+	protected function _start()
83
+	{
84
+		$content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
85
+		$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.',
86
+				'event_espresso') . '</p>';
87 87
         
88
-        return $content;
89
-    }
88
+		return $content;
89
+	}
90 90
     
91
-    protected function _site_license_key_stop()
92
-    {
93
-        return '<p>' . __('Enter your support license key here to enable one-click updates.',
94
-            'event_espresso') . '</p>';
95
-    }
91
+	protected function _site_license_key_stop()
92
+	{
93
+		return '<p>' . __('Enter your support license key here to enable one-click updates.',
94
+			'event_espresso') . '</p>';
95
+	}
96 96
     
97
-    protected function _contact_information_stop()
98
-    {
99
-        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.',
100
-            'event_espresso') . '</p>';
101
-    }
97
+	protected function _contact_information_stop()
98
+	{
99
+		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.',
100
+			'event_espresso') . '</p>';
101
+	}
102 102
     
103
-    protected function _upload_image_stop()
104
-    {
105
-        return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
106
-    }
103
+	protected function _upload_image_stop()
104
+	{
105
+		return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
106
+	}
107 107
     
108
-    protected function _organization_facebook_stop()
109
-    {
110
-        return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
111
-    }
108
+	protected function _organization_facebook_stop()
109
+	{
110
+		return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
111
+	}
112 112
     
113
-    protected function _ueip_option_stop()
114
-    {
115
-        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.',
116
-            'event_espresso') . '</p>';
117
-    }
113
+	protected function _ueip_option_stop()
114
+	{
115
+		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.',
116
+			'event_espresso') . '</p>';
117
+	}
118 118
     
119
-    protected function _end_tour_stop()
120
-    {
121
-        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.',
122
-            'event_espresso') . '</p>';
123
-    }
119
+	protected function _end_tour_stop()
120
+	{
121
+		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.',
122
+			'event_espresso') . '</p>';
123
+	}
124 124
 }
125 125
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,44 +81,44 @@
 block discarded – undo
81 81
     
82 82
     protected function _start()
83 83
     {
84
-        $content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
85
-        $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.',
86
-                'event_espresso') . '</p>';
84
+        $content = '<h3>'.__('Organization Settings', 'event_espresso').'</h3>';
85
+        $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.',
86
+                'event_espresso').'</p>';
87 87
         
88 88
         return $content;
89 89
     }
90 90
     
91 91
     protected function _site_license_key_stop()
92 92
     {
93
-        return '<p>' . __('Enter your support license key here to enable one-click updates.',
94
-            'event_espresso') . '</p>';
93
+        return '<p>'.__('Enter your support license key here to enable one-click updates.',
94
+            'event_espresso').'</p>';
95 95
     }
96 96
     
97 97
     protected function _contact_information_stop()
98 98
     {
99
-        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.',
100
-            'event_espresso') . '</p>';
99
+        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.',
100
+            'event_espresso').'</p>';
101 101
     }
102 102
     
103 103
     protected function _upload_image_stop()
104 104
     {
105
-        return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
105
+        return '<p>'.__('Add a logo. This can be used for invoices and tickets.', 'event_espresso').'</p>';
106 106
     }
107 107
     
108 108
     protected function _organization_facebook_stop()
109 109
     {
110
-        return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
110
+        return '<p>'.__('Add links to various social media networks.', 'event_espresso').'</p>';
111 111
     }
112 112
     
113 113
     protected function _ueip_option_stop()
114 114
     {
115
-        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.',
116
-            'event_espresso') . '</p>';
115
+        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.',
116
+            'event_espresso').'</p>';
117 117
     }
118 118
     
119 119
     protected function _end_tour_stop()
120 120
     {
121
-        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.',
122
-            'event_espresso') . '</p>';
121
+        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.',
122
+            'event_espresso').'</p>';
123 123
     }
124 124
 }
125 125
\ No newline at end of file
Please login to merge, or discard this patch.
help_tours/Registration_Form_Question_Groups_Help_Tour.class.php 2 patches
Indentation   +128 added lines, -128 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,145 +18,145 @@  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[15] = array(
38
-                'id'      => 'id',
39
-                'content' => $this->_id_stop(),
40
-                'options' => array(
41
-                    'tipLocation'    => 'top',
42
-                    'tipAdjustmentY' => -30,
43
-                    'tipAdjustmentX' => -15
44
-                )
45
-            );
46
-            $this->_stops[20] = array(
47
-                'id'      => 'name',
48
-                'content' => $this->_name_stop(),
49
-                'options' => array(
50
-                    'tipLocation'    => 'top',
51
-                    'tipAdjustmentY' => -30,
52
-                    'tipAdjustmentX' => 25
53
-                )
54
-            );
55
-            $this->_stops[30] = array(
56
-                'id'      => 'description',
57
-                'content' => $this->_description_stop(),
58
-                'options' => array(
59
-                    'tipLocation'    => 'top',
60
-                    'tipAdjustmentY' => -30,
61
-                    'tipAdjustmentX' => 20
62
-                )
63
-            );
64
-            $this->_stops[40] = array(
65
-                'id'      => 'show_group_name',
66
-                'content' => $this->_show_group_name_stop(),
67
-                'options' => array(
68
-                    'tipLocation'    => 'top',
69
-                    'tipAdjustmentY' => -30,
70
-                    'tipAdjustmentX' => 20
71
-                )
72
-            );
73
-            $this->_stops[50] = array(
74
-                'id'      => 'show_group_desc',
75
-                'content' => $this->_show_group_description_stop(),
76
-                'options' => array(
77
-                    'tipLocation'    => 'top',
78
-                    'tipAdjustmentY' => -30,
79
-                    'tipAdjustmentX' => 20
80
-                )
81
-            );
82
-            $this->_stops[60] = array(
83
-                'class'   => 'bulkactions',
84
-                'content' => $this->_bulk_actions_stop(),
85
-                'options' => array(
86
-                    'tipLocation'    => 'left',
87
-                    'tipAdjustmentY' => -50,
88
-                    'tipAdjustmentX' => -80
89
-                )
90
-            );
91
-            $this->_stops[70] = array(
92
-                'id'      => 'add-new-question-group',
93
-                'content' => $this->_add_new_question_group_stop(),
94
-                'options' => array(
95
-                    'tipLocation'    => 'right',
96
-                    'tipAdjustmentY' => -50,
97
-                    'tipAdjustmentX' => 15
98
-                )
99
-            );
100
-        }
101
-    }
36
+		if ($this->_is_caf) {
37
+			$this->_stops[15] = array(
38
+				'id'      => 'id',
39
+				'content' => $this->_id_stop(),
40
+				'options' => array(
41
+					'tipLocation'    => 'top',
42
+					'tipAdjustmentY' => -30,
43
+					'tipAdjustmentX' => -15
44
+				)
45
+			);
46
+			$this->_stops[20] = array(
47
+				'id'      => 'name',
48
+				'content' => $this->_name_stop(),
49
+				'options' => array(
50
+					'tipLocation'    => 'top',
51
+					'tipAdjustmentY' => -30,
52
+					'tipAdjustmentX' => 25
53
+				)
54
+			);
55
+			$this->_stops[30] = array(
56
+				'id'      => 'description',
57
+				'content' => $this->_description_stop(),
58
+				'options' => array(
59
+					'tipLocation'    => 'top',
60
+					'tipAdjustmentY' => -30,
61
+					'tipAdjustmentX' => 20
62
+				)
63
+			);
64
+			$this->_stops[40] = array(
65
+				'id'      => 'show_group_name',
66
+				'content' => $this->_show_group_name_stop(),
67
+				'options' => array(
68
+					'tipLocation'    => 'top',
69
+					'tipAdjustmentY' => -30,
70
+					'tipAdjustmentX' => 20
71
+				)
72
+			);
73
+			$this->_stops[50] = array(
74
+				'id'      => 'show_group_desc',
75
+				'content' => $this->_show_group_description_stop(),
76
+				'options' => array(
77
+					'tipLocation'    => 'top',
78
+					'tipAdjustmentY' => -30,
79
+					'tipAdjustmentX' => 20
80
+				)
81
+			);
82
+			$this->_stops[60] = array(
83
+				'class'   => 'bulkactions',
84
+				'content' => $this->_bulk_actions_stop(),
85
+				'options' => array(
86
+					'tipLocation'    => 'left',
87
+					'tipAdjustmentY' => -50,
88
+					'tipAdjustmentX' => -80
89
+				)
90
+			);
91
+			$this->_stops[70] = array(
92
+				'id'      => 'add-new-question-group',
93
+				'content' => $this->_add_new_question_group_stop(),
94
+				'options' => array(
95
+					'tipLocation'    => 'right',
96
+					'tipAdjustmentY' => -50,
97
+					'tipAdjustmentX' => 15
98
+				)
99
+			);
100
+		}
101
+	}
102 102
     
103 103
     
104
-    protected function _start()
105
-    {
106
-        $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
107
-        if ($this->_is_caf) {
108
-            $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.',
109
-                    'event_espresso') . '</p>';
110
-        } else {
111
-            $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
112
-                    'event_espresso') . '</p>';
113
-        }
104
+	protected function _start()
105
+	{
106
+		$content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
107
+		if ($this->_is_caf) {
108
+			$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.',
109
+					'event_espresso') . '</p>';
110
+		} else {
111
+			$content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
112
+					'event_espresso') . '</p>';
113
+		}
114 114
         
115
-        return $content;
116
-    }
115
+		return $content;
116
+	}
117 117
     
118
-    protected function _id_stop()
119
-    {
120
-        return '<p>' . __('View the ID of the question group. Can be sorted in ascending or descending order.',
121
-            'event_espresso') . '</p>';
122
-    }
118
+	protected function _id_stop()
119
+	{
120
+		return '<p>' . __('View the ID of the question group. Can be sorted in ascending or descending order.',
121
+			'event_espresso') . '</p>';
122
+	}
123 123
     
124
-    protected function _name_stop()
125
-    {
126
-        return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
127
-            'event_espresso') . '</p>';
128
-    }
124
+	protected function _name_stop()
125
+	{
126
+		return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
127
+			'event_espresso') . '</p>';
128
+	}
129 129
     
130
-    protected function _description_stop()
131
-    {
132
-        return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
133
-    }
130
+	protected function _description_stop()
131
+	{
132
+		return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
133
+	}
134 134
     
135
-    protected function _show_group_name_stop()
136
-    {
137
-        return '<p>' . __('View if the name of the question group should be shown to customers.',
138
-            'event_espresso') . '</p>';
139
-    }
135
+	protected function _show_group_name_stop()
136
+	{
137
+		return '<p>' . __('View if the name of the question group should be shown to customers.',
138
+			'event_espresso') . '</p>';
139
+	}
140 140
     
141
-    protected function _show_group_description_stop()
142
-    {
143
-        return '<p>' . __('View if the description of the question group should be shown to customers.',
144
-            'event_espresso') . '</p>';
145
-    }
141
+	protected function _show_group_description_stop()
142
+	{
143
+		return '<p>' . __('View if the description of the question group should be shown to customers.',
144
+			'event_espresso') . '</p>';
145
+	}
146 146
     
147
-    protected function _bulk_actions_stop()
148
-    {
149
-        return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
150
-    }
147
+	protected function _bulk_actions_stop()
148
+	{
149
+		return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
150
+	}
151 151
     
152
-    protected function _search_stop()
153
-    {
154
-        return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
155
-            'event_espresso') . '</p>';
156
-    }
152
+	protected function _search_stop()
153
+	{
154
+		return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
155
+			'event_espresso') . '</p>';
156
+	}
157 157
     
158
-    protected function _add_new_question_group_stop()
159
-    {
160
-        return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
161
-    }
158
+	protected function _add_new_question_group_stop()
159
+	{
160
+		return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
161
+	}
162 162
 }
163 163
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
     
104 104
     protected function _start()
105 105
     {
106
-        $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
106
+        $content = '<h3>'.__('Question Groups', 'event_espresso').'</h3>';
107 107
         if ($this->_is_caf) {
108
-            $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.',
109
-                    'event_espresso') . '</p>';
108
+            $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.',
109
+                    'event_espresso').'</p>';
110 110
         } else {
111
-            $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
112
-                    'event_espresso') . '</p>';
111
+            $content .= '<p>'.__('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
112
+                    'event_espresso').'</p>';
113 113
         }
114 114
         
115 115
         return $content;
@@ -117,46 +117,46 @@  discard block
 block discarded – undo
117 117
     
118 118
     protected function _id_stop()
119 119
     {
120
-        return '<p>' . __('View the ID of the question group. Can be sorted in ascending or descending order.',
121
-            'event_espresso') . '</p>';
120
+        return '<p>'.__('View the ID of the question group. Can be sorted in ascending or descending order.',
121
+            'event_espresso').'</p>';
122 122
     }
123 123
     
124 124
     protected function _name_stop()
125 125
     {
126
-        return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
127
-            'event_espresso') . '</p>';
126
+        return '<p>'.__('View available questions groups. You can reorder your questions by dragging and dropping them.',
127
+            'event_espresso').'</p>';
128 128
     }
129 129
     
130 130
     protected function _description_stop()
131 131
     {
132
-        return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
132
+        return '<p>'.__('View the question group description.', 'event_espresso').'</p>';
133 133
     }
134 134
     
135 135
     protected function _show_group_name_stop()
136 136
     {
137
-        return '<p>' . __('View if the name of the question group should be shown to customers.',
138
-            'event_espresso') . '</p>';
137
+        return '<p>'.__('View if the name of the question group should be shown to customers.',
138
+            'event_espresso').'</p>';
139 139
     }
140 140
     
141 141
     protected function _show_group_description_stop()
142 142
     {
143
-        return '<p>' . __('View if the description of the question group should be shown to customers.',
144
-            'event_espresso') . '</p>';
143
+        return '<p>'.__('View if the description of the question group should be shown to customers.',
144
+            'event_espresso').'</p>';
145 145
     }
146 146
     
147 147
     protected function _bulk_actions_stop()
148 148
     {
149
-        return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
149
+        return '<p>'.__('Perform bulk actions to multiple question groups.', 'event_espresso').'</p>';
150 150
     }
151 151
     
152 152
     protected function _search_stop()
153 153
     {
154
-        return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
155
-            'event_espresso') . '</p>';
154
+        return '<p>'.__('Search through questions. The following sources will be searched: question group name and question group description.',
155
+            'event_espresso').'</p>';
156 156
     }
157 157
     
158 158
     protected function _add_new_question_group_stop()
159 159
     {
160
-        return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
160
+        return '<p>'.__('Click here to create a new question group.', 'event_espresso').'</p>';
161 161
     }
162 162
 }
163 163
\ No newline at end of file
Please login to merge, or discard this patch.
help_tours/Registration_Form_Questions_Overview_Help_Tour.class.php 2 patches
Indentation   +118 added lines, -118 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,64 +18,64 @@  discard block
 block discarded – undo
18 18
 class Registration_Form_Questions_Overview_Help_Tour extends EE_Help_Tour
19 19
 {
20 20
     
21
-    protected function _set_tour_properties()
22
-    {
23
-        $this->_label = __('Questions Overview Tour', 'event_espresso');
24
-        $this->_slug  = $this->_is_caf ? 'questions-overview-caf-joyride' : 'questions-overview-joyride';
25
-    }
21
+	protected function _set_tour_properties()
22
+	{
23
+		$this->_label = __('Questions Overview Tour', 'event_espresso');
24
+		$this->_slug  = $this->_is_caf ? 'questions-overview-caf-joyride' : 'questions-overview-joyride';
25
+	}
26 26
     
27
-    protected function _set_tour_stops()
28
-    {
29
-        $this->_stops = array(
30
-            10  => array(
31
-                'content' => $this->_start(),
32
-            ),
33
-            30  => array(
34
-                'id'      => 'display_text',
35
-                'content' => $this->_display_text_stop(),
36
-                'options' => array(
37
-                    'tipLocation'    => 'top',
38
-                    'tipAdjustmentX' => -5,
39
-                    'tipAdjustmentY' => -25
40
-                )
41
-            ),
42
-            40  => array(
43
-                'id'      => 'admin_label',
44
-                'content' => $this->_admin_label_stop(),
45
-                'options' => array(
46
-                    'tipLocation'    => 'top',
47
-                    'tipAdjustmentX' => 20,
48
-                    'tipAdjustmentY' => -25
49
-                )
50
-            ),
51
-            50  => array(
52
-                'id'      => 'type',
53
-                'content' => $this->_type_stop(),
54
-                'options' => array(
55
-                    'tipLocation'    => 'top',
56
-                    'tipAdjustmentX' => -5,
57
-                    'tipAdjustmentY' => -25
58
-                )
59
-            ),
60
-            60  => array(
61
-                'id'      => 'values',
62
-                'content' => $this->_values_stop(),
63
-                'options' => array(
64
-                    'tipLocation'    => 'top',
65
-                    'tipAdjustmentX' => -5,
66
-                    'tipAdjustmentY' => -25
67
-                )
68
-            ),
69
-            70  => array(
70
-                'id'      => 'required',
71
-                'content' => $this->_required_stop(),
72
-                'options' => array(
73
-                    'tipLocation'    => 'top',
74
-                    'tipAdjustmentY' => -20,
75
-                    'tipAdjustmentX' => -15
76
-                )
77
-            ),
78
-            /*80 => array(
27
+	protected function _set_tour_stops()
28
+	{
29
+		$this->_stops = array(
30
+			10  => array(
31
+				'content' => $this->_start(),
32
+			),
33
+			30  => array(
34
+				'id'      => 'display_text',
35
+				'content' => $this->_display_text_stop(),
36
+				'options' => array(
37
+					'tipLocation'    => 'top',
38
+					'tipAdjustmentX' => -5,
39
+					'tipAdjustmentY' => -25
40
+				)
41
+			),
42
+			40  => array(
43
+				'id'      => 'admin_label',
44
+				'content' => $this->_admin_label_stop(),
45
+				'options' => array(
46
+					'tipLocation'    => 'top',
47
+					'tipAdjustmentX' => 20,
48
+					'tipAdjustmentY' => -25
49
+				)
50
+			),
51
+			50  => array(
52
+				'id'      => 'type',
53
+				'content' => $this->_type_stop(),
54
+				'options' => array(
55
+					'tipLocation'    => 'top',
56
+					'tipAdjustmentX' => -5,
57
+					'tipAdjustmentY' => -25
58
+				)
59
+			),
60
+			60  => array(
61
+				'id'      => 'values',
62
+				'content' => $this->_values_stop(),
63
+				'options' => array(
64
+					'tipLocation'    => 'top',
65
+					'tipAdjustmentX' => -5,
66
+					'tipAdjustmentY' => -25
67
+				)
68
+			),
69
+			70  => array(
70
+				'id'      => 'required',
71
+				'content' => $this->_required_stop(),
72
+				'options' => array(
73
+					'tipLocation'    => 'top',
74
+					'tipAdjustmentY' => -20,
75
+					'tipAdjustmentX' => -15
76
+				)
77
+			),
78
+			/*80 => array(
79 79
                 'class' => 'bulkactions',
80 80
                 'content' => $this->_bulk_actions_stop(),
81 81
                 'options' => array(
@@ -84,78 +84,78 @@  discard block
 block discarded – undo
84 84
                     'tipAdjustmentX' => -15
85 85
                     )
86 86
                 ),*/
87
-            90  => array(
88
-                'id'      => 'event-espresso_page_espresso_registration_form-search-input',
89
-                'content' => $this->_search_stop(),
90
-                'options' => array(
91
-                    'tipLocation'    => 'left',
92
-                    'tipAdjustmentY' => -50,
93
-                    'tipAdjustmentX' => -15
94
-                )
95
-            ),
96
-            100 => array(
97
-                'id'      => 'add-new-question',
98
-                'content' => $this->_add_new_question_stop(),
99
-                'options' => array(
100
-                    'tipLocation'    => 'right',
101
-                    'tipAdjustmentY' => -50,
102
-                    'tipAdjustmentX' => 15
103
-                )
104
-            ),
105
-        );
106
-    }
87
+			90  => array(
88
+				'id'      => 'event-espresso_page_espresso_registration_form-search-input',
89
+				'content' => $this->_search_stop(),
90
+				'options' => array(
91
+					'tipLocation'    => 'left',
92
+					'tipAdjustmentY' => -50,
93
+					'tipAdjustmentX' => -15
94
+				)
95
+			),
96
+			100 => array(
97
+				'id'      => 'add-new-question',
98
+				'content' => $this->_add_new_question_stop(),
99
+				'options' => array(
100
+					'tipLocation'    => 'right',
101
+					'tipAdjustmentY' => -50,
102
+					'tipAdjustmentX' => 15
103
+				)
104
+			),
105
+		);
106
+	}
107 107
     
108 108
     
109
-    protected function _start()
110
-    {
111
-        $content = '<h3>' . __('Questions Overview', 'event_espresso') . '</h3>';
112
-        $content .= '<p>' . __('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.',
113
-                'event_espresso') . '</p>';
109
+	protected function _start()
110
+	{
111
+		$content = '<h3>' . __('Questions Overview', 'event_espresso') . '</h3>';
112
+		$content .= '<p>' . __('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.',
113
+				'event_espresso') . '</p>';
114 114
         
115
-        return $content;
116
-    }
115
+		return $content;
116
+	}
117 117
     
118
-    protected function _display_text_stop()
119
-    {
120
-        return '<p>' . __('View available questions. You can reorder your questions by dragging and dropping them.',
121
-            'event_espresso') . '</p>';
122
-    }
118
+	protected function _display_text_stop()
119
+	{
120
+		return '<p>' . __('View available questions. You can reorder your questions by dragging and dropping them.',
121
+			'event_espresso') . '</p>';
122
+	}
123 123
     
124
-    protected function _admin_label_stop()
125
-    {
126
-        return '<p>' . __('View the admin label for your questions.', 'event_espresso') . '</p>';
127
-    }
124
+	protected function _admin_label_stop()
125
+	{
126
+		return '<p>' . __('View the admin label for your questions.', 'event_espresso') . '</p>';
127
+	}
128 128
     
129
-    protected function _type_stop()
130
-    {
131
-        return '<p>' . __('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.',
132
-            'event_espresso') . '</p>';
133
-    }
129
+	protected function _type_stop()
130
+	{
131
+		return '<p>' . __('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.',
132
+			'event_espresso') . '</p>';
133
+	}
134 134
     
135
-    protected function _values_stop()
136
-    {
137
-        return '<p>' . __('View stored values for checkboxes, radio buttons, and select boxes.',
138
-            'event_espresso') . '</p>';
139
-    }
135
+	protected function _values_stop()
136
+	{
137
+		return '<p>' . __('View stored values for checkboxes, radio buttons, and select boxes.',
138
+			'event_espresso') . '</p>';
139
+	}
140 140
     
141
-    protected function _required_stop()
142
-    {
143
-        return '<p>' . __('View if a question is required.', 'event_espresso') . '</p>';
144
-    }
141
+	protected function _required_stop()
142
+	{
143
+		return '<p>' . __('View if a question is required.', 'event_espresso') . '</p>';
144
+	}
145 145
     
146
-    /* protected function _bulk_actions_stop() {
146
+	/* protected function _bulk_actions_stop() {
147 147
         return '<p>' . __('Perform bulk actions to multiple questions.', 'event_espresso') . '</p>';
148 148
     } */
149 149
     
150
-    protected function _search_stop()
151
-    {
152
-        return '<p>' . __('Search through questions. The following sources will be searched: Name of Question (display text).',
153
-            'event_espresso') . '</p>';
154
-    }
150
+	protected function _search_stop()
151
+	{
152
+		return '<p>' . __('Search through questions. The following sources will be searched: Name of Question (display text).',
153
+			'event_espresso') . '</p>';
154
+	}
155 155
     
156
-    protected function _add_new_question_stop()
157
-    {
158
-        return '<p>' . __('Click here to add a new question.', 'event_espresso') . '</p>';
159
-    }
156
+	protected function _add_new_question_stop()
157
+	{
158
+		return '<p>' . __('Click here to add a new question.', 'event_espresso') . '</p>';
159
+	}
160 160
     
161 161
 }
162 162
\ 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
@@ -108,39 +108,39 @@  discard block
 block discarded – undo
108 108
     
109 109
     protected function _start()
110 110
     {
111
-        $content = '<h3>' . __('Questions Overview', 'event_espresso') . '</h3>';
112
-        $content .= '<p>' . __('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.',
113
-                'event_espresso') . '</p>';
111
+        $content = '<h3>'.__('Questions Overview', 'event_espresso').'</h3>';
112
+        $content .= '<p>'.__('This tour of the Questions Overview page will go over different areas of the screen to help you understand what they are used for.',
113
+                'event_espresso').'</p>';
114 114
         
115 115
         return $content;
116 116
     }
117 117
     
118 118
     protected function _display_text_stop()
119 119
     {
120
-        return '<p>' . __('View available questions. You can reorder your questions by dragging and dropping them.',
121
-            'event_espresso') . '</p>';
120
+        return '<p>'.__('View available questions. You can reorder your questions by dragging and dropping them.',
121
+            'event_espresso').'</p>';
122 122
     }
123 123
     
124 124
     protected function _admin_label_stop()
125 125
     {
126
-        return '<p>' . __('View the admin label for your questions.', 'event_espresso') . '</p>';
126
+        return '<p>'.__('View the admin label for your questions.', 'event_espresso').'</p>';
127 127
     }
128 128
     
129 129
     protected function _type_stop()
130 130
     {
131
-        return '<p>' . __('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.',
132
-            'event_espresso') . '</p>';
131
+        return '<p>'.__('View the type of question. Available options are Text, Textarea, Checkboxes, Radio Buttons, Dropdown, State/Province Dropdown, Country Dropdown, and Date Picker.',
132
+            'event_espresso').'</p>';
133 133
     }
134 134
     
135 135
     protected function _values_stop()
136 136
     {
137
-        return '<p>' . __('View stored values for checkboxes, radio buttons, and select boxes.',
138
-            'event_espresso') . '</p>';
137
+        return '<p>'.__('View stored values for checkboxes, radio buttons, and select boxes.',
138
+            'event_espresso').'</p>';
139 139
     }
140 140
     
141 141
     protected function _required_stop()
142 142
     {
143
-        return '<p>' . __('View if a question is required.', 'event_espresso') . '</p>';
143
+        return '<p>'.__('View if a question is required.', 'event_espresso').'</p>';
144 144
     }
145 145
     
146 146
     /* protected function _bulk_actions_stop() {
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
     
150 150
     protected function _search_stop()
151 151
     {
152
-        return '<p>' . __('Search through questions. The following sources will be searched: Name of Question (display text).',
153
-            'event_espresso') . '</p>';
152
+        return '<p>'.__('Search through questions. The following sources will be searched: Name of Question (display text).',
153
+            'event_espresso').'</p>';
154 154
     }
155 155
     
156 156
     protected function _add_new_question_stop()
157 157
     {
158
-        return '<p>' . __('Click here to add a new question.', 'event_espresso') . '</p>';
158
+        return '<p>'.__('Click here to add a new question.', 'event_espresso').'</p>';
159 159
     }
160 160
     
161 161
 }
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
admin/extend/general_settings/Extend_General_Settings_Admin_Page.core.php 2 patches
Indentation   +49 added lines, -49 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
 /**
@@ -21,68 +21,68 @@  discard block
 block discarded – undo
21 21
 {
22 22
     
23 23
     
24
-    public function __construct($routing = true)
25
-    {
26
-        parent::__construct($routing);
27
-        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
28
-    }
24
+	public function __construct($routing = true)
25
+	{
26
+		parent::__construct($routing);
27
+		define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
28
+	}
29 29
     
30 30
     
31
-    protected function _extend_page_config()
32
-    {
31
+	protected function _extend_page_config()
32
+	{
33 33
         
34
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
34
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
35 35
         
36
-        //filters and action hooks here
37
-        add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
38
-        add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
39
-            array($this, 'update_debug_logging_options'), 10, 1);
36
+		//filters and action hooks here
37
+		add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
38
+		add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
39
+			array($this, 'update_debug_logging_options'), 10, 1);
40 40
         
41
-    }
41
+	}
42 42
     
43 43
     
44 44
     
45
-    /*************        Logging Settings        *************/
45
+	/*************        Logging Settings        *************/
46 46
     
47
-    /**
48
-     * debug_logging_options
49
-     *
50
-     * @param array $template_args
51
-     *
52
-     * @return void
53
-     */
54
-    public function debug_logging_options($template_args = array())
55
-    {
56
-        $template_args['use_full_logging']   = EE_Registry::instance()->CFG->admin->use_full_logging;
57
-        $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(EE_Registry::instance()->CFG->admin->use_remote_logging) : false;
58
-        $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
59
-        $template                            = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
60
-        EEH_Template::display_template($template, $template_args);
61
-    }
47
+	/**
48
+	 * debug_logging_options
49
+	 *
50
+	 * @param array $template_args
51
+	 *
52
+	 * @return void
53
+	 */
54
+	public function debug_logging_options($template_args = array())
55
+	{
56
+		$template_args['use_full_logging']   = EE_Registry::instance()->CFG->admin->use_full_logging;
57
+		$template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(EE_Registry::instance()->CFG->admin->use_remote_logging) : false;
58
+		$template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
59
+		$template                            = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
60
+		EEH_Template::display_template($template, $template_args);
61
+	}
62 62
     
63 63
     
64
-    /**
65
-     * update_debug_logging_options
66
-     *
67
-     * @param array $admin_options
68
-     *
69
-     * @return array
70
-     */
71
-    public function update_debug_logging_options($admin_options = array())
72
-    {
73
-        $use_full_logging                = isset($this->_req_data['use_full_logging']) ? (bool)absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging;
74
-        $admin_options->use_full_logging = $use_full_logging;
64
+	/**
65
+	 * update_debug_logging_options
66
+	 *
67
+	 * @param array $admin_options
68
+	 *
69
+	 * @return array
70
+	 */
71
+	public function update_debug_logging_options($admin_options = array())
72
+	{
73
+		$use_full_logging                = isset($this->_req_data['use_full_logging']) ? (bool)absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging;
74
+		$admin_options->use_full_logging = $use_full_logging;
75 75
         
76
-        if ($use_full_logging === false) {
77
-            EE_Error::get_notices(false);
78
-            EE_Error::reset_notices();
79
-        }
76
+		if ($use_full_logging === false) {
77
+			EE_Error::get_notices(false);
78
+			EE_Error::reset_notices();
79
+		}
80 80
         
81
-        $admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint($this->_req_data['use_remote_logging']) : $admin_options->use_remote_logging;
82
-        $admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw($this->_req_data['remote_logging_url']) : $admin_options->remote_logging_url;
81
+		$admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint($this->_req_data['use_remote_logging']) : $admin_options->use_remote_logging;
82
+		$admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw($this->_req_data['remote_logging_url']) : $admin_options->remote_logging_url;
83 83
         
84
-        return $admin_options;
85
-    }
84
+		return $admin_options;
85
+	}
86 86
     
87 87
     
88 88
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
     public function __construct($routing = true)
25 25
     {
26 26
         parent::__construct($routing);
27
-        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
27
+        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'general_settings/templates/');
28 28
     }
29 29
     
30 30
     
31 31
     protected function _extend_page_config()
32 32
     {
33 33
         
34
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
34
+        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'general_settings';
35 35
         
36 36
         //filters and action hooks here
37 37
         add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $template_args['use_full_logging']   = EE_Registry::instance()->CFG->admin->use_full_logging;
57 57
         $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(EE_Registry::instance()->CFG->admin->use_remote_logging) : false;
58 58
         $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url) ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
59
-        $template                            = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
59
+        $template                            = GEN_SET_CAF_TEMPLATE_PATH.'debug_log_settings.template.php';
60 60
         EEH_Template::display_template($template, $template_args);
61 61
     }
62 62
     
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function update_debug_logging_options($admin_options = array())
72 72
     {
73
-        $use_full_logging                = isset($this->_req_data['use_full_logging']) ? (bool)absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging;
73
+        $use_full_logging                = isset($this->_req_data['use_full_logging']) ? (bool) absint($this->_req_data['use_full_logging']) : $admin_options->use_full_logging;
74 74
         $admin_options->use_full_logging = $use_full_logging;
75 75
         
76 76
         if ($use_full_logging === false) {
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_2_0.dms.php 2 patches
Indentation   +158 added lines, -158 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,64 +32,64 @@  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 = __("Data Migration to Event Espresso 4.2.0.P", "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 = __("Data Migration to Event Espresso 4.2.0.P", "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 pretty_name()
74
-    {
75
-        return __("Core Data Migration to version 4.2.0", "event_espresso");
76
-    }
73
+	public function pretty_name()
74
+	{
75
+		return __("Core Data Migration to version 4.2.0", "event_espresso");
76
+	}
77 77
 
78 78
 
79 79
 
80
-    public function schema_changes_before_migration()
81
-    {
82
-        //relies on 4.1's EEH_Activation::create_table
83
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
84
-        $table_name = 'esp_answer';
85
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
80
+	public function schema_changes_before_migration()
81
+	{
82
+		//relies on 4.1's EEH_Activation::create_table
83
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
84
+		$table_name = 'esp_answer';
85
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
86 86
 					REG_ID INT UNSIGNED NOT NULL,
87 87
 					QST_ID INT UNSIGNED NOT NULL,
88 88
 					ANS_value TEXT NOT NULL,
89 89
 					PRIMARY KEY  (ANS_ID)";
90
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
91
-        $table_name = 'esp_attendee_meta';
92
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
90
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
91
+		$table_name = 'esp_attendee_meta';
92
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
93 93
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
94 94
 						ATT_fname VARCHAR(45) NOT NULL,
95 95
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 								KEY ATT_fname (ATT_fname),
106 106
 								KEY ATT_lname (ATT_lname),
107 107
 								KEY ATT_email (ATT_email)";
108
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
109
-        $table_name = 'esp_country';
110
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
108
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
109
+		$table_name = 'esp_country';
110
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
111 111
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
112 112
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
113 113
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
124 124
 					  CNT_active TINYINT(1) DEFAULT '0',
125 125
 					  PRIMARY KEY  (CNT_ISO)";
126
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
127
-        $table_name = 'esp_datetime';
128
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
126
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
127
+		$table_name = 'esp_datetime';
128
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
129 129
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
130 130
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
131 131
 				  DTT_description TEXT NOT NULL,
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
 						PRIMARY KEY  (DTT_ID),
141 141
 						KEY EVT_ID (EVT_ID),
142 142
 						KEY DTT_is_primary (DTT_is_primary)";
143
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
144
-        $table_name = 'esp_event_meta';
145
-        $sql = "
143
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
144
+		$table_name = 'esp_event_meta';
145
+		$sql = "
146 146
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
147 147
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
148 148
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -157,31 +157,31 @@  discard block
 block discarded – undo
157 157
 			EVT_external_URL VARCHAR(200) NULL,
158 158
 			EVT_donations TINYINT(1) NULL,
159 159
 			PRIMARY KEY  (EVTM_ID)";
160
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
161
-        $table_name = 'esp_event_question_group';
162
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
160
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
161
+		$table_name = 'esp_event_question_group';
162
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
163 163
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
164 164
 					QSG_ID INT UNSIGNED NOT NULL,
165 165
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
166 166
 					PRIMARY KEY  (EQG_ID)";
167
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
168
-        $table_name = 'esp_event_venue';
169
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
167
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
168
+		$table_name = 'esp_event_venue';
169
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
170 170
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
171 171
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
172 172
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
173 173
 				PRIMARY KEY  (EVV_ID)";
174
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
175
-        $table_name = 'esp_extra_meta';
176
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
174
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
175
+		$table_name = 'esp_extra_meta';
176
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
177 177
 				OBJ_ID INT(11) DEFAULT NULL,
178 178
 				EXM_type VARCHAR(45) DEFAULT NULL,
179 179
 				EXM_key VARCHAR(45) DEFAULT NULL,
180 180
 				EXM_value TEXT,
181 181
 				PRIMARY KEY  (EXM_ID)";
182
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
183
-        $table_name = 'esp_line_item';
184
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
182
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
183
+		$table_name = 'esp_line_item';
184
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
185 185
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
186 186
 				TXN_ID INT(11) DEFAULT NULL,
187 187
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -197,18 +197,18 @@  discard block
 block discarded – undo
197 197
 				OBJ_ID INT(11) DEFAULT NULL,
198 198
 				OBJ_type VARCHAR(45)DEFAULT NULL,
199 199
 				PRIMARY KEY  (LIN_ID)";
200
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
201
-        $table_name = 'esp_message_template';
202
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
200
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
201
+		$table_name = 'esp_message_template';
202
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
203 203
 					GRP_ID INT(10) UNSIGNED NOT NULL,
204 204
 					MTP_context VARCHAR(50) NOT NULL,
205 205
 					MTP_template_field VARCHAR(30) NOT NULL,
206 206
 					MTP_content TEXT NOT NULL,
207 207
 					PRIMARY KEY  (MTP_ID),
208 208
 					KEY GRP_ID (GRP_ID)";
209
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
210
-        $table_name = 'esp_message_template_group';
211
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
209
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
210
+		$table_name = 'esp_message_template_group';
211
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
212 212
 					EVT_ID BIGINT(20) UNSIGNED DEFAULT NULL,
213 213
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
214 214
 					MTP_messenger VARCHAR(30) NOT NULL,
@@ -220,9 +220,9 @@  discard block
 block discarded – undo
220 220
 					PRIMARY KEY  (GRP_ID),
221 221
 					KEY EVT_ID (EVT_ID),
222 222
 					KEY MTP_user_id (MTP_user_id)";
223
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
224
-        $table_name = 'esp_payment';
225
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
223
+		$this->_table_should_exist_previously($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,
@@ -259,28 +259,28 @@  discard block
 block discarded – undo
259 259
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
260 260
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
261 261
 					  PRIMARY KEY  (TKT_ID)";
262
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
263
-        $table_name = "esp_ticket_price";
264
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
262
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
263
+		$table_name = "esp_ticket_price";
264
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
265 265
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
266 266
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
267 267
 					  PRIMARY KEY  (TKP_ID)";
268
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
269
-        $table_name = "esp_datetime_ticket";
270
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
268
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
269
+		$table_name = "esp_datetime_ticket";
270
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
271 271
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
272 272
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
273 273
 					  PRIMARY KEY  (DTK_ID)";
274
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
275
-        $table_name = "esp_ticket_template";
276
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
274
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
275
+		$table_name = "esp_ticket_template";
276
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
277 277
 					  TTM_name VARCHAR(45) NOT NULL,
278 278
 					  TTM_description TEXT,
279 279
 					  TTM_file VARCHAR(45),
280 280
 					  PRIMARY KEY  (TTM_ID)";
281
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
282
-        $table_name = "esp_price";
283
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
281
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
282
+		$table_name = "esp_price";
283
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
284 284
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
285 285
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
286 286
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -291,9 +291,9 @@  discard block
 block discarded – undo
291 291
 					  PRC_order TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
292 292
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
293 293
 					  PRIMARY KEY  (PRC_ID)";
294
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
295
-        $table_name = "esp_price_type";
296
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
294
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
295
+		$table_name = "esp_price_type";
296
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
297 297
 				  PRT_name VARCHAR(45) NOT NULL,
298 298
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
299 299
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -301,9 +301,9 @@  discard block
 block discarded – undo
301 301
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
302 302
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
303 303
 				  PRIMARY KEY  (PRT_ID)";
304
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
305
-        $table_name = 'esp_question';
306
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
304
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
305
+		$table_name = 'esp_question';
306
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
307 307
 					QST_display_text TEXT NOT NULL,
308 308
 					QST_admin_label VARCHAR(255) NOT NULL,
309 309
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -315,10 +315,10 @@  discard block
 block discarded – undo
315 315
 					QST_wp_user BIGINT UNSIGNED NULL,
316 316
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
317 317
 					PRIMARY KEY  (QST_ID)';
318
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
319
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
320
-        $table_name = 'esp_question_group';
321
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
318
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
319
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
320
+		$table_name = 'esp_question_group';
321
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
322 322
 					QSG_name VARCHAR(255) NOT NULL,
323 323
 					QSG_identifier VARCHAR(100) NOT NULL,
324 324
 					QSG_desc TEXT NULL,
@@ -329,24 +329,24 @@  discard block
 block discarded – undo
329 329
 					QSG_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
330 330
 					PRIMARY KEY  (QSG_ID),
331 331
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
332
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
333
-        $table_name = 'esp_question_group_question';
334
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
332
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
333
+		$table_name = 'esp_question_group_question';
334
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
335 335
 					QSG_ID INT UNSIGNED NOT NULL,
336 336
 					QST_ID INT UNSIGNED NOT NULL,
337 337
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
338 338
 					PRIMARY KEY  (QGQ_ID) ";
339
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
340
-        $table_name = 'esp_question_option';
341
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
339
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
340
+		$table_name = 'esp_question_option';
341
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
342 342
 					QSO_value VARCHAR(255) NOT NULL,
343 343
 					QSO_desc TEXT NOT NULL,
344 344
 					QST_ID INT UNSIGNED NOT NULL,
345 345
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
346 346
 					PRIMARY KEY  (QSO_ID)";
347
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
348
-        $table_name = 'esp_registration';
349
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
347
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
348
+		$table_name = 'esp_registration';
349
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
350 350
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
351 351
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
352 352
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -369,25 +369,25 @@  discard block
 block discarded – undo
369 369
 					  KEY STS_ID (STS_ID),
370 370
 					  KEY REG_url_link (REG_url_link),
371 371
 					  KEY REG_code (REG_code)";
372
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
373
-        $table_name = 'esp_checkin';
374
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
372
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
373
+		$table_name = 'esp_checkin';
374
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
375 375
 					REG_ID INT(10) UNSIGNED NOT NULL,
376 376
 					DTT_ID INT(10) UNSIGNED NOT NULL,
377 377
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
378 378
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
379 379
 					PRIMARY KEY  (CHK_ID)";
380
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
381
-        $table_name = 'esp_state';
382
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
380
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
381
+		$table_name = 'esp_state';
382
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
383 383
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
384 384
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
385 385
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
386 386
 					  STA_active TINYINT(1) DEFAULT '1',
387 387
 					  PRIMARY KEY  (STA_ID)";
388
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
389
-        $table_name = 'esp_status';
390
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
388
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
389
+		$table_name = 'esp_status';
390
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
391 391
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
392 392
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
393 393
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -395,9 +395,9 @@  discard block
 block discarded – undo
395 395
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
396 396
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
397 397
 					  KEY STS_type (STS_type)";
398
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
399
-        $table_name = 'esp_transaction';
400
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
398
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
399
+		$table_name = 'esp_transaction';
400
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
401 401
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
402 402
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
403 403
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -407,9 +407,9 @@  discard block
 block discarded – undo
407 407
 					  PRIMARY KEY  (TXN_ID),
408 408
 					  KEY TXN_timestamp (TXN_timestamp),
409 409
 					  KEY STS_ID (STS_ID)";
410
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
411
-        $table_name = 'esp_venue_meta';
412
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
410
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
411
+		$table_name = 'esp_venue_meta';
412
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
413 413
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
414 414
 			VNU_address VARCHAR(255) DEFAULT NULL,
415 415
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -427,38 +427,38 @@  discard block
 block discarded – undo
427 427
 			PRIMARY KEY  (VNUM_ID),
428 428
 			KEY STA_ID (STA_ID),
429 429
 			KEY CNT_ISO (CNT_ISO)";
430
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
431
-        $script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
432
-        //setting up the DEFAULT stats and countries is also essential for the data migrations to run
433
-        //(because many need to convert old string states to foreign keys into the states table)
434
-        $script_with_defaults->insert_default_states();
435
-        $script_with_defaults->insert_default_countries();
436
-        //setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
437
-        $script_with_defaults->insert_default_price_types();
438
-        $script_with_defaults->insert_default_prices();
439
-        $script_with_defaults->insert_default_tickets();
440
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
441
-        EE_Config::instance()->update_espresso_config(false, true);
442
-        return true;
443
-    }
444
-
445
-
446
-
447
-    /**
448
-     * We COULD clean up the esp_question.QST_order field here. We'll leave it for now
449
-     *
450
-     * @return boolean
451
-     */
452
-    public function schema_changes_after_migration()
453
-    {
454
-        return true;
455
-    }
456
-
457
-
458
-
459
-    public function migration_page_hooks()
460
-    {
461
-    }
430
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
431
+		$script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
432
+		//setting up the DEFAULT stats and countries is also essential for the data migrations to run
433
+		//(because many need to convert old string states to foreign keys into the states table)
434
+		$script_with_defaults->insert_default_states();
435
+		$script_with_defaults->insert_default_countries();
436
+		//setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
437
+		$script_with_defaults->insert_default_price_types();
438
+		$script_with_defaults->insert_default_prices();
439
+		$script_with_defaults->insert_default_tickets();
440
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
441
+		EE_Config::instance()->update_espresso_config(false, true);
442
+		return true;
443
+	}
444
+
445
+
446
+
447
+	/**
448
+	 * We COULD clean up the esp_question.QST_order field here. We'll leave it for now
449
+	 *
450
+	 * @return boolean
451
+	 */
452
+	public function schema_changes_after_migration()
453
+	{
454
+		return true;
455
+	}
456
+
457
+
458
+
459
+	public function migration_page_hooks()
460
+	{
461
+	}
462 462
 }
463 463
 
464 464
 
Please login to merge, or discard this patch.
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.
core/data_migration_scripts/EE_DMS_Core_4_3_0.dms.php 2 patches
Indentation   +198 added lines, -198 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,64 +31,64 @@  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 Migration to Event Espresso 4.3.0.P", "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
-            new EE_DMS_4_3_0_critical_page_shortcode_tracking(),
48
-        );
49
-        parent::__construct($table_manager, $table_analysis);
50
-    }
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 Migration to Event Espresso 4.3.0.P", "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
+			new EE_DMS_4_3_0_critical_page_shortcode_tracking(),
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.3.0', '<=') && version_compare($version_string, '4.2.0', '>=')) {
54
+	public function can_migrate_from_version($version_array)
55
+	{
56
+		$version_string = $version_array['Core'];
57
+		if (version_compare($version_string, '4.3.0', '<=') && version_compare($version_string, '4.2.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.2
63
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
64
-        } else {
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
64
+		} else {
65 65
 //			echo "$version_string doesnt apply";
66
-            return false;
67
-        }
68
-    }
66
+			return false;
67
+		}
68
+	}
69 69
 
70 70
 
71 71
 
72
-    public function pretty_name()
73
-    {
74
-        return __("Core Data Migration to version 4.3.0", "event_espresso");
75
-    }
72
+	public function pretty_name()
73
+	{
74
+		return __("Core Data Migration to version 4.3.0", "event_espresso");
75
+	}
76 76
 
77 77
 
78 78
 
79
-    public function schema_changes_before_migration()
80
-    {
81
-        //relies on 4.1's EEH_Activation::create_table
82
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
83
-        $table_name = 'esp_answer';
84
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
79
+	public function schema_changes_before_migration()
80
+	{
81
+		//relies on 4.1's EEH_Activation::create_table
82
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
83
+		$table_name = 'esp_answer';
84
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
85 85
 					REG_ID INT UNSIGNED NOT NULL,
86 86
 					QST_ID INT UNSIGNED NOT NULL,
87 87
 					ANS_value TEXT NOT NULL,
88 88
 					PRIMARY KEY  (ANS_ID)";
89
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
90
-        $table_name = 'esp_attendee_meta';
91
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
89
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
90
+		$table_name = 'esp_attendee_meta';
91
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
92 92
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
93 93
 						ATT_fname VARCHAR(45) NOT NULL,
94 94
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 								KEY ATT_fname (ATT_fname),
105 105
 								KEY ATT_lname (ATT_lname),
106 106
 								KEY ATT_email (ATT_email)";
107
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
108
-        $table_name = 'esp_country';
109
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
107
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
108
+		$table_name = 'esp_country';
109
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
110 110
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
111 111
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
112 112
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
123 123
 					  CNT_active TINYINT(1) DEFAULT '0',
124 124
 					  PRIMARY KEY  (CNT_ISO)";
125
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
126
-        $table_name = 'esp_datetime';
127
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
125
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
126
+		$table_name = 'esp_datetime';
127
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
128 128
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
129 129
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
130 130
 				  DTT_description TEXT NOT NULL,
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 						PRIMARY KEY  (DTT_ID),
140 140
 						KEY EVT_ID (EVT_ID),
141 141
 						KEY DTT_is_primary (DTT_is_primary)";
142
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
143
-        $table_name = 'esp_event_meta';
144
-        $sql = "
142
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
143
+		$table_name = 'esp_event_meta';
144
+		$sql = "
145 145
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
146 146
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
147 147
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -156,31 +156,31 @@  discard block
 block discarded – undo
156 156
 			EVT_external_URL VARCHAR(200) NULL,
157 157
 			EVT_donations TINYINT(1) NULL,
158 158
 			PRIMARY KEY  (EVTM_ID)";
159
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
160
-        $table_name = 'esp_event_question_group';
161
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
159
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
160
+		$table_name = 'esp_event_question_group';
161
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
162 162
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
163 163
 					QSG_ID INT UNSIGNED NOT NULL,
164 164
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
165 165
 					PRIMARY KEY  (EQG_ID)";
166
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
167
-        $table_name = 'esp_event_venue';
168
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
166
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
167
+		$table_name = 'esp_event_venue';
168
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
169 169
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
170 170
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
171 171
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
172 172
 				PRIMARY KEY  (EVV_ID)";
173
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
174
-        $table_name = 'esp_extra_meta';
175
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
173
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
174
+		$table_name = 'esp_extra_meta';
175
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
176 176
 				OBJ_ID INT(11) DEFAULT NULL,
177 177
 				EXM_type VARCHAR(45) DEFAULT NULL,
178 178
 				EXM_key VARCHAR(45) DEFAULT NULL,
179 179
 				EXM_value TEXT,
180 180
 				PRIMARY KEY  (EXM_ID)";
181
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
182
-        $table_name = 'esp_line_item';
183
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
181
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
182
+		$table_name = 'esp_line_item';
183
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
184 184
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
185 185
 				TXN_ID INT(11) DEFAULT NULL,
186 186
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -196,19 +196,19 @@  discard block
 block discarded – undo
196 196
 				OBJ_ID INT(11) DEFAULT NULL,
197 197
 				OBJ_type VARCHAR(45)DEFAULT NULL,
198 198
 				PRIMARY KEY  (LIN_ID)";
199
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
200
-        $table_name = 'esp_message_template';
201
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
199
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
200
+		$table_name = 'esp_message_template';
201
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
202 202
 					GRP_ID INT(10) UNSIGNED NOT NULL,
203 203
 					MTP_context VARCHAR(50) NOT NULL,
204 204
 					MTP_template_field VARCHAR(30) NOT NULL,
205 205
 					MTP_content TEXT NOT NULL,
206 206
 					PRIMARY KEY  (MTP_ID),
207 207
 					KEY GRP_ID (GRP_ID)";
208
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
209
-        $this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
210
-        $table_name = 'esp_message_template_group';
211
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
208
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
209
+		$this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
210
+		$table_name = 'esp_message_template_group';
211
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
212 212
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
213 213
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
214 214
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -220,17 +220,17 @@  discard block
 block discarded – undo
220 220
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
221 221
 					PRIMARY KEY  (GRP_ID),
222 222
 					KEY MTP_user_id (MTP_user_id)";
223
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
224
-        $table_name = 'esp_event_message_template';
225
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
223
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
224
+		$table_name = 'esp_event_message_template';
225
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
226 226
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
227 227
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
228 228
 					PRIMARY KEY  (EMT_ID),
229 229
 					KEY EVT_ID (EVT_ID),
230 230
 					KEY GRP_ID (GRP_ID)";
231
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
232
-        $table_name = 'esp_payment';
233
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
231
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
232
+		$table_name = 'esp_payment';
233
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
234 234
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
235 235
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
236 236
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
 					PRIMARY KEY  (PAY_ID),
247 247
 					KEY TXN_ID (TXN_ID),
248 248
 					KEY PAY_timestamp (PAY_timestamp)";
249
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
250
-        $table_name = "esp_ticket";
251
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
249
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
250
+		$table_name = "esp_ticket";
251
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
252 252
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
253 253
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
254 254
 					  TKT_description TEXT NOT NULL,
@@ -268,28 +268,28 @@  discard block
 block discarded – undo
268 268
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
269 269
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
270 270
 					  PRIMARY KEY  (TKT_ID)";
271
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
272
-        $table_name = "esp_ticket_price";
273
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
271
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
272
+		$table_name = "esp_ticket_price";
273
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
274 274
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
275 275
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
276 276
 					  PRIMARY KEY  (TKP_ID)";
277
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
278
-        $table_name = "esp_datetime_ticket";
279
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
277
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
278
+		$table_name = "esp_datetime_ticket";
279
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
280 280
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
281 281
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
282 282
 					  PRIMARY KEY  (DTK_ID)";
283
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
284
-        $table_name = "esp_ticket_template";
285
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
283
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
284
+		$table_name = "esp_ticket_template";
285
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
286 286
 					  TTM_name VARCHAR(45) NOT NULL,
287 287
 					  TTM_description TEXT,
288 288
 					  TTM_file VARCHAR(45),
289 289
 					  PRIMARY KEY  (TTM_ID)";
290
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
291
-        $table_name = "esp_price";
292
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
290
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
291
+		$table_name = "esp_price";
292
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
293 293
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
294 294
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
295 295
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
 					  PRC_order TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
301 301
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
302 302
 					  PRIMARY KEY  (PRC_ID)";
303
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
304
-        $table_name = "esp_price_type";
305
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
303
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
304
+		$table_name = "esp_price_type";
305
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
306 306
 				  PRT_name VARCHAR(45) NOT NULL,
307 307
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
308 308
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -310,9 +310,9 @@  discard block
 block discarded – undo
310 310
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
311 311
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
312 312
 				  PRIMARY KEY  (PRT_ID)";
313
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
314
-        $table_name = 'esp_question';
315
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
313
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
314
+		$table_name = 'esp_question';
315
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
316 316
 					QST_display_text TEXT NOT NULL,
317 317
 					QST_admin_label VARCHAR(255) NOT NULL,
318 318
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
 					QST_wp_user BIGINT UNSIGNED NULL,
325 325
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
326 326
 					PRIMARY KEY  (QST_ID)';
327
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
328
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
329
-        $table_name = 'esp_question_group';
330
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
327
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
328
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
329
+		$table_name = 'esp_question_group';
330
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
331 331
 					QSG_name VARCHAR(255) NOT NULL,
332 332
 					QSG_identifier VARCHAR(100) NOT NULL,
333 333
 					QSG_desc TEXT NULL,
@@ -338,25 +338,25 @@  discard block
 block discarded – undo
338 338
 					QSG_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
339 339
 					PRIMARY KEY  (QSG_ID),
340 340
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
341
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
342
-        $table_name = 'esp_question_group_question';
343
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
341
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
342
+		$table_name = 'esp_question_group_question';
343
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
344 344
 					QSG_ID INT UNSIGNED NOT NULL,
345 345
 					QST_ID INT UNSIGNED NOT NULL,
346 346
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
347 347
 					PRIMARY KEY  (QGQ_ID) ";
348
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
349
-        $table_name = 'esp_question_option';
350
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
348
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
349
+		$table_name = 'esp_question_option';
350
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
351 351
 					QSO_value VARCHAR(255) NOT NULL,
352 352
 					QSO_desc TEXT NOT NULL,
353 353
 					QST_ID INT UNSIGNED NOT NULL,
354 354
 					QSO_order INT UNSIGNED NOT NULL DEFAULT 0,
355 355
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
356 356
 					PRIMARY KEY  (QSO_ID)";
357
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
358
-        $table_name = 'esp_registration';
359
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
357
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
358
+		$table_name = 'esp_registration';
359
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
360 360
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
361 361
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
362 362
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -379,25 +379,25 @@  discard block
 block discarded – undo
379 379
 					  KEY STS_ID (STS_ID),
380 380
 					  KEY REG_url_link (REG_url_link),
381 381
 					  KEY REG_code (REG_code)";
382
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
383
-        $table_name = 'esp_checkin';
384
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
382
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
383
+		$table_name = 'esp_checkin';
384
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
385 385
 					REG_ID INT(10) UNSIGNED NOT NULL,
386 386
 					DTT_ID INT(10) UNSIGNED NOT NULL,
387 387
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
388 388
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
389 389
 					PRIMARY KEY  (CHK_ID)";
390
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
391
-        $table_name = 'esp_state';
392
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
390
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
391
+		$table_name = 'esp_state';
392
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
393 393
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
394 394
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
395 395
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
396 396
 					  STA_active TINYINT(1) DEFAULT '1',
397 397
 					  PRIMARY KEY  (STA_ID)";
398
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
399
-        $table_name = 'esp_status';
400
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
398
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
399
+		$table_name = 'esp_status';
400
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
401 401
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
402 402
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
403 403
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -405,9 +405,9 @@  discard block
 block discarded – undo
405 405
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
406 406
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
407 407
 					  KEY STS_type (STS_type)";
408
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
409
-        $table_name = 'esp_transaction';
410
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
408
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
409
+		$table_name = 'esp_transaction';
410
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
411 411
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
412 412
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
413 413
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
 					  PRIMARY KEY  (TXN_ID),
418 418
 					  KEY TXN_timestamp (TXN_timestamp),
419 419
 					  KEY STS_ID (STS_ID)";
420
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
421
-        $table_name = 'esp_venue_meta';
422
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
420
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
421
+		$table_name = 'esp_venue_meta';
422
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
423 423
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
424 424
 			VNU_address VARCHAR(255) DEFAULT NULL,
425 425
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -437,79 +437,79 @@  discard block
 block discarded – undo
437 437
 			PRIMARY KEY  (VNUM_ID),
438 438
 			KEY STA_ID (STA_ID),
439 439
 			KEY CNT_ISO (CNT_ISO)";
440
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
441
-        $script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
442
-        //setting up the DEFAULT stats and countries is also essential for the data migrations to run
443
-        //(because many need to convert old string states to foreign keys into the states table)
444
-        $script_with_defaults->insert_default_states();
445
-        $script_with_defaults->insert_default_countries();
446
-        //setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
447
-        $script_with_defaults->insert_default_price_types();
448
-        $script_with_defaults->insert_default_prices();
449
-        //but the schema on the tickets table has changed since 4.1, so use our DEFAULT ticket method instead of 4.1's
450
-        $this->insert_default_tickets();
451
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
452
-        EE_Config::instance()->update_espresso_config(false, true);
453
-        return true;
454
-    }
455
-
456
-
457
-
458
-    /**
459
-     * @return boolean
460
-     */
461
-    public function schema_changes_after_migration()
462
-    {
463
-        return true;
464
-    }
465
-
466
-
467
-
468
-    public function migration_page_hooks()
469
-    {
470
-    }
471
-
472
-
473
-
474
-    /**
475
-     * insert DEFAULT ticket
476
-     * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field
477
-     *
478
-     * @access public
479
-     * @static
480
-     * @return void
481
-     */
482
-    public function insert_default_tickets()
483
-    {
484
-        global $wpdb;
485
-        $ticket_table = $wpdb->prefix . "esp_ticket";
486
-        if ($this->_get_table_analysis()->tableExists($ticket_table)) {
487
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
488
-            $tickets_exist = $wpdb->get_var($SQL);
489
-            if ( ! $tickets_exist) {
490
-                $SQL = "INSERT INTO $ticket_table
440
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
441
+		$script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
442
+		//setting up the DEFAULT stats and countries is also essential for the data migrations to run
443
+		//(because many need to convert old string states to foreign keys into the states table)
444
+		$script_with_defaults->insert_default_states();
445
+		$script_with_defaults->insert_default_countries();
446
+		//setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
447
+		$script_with_defaults->insert_default_price_types();
448
+		$script_with_defaults->insert_default_prices();
449
+		//but the schema on the tickets table has changed since 4.1, so use our DEFAULT ticket method instead of 4.1's
450
+		$this->insert_default_tickets();
451
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
452
+		EE_Config::instance()->update_espresso_config(false, true);
453
+		return true;
454
+	}
455
+
456
+
457
+
458
+	/**
459
+	 * @return boolean
460
+	 */
461
+	public function schema_changes_after_migration()
462
+	{
463
+		return true;
464
+	}
465
+
466
+
467
+
468
+	public function migration_page_hooks()
469
+	{
470
+	}
471
+
472
+
473
+
474
+	/**
475
+	 * insert DEFAULT ticket
476
+	 * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field
477
+	 *
478
+	 * @access public
479
+	 * @static
480
+	 * @return void
481
+	 */
482
+	public function insert_default_tickets()
483
+	{
484
+		global $wpdb;
485
+		$ticket_table = $wpdb->prefix . "esp_ticket";
486
+		if ($this->_get_table_analysis()->tableExists($ticket_table)) {
487
+			$SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
488
+			$tickets_exist = $wpdb->get_var($SQL);
489
+			if ( ! $tickets_exist) {
490
+				$SQL = "INSERT INTO $ticket_table
491 491
 					( 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
492 492
 					( 1, 0, '"
493
-                       . __("Free Ticket", "event_espresso")
494
-                       . "', '', 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);";
495
-                $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL);
496
-                $wpdb->query($SQL);
497
-            }
498
-        }
499
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
500
-        if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
501
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
502
-            $ticket_prc_exist = $wpdb->get_var($SQL);
503
-            if ( ! $ticket_prc_exist) {
504
-                $SQL = "INSERT INTO $ticket_price_table
493
+					   . __("Free Ticket", "event_espresso")
494
+					   . "', '', 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);";
495
+				$SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL);
496
+				$wpdb->query($SQL);
497
+			}
498
+		}
499
+		$ticket_price_table = $wpdb->prefix . "esp_ticket_price";
500
+		if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
501
+			$SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
502
+			$ticket_prc_exist = $wpdb->get_var($SQL);
503
+			if ( ! $ticket_prc_exist) {
504
+				$SQL = "INSERT INTO $ticket_price_table
505 505
 				( TKP_ID, TKT_ID, PRC_ID ) VALUES
506 506
 				( 1, 1, 1 )
507 507
 				";
508
-                $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL);
509
-                $wpdb->query($SQL);
510
-            }
511
-        }
512
-    }
508
+				$SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL);
509
+				$wpdb->query($SQL);
510
+			}
511
+		}
512
+	}
513 513
 
514 514
 }
515 515
 
Please login to merge, or discard this patch.
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.
core/data_migration_scripts/EE_DMS_Core_4_6_0.dms.php 2 patches
Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 $stages = glob(EE_CORE . 'data_migration_scripts/4_6_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 foreach ($stages as $filepath) {
17
-    $matches = array();
18
-    preg_match('~4_6_0_stages/(.*).dmsstage.php~', $filepath, $matches);
19
-    $class_to_filepath[$matches[1]] = $filepath;
17
+	$matches = array();
18
+	preg_match('~4_6_0_stages/(.*).dmsstage.php~', $filepath, $matches);
19
+	$class_to_filepath[$matches[1]] = $filepath;
20 20
 }
21 21
 //give addons a chance to autoload their stages too
22 22
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_6_0__autoloaded_stages', $class_to_filepath);
@@ -35,80 +35,80 @@  discard block
 block discarded – undo
35 35
 class EE_DMS_Core_4_6_0 extends EE_Data_Migration_Script_Base
36 36
 {
37 37
 
38
-    /**
39
-     * return EE_DMS_Core_4_6_0
40
-     *
41
-     * @param TableManager  $table_manager
42
-     * @param TableAnalysis $table_analysis
43
-     */
44
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
45
-    {
46
-        $this->_pretty_name = __("Data Migration to Event Espresso 4.6.0.P", "event_espresso");
47
-        $this->_priority = 10;
48
-        $this->_migration_stages = array(
49
-            new EE_DMS_4_6_0_gateways(),
50
-            new EE_DMS_4_6_0_payment_method_currencies(),
51
-            new EE_DMS_4_6_0_question_types(),
52
-            new EE_DMS_4_6_0_country_system_question(),
53
-            new EE_DMS_4_6_0_state_system_question(),
54
-            new EE_DMS_4_6_0_billing_info(),
55
-            new EE_DMS_4_6_0_transactions(),
56
-            new EE_DMS_4_6_0_payments(),
57
-            new EE_DMS_4_6_0_invoice_settings(),
58
-        );
59
-        parent::__construct($table_manager, $table_analysis);
60
-    }
61
-
62
-
63
-
64
-    /**
65
-     * @param array $version_array
66
-     * @return bool
67
-     */
68
-    public function can_migrate_from_version($version_array)
69
-    {
70
-        $version_string = $version_array['Core'];
71
-        if (version_compare($version_string, '4.6.0', '<=') && version_compare($version_string, '4.5.0', '>=')) {
38
+	/**
39
+	 * return EE_DMS_Core_4_6_0
40
+	 *
41
+	 * @param TableManager  $table_manager
42
+	 * @param TableAnalysis $table_analysis
43
+	 */
44
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
45
+	{
46
+		$this->_pretty_name = __("Data Migration to Event Espresso 4.6.0.P", "event_espresso");
47
+		$this->_priority = 10;
48
+		$this->_migration_stages = array(
49
+			new EE_DMS_4_6_0_gateways(),
50
+			new EE_DMS_4_6_0_payment_method_currencies(),
51
+			new EE_DMS_4_6_0_question_types(),
52
+			new EE_DMS_4_6_0_country_system_question(),
53
+			new EE_DMS_4_6_0_state_system_question(),
54
+			new EE_DMS_4_6_0_billing_info(),
55
+			new EE_DMS_4_6_0_transactions(),
56
+			new EE_DMS_4_6_0_payments(),
57
+			new EE_DMS_4_6_0_invoice_settings(),
58
+		);
59
+		parent::__construct($table_manager, $table_analysis);
60
+	}
61
+
62
+
63
+
64
+	/**
65
+	 * @param array $version_array
66
+	 * @return bool
67
+	 */
68
+	public function can_migrate_from_version($version_array)
69
+	{
70
+		$version_string = $version_array['Core'];
71
+		if (version_compare($version_string, '4.6.0', '<=') && version_compare($version_string, '4.5.0', '>=')) {
72 72
 //			echo "$version_string can be migrated from";
73
-            return true;
74
-        } elseif ( ! $version_string) {
73
+			return true;
74
+		} elseif ( ! $version_string) {
75 75
 //			echo "no version string provided: $version_string";
76
-            //no version string provided... this must be pre 4.3
77
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
78
-        } else {
76
+			//no version string provided... this must be pre 4.3
77
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
78
+		} else {
79 79
 //			echo "$version_string doesnt apply";
80
-            return false;
81
-        }
82
-    }
80
+			return false;
81
+		}
82
+	}
83 83
 
84 84
 
85 85
 
86
-    /**
87
-     * @return string|void
88
-     */
89
-    public function pretty_name()
90
-    {
91
-        return __("Core Data Migration to version 4.6.0", "event_espresso");
92
-    }
86
+	/**
87
+	 * @return string|void
88
+	 */
89
+	public function pretty_name()
90
+	{
91
+		return __("Core Data Migration to version 4.6.0", "event_espresso");
92
+	}
93 93
 
94 94
 
95 95
 
96
-    /**
97
-     * @return bool
98
-     */
99
-    public function schema_changes_before_migration()
100
-    {
101
-        //relies on 4.1's EEH_Activation::create_table
102
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
103
-        $table_name = 'esp_answer';
104
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
96
+	/**
97
+	 * @return bool
98
+	 */
99
+	public function schema_changes_before_migration()
100
+	{
101
+		//relies on 4.1's EEH_Activation::create_table
102
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
103
+		$table_name = 'esp_answer';
104
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
105 105
 					REG_ID INT UNSIGNED NOT NULL,
106 106
 					QST_ID INT UNSIGNED NOT NULL,
107 107
 					ANS_value TEXT NOT NULL,
108 108
 					PRIMARY KEY  (ANS_ID)";
109
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
110
-        $table_name = 'esp_attendee_meta';
111
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
109
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
110
+		$table_name = 'esp_attendee_meta';
111
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
112 112
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
113 113
 						ATT_fname VARCHAR(45) NOT NULL,
114 114
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 								KEY ATT_fname (ATT_fname),
125 125
 								KEY ATT_lname (ATT_lname),
126 126
 								KEY ATT_email (ATT_email)";
127
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
128
-        $table_name = 'esp_country';
129
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
127
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
128
+		$table_name = 'esp_country';
129
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
130 130
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
131 131
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
132 132
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -142,24 +142,24 @@  discard block
 block discarded – undo
142 142
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
143 143
 					  CNT_active TINYINT(1) DEFAULT '0',
144 144
 					  PRIMARY KEY  (CNT_ISO)";
145
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
146
-        $table_name = 'esp_currency';
147
-        $sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
145
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
146
+		$table_name = 'esp_currency';
147
+		$sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
148 148
 				CUR_single VARCHAR(45) COLLATE utf8_bin DEFAULT 'dollar',
149 149
 				CUR_plural VARCHAR(45) COLLATE utf8_bin DEFAULT 'dollars',
150 150
 				CUR_sign VARCHAR(45) COLLATE utf8_bin DEFAULT '$',
151 151
 				CUR_dec_plc VARCHAR(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
152 152
 				CUR_active TINYINT(1) DEFAULT '0',
153 153
 				PRIMARY KEY  (CUR_code)";
154
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
155
-        $table_name = 'esp_currency_payment_method';
156
-        $sql = "CPM_ID INT(11) NOT NULL AUTO_INCREMENT,
154
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
155
+		$table_name = 'esp_currency_payment_method';
156
+		$sql = "CPM_ID INT(11) NOT NULL AUTO_INCREMENT,
157 157
 				CUR_code  VARCHAR(6) COLLATE utf8_bin NOT NULL,
158 158
 				PMD_ID INT(11) NOT NULL,
159 159
 				PRIMARY KEY  (CPM_ID)";
160
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
161
-        $table_name = 'esp_datetime';
162
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
160
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
161
+		$table_name = 'esp_datetime';
162
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
163 163
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
164 164
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
165 165
 				  DTT_description TEXT NOT NULL,
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 						PRIMARY KEY  (DTT_ID),
175 175
 						KEY EVT_ID (EVT_ID),
176 176
 						KEY DTT_is_primary (DTT_is_primary)";
177
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
178
-        $table_name = 'esp_event_meta';
179
-        $sql = "
177
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
178
+		$table_name = 'esp_event_meta';
179
+		$sql = "
180 180
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
181 181
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
182 182
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -191,31 +191,31 @@  discard block
 block discarded – undo
191 191
 			EVT_external_URL VARCHAR(200) NULL,
192 192
 			EVT_donations TINYINT(1) NULL,
193 193
 			PRIMARY KEY  (EVTM_ID)";
194
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
195
-        $table_name = 'esp_event_question_group';
196
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
194
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
195
+		$table_name = 'esp_event_question_group';
196
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
197 197
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
198 198
 					QSG_ID INT UNSIGNED NOT NULL,
199 199
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
200 200
 					PRIMARY KEY  (EQG_ID)";
201
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
202
-        $table_name = 'esp_event_venue';
203
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
201
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
202
+		$table_name = 'esp_event_venue';
203
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
204 204
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
205 205
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
206 206
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
207 207
 				PRIMARY KEY  (EVV_ID)";
208
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
209
-        $table_name = 'esp_extra_meta';
210
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
208
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
209
+		$table_name = 'esp_extra_meta';
210
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
211 211
 				OBJ_ID INT(11) DEFAULT NULL,
212 212
 				EXM_type VARCHAR(45) DEFAULT NULL,
213 213
 				EXM_key VARCHAR(45) DEFAULT NULL,
214 214
 				EXM_value TEXT,
215 215
 				PRIMARY KEY  (EXM_ID)";
216
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
217
-        $table_name = 'esp_line_item';
218
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
216
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
217
+		$table_name = 'esp_line_item';
218
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
219 219
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
220 220
 				TXN_ID INT(11) DEFAULT NULL,
221 221
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 				OBJ_ID INT(11) DEFAULT NULL,
232 232
 				OBJ_type VARCHAR(45)DEFAULT NULL,
233 233
 				PRIMARY KEY  (LIN_ID)";
234
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
235
-        $table_name = 'esp_log';
236
-        $sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
234
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
235
+		$table_name = 'esp_log';
236
+		$sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
237 237
 				LOG_time DATETIME DEFAULT NULL,
238 238
 				OBJ_ID VARCHAR(45) DEFAULT NULL,
239 239
 				OBJ_type VARCHAR(45) DEFAULT NULL,
@@ -241,19 +241,19 @@  discard block
 block discarded – undo
241 241
 				LOG_message TEXT,
242 242
 				LOG_wp_user INT(11) DEFAULT NULL,
243 243
 				PRIMARY KEY  (LOG_ID)";
244
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
245
-        $table_name = 'esp_message_template';
246
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
244
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
245
+		$table_name = 'esp_message_template';
246
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
247 247
 					GRP_ID INT(10) UNSIGNED NOT NULL,
248 248
 					MTP_context VARCHAR(50) NOT NULL,
249 249
 					MTP_template_field VARCHAR(30) NOT NULL,
250 250
 					MTP_content TEXT NOT NULL,
251 251
 					PRIMARY KEY  (MTP_ID),
252 252
 					KEY GRP_ID (GRP_ID)";
253
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
254
-        $this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
255
-        $table_name = 'esp_message_template_group';
256
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
253
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
254
+		$this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
255
+		$table_name = 'esp_message_template_group';
256
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
257 257
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
258 258
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
259 259
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -265,17 +265,17 @@  discard block
 block discarded – undo
265 265
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
266 266
 					PRIMARY KEY  (GRP_ID),
267 267
 					KEY MTP_user_id (MTP_user_id)";
268
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
269
-        $table_name = 'esp_event_message_template';
270
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
268
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
269
+		$table_name = 'esp_event_message_template';
270
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
271 271
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
272 272
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
273 273
 					PRIMARY KEY  (EMT_ID),
274 274
 					KEY EVT_ID (EVT_ID),
275 275
 					KEY GRP_ID (GRP_ID)";
276
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
277
-        $table_name = 'esp_payment';
278
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
276
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
277
+		$table_name = 'esp_payment';
278
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
279 279
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
280 280
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
281 281
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
 					PRIMARY KEY  (PAY_ID),
293 293
 					KEY TXN_ID (TXN_ID),
294 294
 					KEY PAY_timestamp (PAY_timestamp)";
295
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
296
-        $table_name = 'esp_payment_method';
297
-        $sql = "PMD_ID INT(11) NOT NULL AUTO_INCREMENT,
295
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
296
+		$table_name = 'esp_payment_method';
297
+		$sql = "PMD_ID INT(11) NOT NULL AUTO_INCREMENT,
298 298
 				PMD_type VARCHAR(124) DEFAULT NULL,
299 299
 				PMD_name VARCHAR(255) DEFAULT NULL,
300 300
 				PMD_desc TEXT,
@@ -309,28 +309,28 @@  discard block
 block discarded – undo
309 309
 				PMD_scope VARCHAR(255) NULL DEFAULT 'frontend',
310 310
 				PRIMARY KEY  (PMD_ID),
311 311
 				UNIQUE KEY PMD_slug_UNIQUE (PMD_slug)";
312
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
313
-        $table_name = "esp_ticket_price";
314
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
312
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
313
+		$table_name = "esp_ticket_price";
314
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
315 315
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
316 316
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
317 317
 					  PRIMARY KEY  (TKP_ID)";
318
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
319
-        $table_name = "esp_datetime_ticket";
320
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
318
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
319
+		$table_name = "esp_datetime_ticket";
320
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
321 321
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
322 322
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
323 323
 					  PRIMARY KEY  (DTK_ID)";
324
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
325
-        $table_name = "esp_ticket_template";
326
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
324
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
325
+		$table_name = "esp_ticket_template";
326
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
327 327
 					  TTM_name VARCHAR(45) NOT NULL,
328 328
 					  TTM_description TEXT,
329 329
 					  TTM_file VARCHAR(45),
330 330
 					  PRIMARY KEY  (TTM_ID)";
331
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
332
-        $table_name = 'esp_question';
333
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
331
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
332
+		$table_name = 'esp_question';
333
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
334 334
 					QST_display_text TEXT NOT NULL,
335 335
 					QST_admin_label VARCHAR(255) NOT NULL,
336 336
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -342,25 +342,25 @@  discard block
 block discarded – undo
342 342
 					QST_wp_user BIGINT UNSIGNED NULL,
343 343
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
344 344
 					PRIMARY KEY  (QST_ID)';
345
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
346
-        $table_name = 'esp_question_group_question';
347
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
345
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
346
+		$table_name = 'esp_question_group_question';
347
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
348 348
 					QSG_ID INT UNSIGNED NOT NULL,
349 349
 					QST_ID INT UNSIGNED NOT NULL,
350 350
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
351 351
 					PRIMARY KEY  (QGQ_ID) ";
352
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
353
-        $table_name = 'esp_question_option';
354
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
352
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
353
+		$table_name = 'esp_question_option';
354
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
355 355
 					QSO_value VARCHAR(255) NOT NULL,
356 356
 					QSO_desc TEXT NOT NULL,
357 357
 					QST_ID INT UNSIGNED NOT NULL,
358 358
 					QSO_order INT UNSIGNED NOT NULL DEFAULT 0,
359 359
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
360 360
 					PRIMARY KEY  (QSO_ID)";
361
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
362
-        $table_name = 'esp_registration';
363
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
361
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
362
+		$table_name = 'esp_registration';
363
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
364 364
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
365 365
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
366 366
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -383,25 +383,25 @@  discard block
 block discarded – undo
383 383
 					  KEY STS_ID (STS_ID),
384 384
 					  KEY REG_url_link (REG_url_link),
385 385
 					  KEY REG_code (REG_code)";
386
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
387
-        $table_name = 'esp_checkin';
388
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
386
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
387
+		$table_name = 'esp_checkin';
388
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
389 389
 					REG_ID INT(10) UNSIGNED NOT NULL,
390 390
 					DTT_ID INT(10) UNSIGNED NOT NULL,
391 391
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
392 392
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
393 393
 					PRIMARY KEY  (CHK_ID)";
394
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
395
-        $table_name = 'esp_state';
396
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
394
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
395
+		$table_name = 'esp_state';
396
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
397 397
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
398 398
 					  STA_abbrev VARCHAR(24) COLLATE utf8_bin NOT NULL,
399 399
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
400 400
 					  STA_active TINYINT(1) DEFAULT '1',
401 401
 					  PRIMARY KEY  (STA_ID)";
402
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
403
-        $table_name = 'esp_status';
404
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
402
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
403
+		$table_name = 'esp_status';
404
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
405 405
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
406 406
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
407 407
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
410 410
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
411 411
 					  KEY STS_type (STS_type)";
412
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
413
-        $table_name = 'esp_transaction';
414
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
412
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
413
+		$table_name = 'esp_transaction';
414
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
415 415
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
416 416
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
417 417
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -423,9 +423,9 @@  discard block
 block discarded – undo
423 423
 					  PRIMARY KEY  (TXN_ID),
424 424
 					  KEY TXN_timestamp (TXN_timestamp),
425 425
 					  KEY STS_ID (STS_ID)";
426
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
427
-        $table_name = 'esp_venue_meta';
428
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
426
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
427
+		$table_name = 'esp_venue_meta';
428
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
429 429
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
430 430
 			VNU_address VARCHAR(255) DEFAULT NULL,
431 431
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -443,10 +443,10 @@  discard block
 block discarded – undo
443 443
 			PRIMARY KEY  (VNUM_ID),
444 444
 			KEY STA_ID (STA_ID),
445 445
 			KEY CNT_ISO (CNT_ISO)";
446
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
447
-        //modified tables
448
-        $table_name = "esp_price";
449
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
446
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
447
+		//modified tables
448
+		$table_name = "esp_price";
449
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
450 450
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
451 451
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
452 452
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -458,9 +458,9 @@  discard block
 block discarded – undo
458 458
 					  PRC_wp_user BIGINT UNSIGNED NULL,
459 459
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
460 460
 					  PRIMARY KEY  (PRC_ID)";
461
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
462
-        $table_name = "esp_price_type";
463
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
461
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
462
+		$table_name = "esp_price_type";
463
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
464 464
 				  PRT_name VARCHAR(45) NOT NULL,
465 465
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
466 466
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -469,9 +469,9 @@  discard block
 block discarded – undo
469 469
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
470 470
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
471 471
 				  PRIMARY KEY  (PRT_ID)";
472
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
473
-        $table_name = "esp_ticket";
474
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
472
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
473
+		$table_name = "esp_ticket";
474
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
475 475
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
476 476
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
477 477
 					  TKT_description TEXT NOT NULL,
@@ -492,10 +492,10 @@  discard block
 block discarded – undo
492 492
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
493 493
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
494 494
 					  PRIMARY KEY  (TKT_ID)";
495
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
496
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
497
-        $table_name = 'esp_question_group';
498
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
495
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
496
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
497
+		$table_name = 'esp_question_group';
498
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
499 499
 					QSG_name VARCHAR(255) NOT NULL,
500 500
 					QSG_identifier VARCHAR(100) NOT NULL,
501 501
 					QSG_desc TEXT NULL,
@@ -507,119 +507,119 @@  discard block
 block discarded – undo
507 507
 					QSG_wp_user BIGINT UNSIGNED NULL,
508 508
 					PRIMARY KEY  (QSG_ID),
509 509
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
510
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
511
-        /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
512
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
513
-        //(because many need to convert old string states to foreign keys into the states table)
514
-        $script_4_1_defaults->insert_default_states();
515
-        $script_4_1_defaults->insert_default_countries();
516
-        /** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
517
-        $script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
518
-        $script_4_5_defaults->insert_default_price_types();
519
-        $script_4_5_defaults->insert_default_prices();
520
-        $script_4_5_defaults->insert_default_tickets();
521
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen here
522
-        EE_Config::instance()->update_espresso_config(false, true);
523
-        $this->add_default_admin_only_payments();
524
-        $this->insert_default_currencies();
525
-        return true;
526
-    }
527
-
528
-
529
-
530
-    /**
531
-     * @return boolean
532
-     */
533
-    public function schema_changes_after_migration()
534
-    {
535
-        return true;
536
-    }
537
-
538
-
539
-
540
-    public function migration_page_hooks()
541
-    {
542
-    }
543
-
544
-
545
-
546
-    public function add_default_admin_only_payments()
547
-    {
548
-        global $wpdb;
549
-        $table_name = $wpdb->prefix . "esp_payment_method";
550
-        $user_id = EEH_Activation::get_default_creator_id();
551
-        if ($this->_get_table_analysis()->tableExists($table_name)) {
552
-            $SQL = "SELECT COUNT( * ) FROM $table_name";
553
-            $existing_payment_methods = $wpdb->get_var($SQL);
554
-            $default_admin_only_payment_methods = apply_filters(
555
-                'FHEE__EEH_Activation__add_default_admin_only_payments__default_admin_only_payment_methods',
556
-                array(
557
-                    __("Bank", 'event_espresso')        => __("Bank Draft", 'event_espresso'),
558
-                    __("Cash", 'event_espresso')        => __("Cash Delivered Physically", 'event_espresso'),
559
-                    __("Check", 'event_espresso')       => __("Paper Check", 'event_espresso'),
560
-                    __("Credit Card", 'event_espresso') => __("Offline Credit Card Payment", 'event_espresso'),
561
-                    __("Debit Card", 'event_espresso')  => __("Offline Debit Payment", 'event_espresso'),
562
-                    __("Invoice", 'event_espresso')     => __("Invoice received with monies included",
563
-                        'event_espresso'),
564
-                    __("Money Order", 'event_espresso') => '',
565
-                    __("Paypal", 'event_espresso')      => __("Paypal eCheck, Invoice, etc", 'event_espresso'),
566
-                    __('Other', 'event_espresso')       => __('Other method of payment', 'event_espresso'),
567
-                ));
568
-            //make sure we hae payment method records for the following
569
-            //so admins can record payments for them from the admin page
570
-            foreach ($default_admin_only_payment_methods as $nicename => $description) {
571
-                $slug = sanitize_key($nicename);
572
-                //check that such a payment method exists
573
-                $exists = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $table_name WHERE PMD_slug = %s", $slug));
574
-                if ( ! $exists) {
575
-                    $values = array(
576
-                        'PMD_type'       => 'Admin_Only',
577
-                        'PMD_name'       => $nicename,
578
-                        'PMD_admin_name' => $nicename,
579
-                        'PMD_admin_desc' => $description,
580
-                        'PMD_slug'       => $slug,
581
-                        'PMD_wp_user'    => $user_id,
582
-                        'PMD_scope'      => serialize(array('ADMIN')),
583
-                    );
584
-                    $success = $wpdb->insert(
585
-                        $table_name,
586
-                        $values,
587
-                        array(
588
-                            '%s',//PMD_type
589
-                            '%s',//PMD_name
590
-                            '%s',//PMD_admin_name
591
-                            '%s',//PMD_admin_desc
592
-                            '%s',//PMD_slug
593
-                            '%d',//PMD_wp_user
594
-                            '%s',//PMD_scope
595
-                        )
596
-                    );
597
-                    if ( ! $success) {
598
-                        $this->add_error(sprintf(__("Could not insert new admin-only payment method with values %s during migration",
599
-                            "event_espresso"), $this->_json_encode($values)));
600
-                    }
601
-                }
602
-            }
603
-        }
604
-    }
605
-
606
-
607
-
608
-    /**
609
-     * insert_default_countries
610
-     *
611
-     * @static
612
-     * @return void
613
-     */
614
-    public function insert_default_currencies()
615
-    {
616
-        global $wpdb;
617
-        $currency_table = $wpdb->prefix . "esp_currency";
618
-        if ($this->_get_table_analysis()->tableExists($currency_table)) {
619
-            $SQL = "SELECT COUNT('CUR_code') FROM $currency_table";
620
-            $countries = $wpdb->get_var($SQL);
621
-            if ( ! $countries) {
622
-                $SQL = "INSERT INTO $currency_table
510
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
511
+		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
512
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
513
+		//(because many need to convert old string states to foreign keys into the states table)
514
+		$script_4_1_defaults->insert_default_states();
515
+		$script_4_1_defaults->insert_default_countries();
516
+		/** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
517
+		$script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
518
+		$script_4_5_defaults->insert_default_price_types();
519
+		$script_4_5_defaults->insert_default_prices();
520
+		$script_4_5_defaults->insert_default_tickets();
521
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen here
522
+		EE_Config::instance()->update_espresso_config(false, true);
523
+		$this->add_default_admin_only_payments();
524
+		$this->insert_default_currencies();
525
+		return true;
526
+	}
527
+
528
+
529
+
530
+	/**
531
+	 * @return boolean
532
+	 */
533
+	public function schema_changes_after_migration()
534
+	{
535
+		return true;
536
+	}
537
+
538
+
539
+
540
+	public function migration_page_hooks()
541
+	{
542
+	}
543
+
544
+
545
+
546
+	public function add_default_admin_only_payments()
547
+	{
548
+		global $wpdb;
549
+		$table_name = $wpdb->prefix . "esp_payment_method";
550
+		$user_id = EEH_Activation::get_default_creator_id();
551
+		if ($this->_get_table_analysis()->tableExists($table_name)) {
552
+			$SQL = "SELECT COUNT( * ) FROM $table_name";
553
+			$existing_payment_methods = $wpdb->get_var($SQL);
554
+			$default_admin_only_payment_methods = apply_filters(
555
+				'FHEE__EEH_Activation__add_default_admin_only_payments__default_admin_only_payment_methods',
556
+				array(
557
+					__("Bank", 'event_espresso')        => __("Bank Draft", 'event_espresso'),
558
+					__("Cash", 'event_espresso')        => __("Cash Delivered Physically", 'event_espresso'),
559
+					__("Check", 'event_espresso')       => __("Paper Check", 'event_espresso'),
560
+					__("Credit Card", 'event_espresso') => __("Offline Credit Card Payment", 'event_espresso'),
561
+					__("Debit Card", 'event_espresso')  => __("Offline Debit Payment", 'event_espresso'),
562
+					__("Invoice", 'event_espresso')     => __("Invoice received with monies included",
563
+						'event_espresso'),
564
+					__("Money Order", 'event_espresso') => '',
565
+					__("Paypal", 'event_espresso')      => __("Paypal eCheck, Invoice, etc", 'event_espresso'),
566
+					__('Other', 'event_espresso')       => __('Other method of payment', 'event_espresso'),
567
+				));
568
+			//make sure we hae payment method records for the following
569
+			//so admins can record payments for them from the admin page
570
+			foreach ($default_admin_only_payment_methods as $nicename => $description) {
571
+				$slug = sanitize_key($nicename);
572
+				//check that such a payment method exists
573
+				$exists = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $table_name WHERE PMD_slug = %s", $slug));
574
+				if ( ! $exists) {
575
+					$values = array(
576
+						'PMD_type'       => 'Admin_Only',
577
+						'PMD_name'       => $nicename,
578
+						'PMD_admin_name' => $nicename,
579
+						'PMD_admin_desc' => $description,
580
+						'PMD_slug'       => $slug,
581
+						'PMD_wp_user'    => $user_id,
582
+						'PMD_scope'      => serialize(array('ADMIN')),
583
+					);
584
+					$success = $wpdb->insert(
585
+						$table_name,
586
+						$values,
587
+						array(
588
+							'%s',//PMD_type
589
+							'%s',//PMD_name
590
+							'%s',//PMD_admin_name
591
+							'%s',//PMD_admin_desc
592
+							'%s',//PMD_slug
593
+							'%d',//PMD_wp_user
594
+							'%s',//PMD_scope
595
+						)
596
+					);
597
+					if ( ! $success) {
598
+						$this->add_error(sprintf(__("Could not insert new admin-only payment method with values %s during migration",
599
+							"event_espresso"), $this->_json_encode($values)));
600
+					}
601
+				}
602
+			}
603
+		}
604
+	}
605
+
606
+
607
+
608
+	/**
609
+	 * insert_default_countries
610
+	 *
611
+	 * @static
612
+	 * @return void
613
+	 */
614
+	public function insert_default_currencies()
615
+	{
616
+		global $wpdb;
617
+		$currency_table = $wpdb->prefix . "esp_currency";
618
+		if ($this->_get_table_analysis()->tableExists($currency_table)) {
619
+			$SQL = "SELECT COUNT('CUR_code') FROM $currency_table";
620
+			$countries = $wpdb->get_var($SQL);
621
+			if ( ! $countries) {
622
+				$SQL = "INSERT INTO $currency_table
623 623
 				( CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active) VALUES
624 624
 				( 'EUR',  'Euro',  'Euros',  '€',  2,1),
625 625
 				( 'AED',  'Dirham',  'Dirhams', 'د.إ',2,1),
@@ -773,10 +773,10 @@  discard block
 block discarded – undo
773 773
 				( 'ZAR',  'Rand',  'Rands',  'R',  2,1),
774 774
 				( 'ZMK',  'Kwacha',  'Kwachas',  '',  2,1),
775 775
 				( 'ZWD', 'Dollar', 'Dollars', 'Z$', 2,1);";
776
-                $wpdb->query($SQL);
777
-            }
778
-        }
779
-    }
776
+				$wpdb->query($SQL);
777
+			}
778
+		}
779
+	}
780 780
 
781 781
 }
782 782
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 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_6_0_stages/*');
14
+$stages = glob(EE_CORE.'data_migration_scripts/4_6_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 foreach ($stages as $filepath) {
17 17
     $matches = array();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         } elseif ( ! $version_string) {
75 75
 //			echo "no version string provided: $version_string";
76 76
             //no version string provided... this must be pre 4.3
77
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
77
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
78 78
         } else {
79 79
 //			echo "$version_string doesnt apply";
80 80
             return false;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     public function schema_changes_before_migration()
100 100
     {
101 101
         //relies on 4.1's EEH_Activation::create_table
102
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
102
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
103 103
         $table_name = 'esp_answer';
104 104
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
105 105
 					REG_ID INT UNSIGNED NOT NULL,
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
     public function add_default_admin_only_payments()
547 547
     {
548 548
         global $wpdb;
549
-        $table_name = $wpdb->prefix . "esp_payment_method";
549
+        $table_name = $wpdb->prefix."esp_payment_method";
550 550
         $user_id = EEH_Activation::get_default_creator_id();
551 551
         if ($this->_get_table_analysis()->tableExists($table_name)) {
552 552
             $SQL = "SELECT COUNT( * ) FROM $table_name";
@@ -585,13 +585,13 @@  discard block
 block discarded – undo
585 585
                         $table_name,
586 586
                         $values,
587 587
                         array(
588
-                            '%s',//PMD_type
589
-                            '%s',//PMD_name
590
-                            '%s',//PMD_admin_name
591
-                            '%s',//PMD_admin_desc
592
-                            '%s',//PMD_slug
593
-                            '%d',//PMD_wp_user
594
-                            '%s',//PMD_scope
588
+                            '%s', //PMD_type
589
+                            '%s', //PMD_name
590
+                            '%s', //PMD_admin_name
591
+                            '%s', //PMD_admin_desc
592
+                            '%s', //PMD_slug
593
+                            '%d', //PMD_wp_user
594
+                            '%s', //PMD_scope
595 595
                         )
596 596
                     );
597 597
                     if ( ! $success) {
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
     public function insert_default_currencies()
615 615
     {
616 616
         global $wpdb;
617
-        $currency_table = $wpdb->prefix . "esp_currency";
617
+        $currency_table = $wpdb->prefix."esp_currency";
618 618
         if ($this->_get_table_analysis()->tableExists($currency_table)) {
619 619
             $SQL = "SELECT COUNT('CUR_code') FROM $currency_table";
620 620
             $countries = $wpdb->get_var($SQL);
Please login to merge, or discard this patch.