@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <div class="padding"> |
2 | 2 | |
3 | - <?php do_action( 'AHEE__admin_option_settings__template__before', $template_args ); ?> |
|
3 | + <?php do_action('AHEE__admin_option_settings__template__before', $template_args); ?> |
|
4 | 4 | |
5 | 5 | <?php /* @todo put back once we have a dashboard widget to use |
6 | 6 | <h4 class="ee-admin-settings-hdr"> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | </table> |
66 | 66 | <?php endif; */ ?> |
67 | 67 | |
68 | - <?php if ( EE_Registry::instance()->CAP->current_user_can( 'manage_options', 'display_admin_settings_options_promote_and_affiliate' ) ) : ?> |
|
68 | + <?php if (EE_Registry::instance()->CAP->current_user_can('manage_options', 'display_admin_settings_options_promote_and_affiliate')) : ?> |
|
69 | 69 | <h4 class="ee-admin-settings-hdr"> |
70 | 70 | <?php _e('Promote Event Espresso', 'event_espresso'); ?> <span id="affiliate_info"><?php echo EEH_Template::get_help_tab_link('affiliate_info'); ?></span> |
71 | 71 | </h4> |
@@ -80,13 +80,13 @@ discard block |
||
80 | 80 | </label> |
81 | 81 | </th> |
82 | 82 | <td> |
83 | - <?php echo EEH_Form_Fields::select_input('show_reg_footer', $values, $show_reg_footer ); ?> |
|
83 | + <?php echo EEH_Form_Fields::select_input('show_reg_footer', $values, $show_reg_footer); ?> |
|
84 | 84 | </td> |
85 | 85 | </tr> |
86 | 86 | |
87 | 87 | <tr> |
88 | 88 | <th> |
89 | - <?php printf( __('Event Espresso %sAffiliate%s ID', 'event_espresso'), '<a href="http://eventespresso.com/affiliates/" target="_blank">', '</a>' ); ?> |
|
89 | + <?php printf(__('Event Espresso %sAffiliate%s ID', 'event_espresso'), '<a href="http://eventespresso.com/affiliates/" target="_blank">', '</a>'); ?> |
|
90 | 90 | </th> |
91 | 91 | <td> |
92 | 92 | <input name="affiliate_id" class="regular-text" type="text" value="<?php echo $affiliate_id; ?>" /> |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | </label> |
116 | 116 | </th> |
117 | 117 | <td> |
118 | - <?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation ); ?> |
|
118 | + <?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation); ?> |
|
119 | 119 | </td> |
120 | 120 | </tr> |
121 | 121 | </tbody> |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <table id="general-setting-country-details-tbl" class="form-table"> |
2 | 2 | <tbody> |
3 | 3 | <?php |
4 | - foreach ( $inputs as $ID => $input ) { |
|
5 | - echo EEH_Form_Fields::generate_form_input( $input ); |
|
4 | + foreach ($inputs as $ID => $input) { |
|
5 | + echo EEH_Form_Fields::generate_form_input($input); |
|
6 | 6 | } |
7 | 7 | ?> |
8 | 8 | <tr> |
@@ -1,27 +1,27 @@ discard block |
||
1 | 1 | <table id="general-setting-country-states-tbl" class="form-table"> |
2 | 2 | <thead> |
3 | 3 | <tr> |
4 | - <th><?php _e( 'Code', 'event_espresso' );?></th> |
|
5 | - <th><?php _e( 'Name', 'event_espresso' );?></th> |
|
6 | - <th colspan="2"><span class="small-text"><?php _e( 'State Appears in<br/>Dropdown Select Lists ', 'event_espresso' );?></span></th> |
|
4 | + <th><?php _e('Code', 'event_espresso'); ?></th> |
|
5 | + <th><?php _e('Name', 'event_espresso'); ?></th> |
|
6 | + <th colspan="2"><span class="small-text"><?php _e('State Appears in<br/>Dropdown Select Lists ', 'event_espresso'); ?></span></th> |
|
7 | 7 | </tr> |
8 | 8 | </thead> |
9 | 9 | <tbody> |
10 | 10 | <?php |
11 | 11 | //EEH_Debug_Tools::printr( $states, '$states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
12 | - if ( $states ) { |
|
13 | - foreach ( $states as $STA_ID => $state ) { |
|
12 | + if ($states) { |
|
13 | + foreach ($states as $STA_ID => $state) { |
|
14 | 14 | ?> |
15 | 15 | <tr id="state-<?php echo $STA_ID; ?>-tr" class="country-state-columns"> |
16 | 16 | <?php |
17 | - foreach ( $state['inputs'] as $ID => $input ) { |
|
18 | - if ( $ID != 'STA_ID' && $ID != 'CNT_ISO' ) { |
|
19 | - echo EEH_Form_Fields::generate_form_input( $input ); |
|
17 | + foreach ($state['inputs'] as $ID => $input) { |
|
18 | + if ($ID != 'STA_ID' && $ID != 'CNT_ISO') { |
|
19 | + echo EEH_Form_Fields::generate_form_input($input); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | ?> |
23 | 23 | <td class="delete-state-td"> |
24 | - <a id="delete-state-<?php echo $STA_ID; ?>-lnk" class="dashicons dashicons-post-trash ee-icon-size-20 delete-state-lnk" rel="<?php echo $STA_ID; ?>" title="<?php esc_attr_e( 'Delete State #', 'event_espresso' ); ?><?php echo $STA_ID; ?>?" href="<?php echo $state['delete_state_url']; ?>"></a> |
|
24 | + <a id="delete-state-<?php echo $STA_ID; ?>-lnk" class="dashicons dashicons-post-trash ee-icon-size-20 delete-state-lnk" rel="<?php echo $STA_ID; ?>" title="<?php esc_attr_e('Delete State #', 'event_espresso'); ?><?php echo $STA_ID; ?>?" href="<?php echo $state['delete_state_url']; ?>"></a> |
|
25 | 25 | </td> |
26 | 26 | </tr> |
27 | 27 | <?php |
@@ -38,23 +38,23 @@ discard block |
||
38 | 38 | <table class="form-table add-new-state-tbl"> |
39 | 39 | <tbody> |
40 | 40 | <tr> |
41 | - <td colspan="2"><h4><?php _e( 'Add New State/Province', 'event_espresso' );?></h4></td> |
|
41 | + <td colspan="2"><h4><?php _e('Add New State/Province', 'event_espresso'); ?></h4></td> |
|
42 | 42 | </tr> |
43 | 43 | |
44 | 44 | <tr> |
45 | 45 | <td class="general-settings-country-state-input-td"> |
46 | - <label for="STA_abbrev_XXX"><?php _e( 'Code', 'event_espresso' );?></label><br /> |
|
46 | + <label for="STA_abbrev_XXX"><?php _e('Code', 'event_espresso'); ?></label><br /> |
|
47 | 47 | <input id="STA_abbrev-XXX" class="STA_abbrev mid-text " type="text" title="" value="" |
48 | 48 | name="STA_abbrev_XXX"> |
49 | 49 | </td> |
50 | 50 | <td class="general-settings-country-state-input-td"> |
51 | - <label for="STA_name_XXX"><?php _e( 'Name', 'event_espresso' );?></label><br/> |
|
51 | + <label for="STA_name_XXX"><?php _e('Name', 'event_espresso'); ?></label><br/> |
|
52 | 52 | <input id="STA_name-XXX" class="STA_name regular-text " type="text" title="" value="" name="STA_name_XXX"> |
53 | 53 | </td> |
54 | 54 | </tr> |
55 | 55 | <tr> |
56 | 56 | <td colspan="2"> |
57 | - <input type="submit" id="add-new-state-btn" class="secondary-button button right" value="<?php _e( 'Add New State/Province', 'event_espresso' );?>" /> |
|
57 | + <input type="submit" id="add-new-state-btn" class="secondary-button button right" value="<?php _e('Add New State/Province', 'event_espresso'); ?>" /> |
|
58 | 58 | |
59 | 59 | </td> |
60 | 60 | </tr> |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -185,7 +186,7 @@ discard block |
||
185 | 186 | $show_migration_progress = true; |
186 | 187 | if(isset($this->_req_data['continue_migration'])){ |
187 | 188 | $show_backup_db_text = false; |
188 | - }else{ |
|
189 | + } else{ |
|
189 | 190 | $show_backup_db_text = true; |
190 | 191 | } |
191 | 192 | $scripts_needing_to_run = EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts(); |
@@ -205,7 +206,7 @@ discard block |
||
205 | 206 | } |
206 | 207 | $most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true); |
207 | 208 | $exception_thrown = false; |
208 | - }catch(EE_Error $e){ |
|
209 | + } catch(EE_Error $e){ |
|
209 | 210 | |
210 | 211 | EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage()); |
211 | 212 | //now, just so we can display the page correctly, make a error migration script stage object |
@@ -223,19 +224,19 @@ discard block |
||
223 | 224 | $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_was_borked_page.template.php'; |
224 | 225 | $this->_template_args[ 'support_url' ] = 'http://eventespresso.com/support/forums/'; |
225 | 226 | $this->_template_args[ 'next_url' ] = EEH_URL::add_query_args_and_nonce(array( 'action' => 'confirm_migration_crash_report_sent', 'success' => '0' ), EE_MAINTENANCE_ADMIN_URL ); |
226 | - }elseif($addons_should_be_upgraded_first){ |
|
227 | + } elseif($addons_should_be_upgraded_first){ |
|
227 | 228 | $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_upgrade_addons_before_migrating.template.php'; |
228 | - }else{ |
|
229 | + } else{ |
|
229 | 230 | if($most_recent_migration && |
230 | 231 | $most_recent_migration instanceof EE_Data_Migration_Script_Base && |
231 | 232 | $most_recent_migration->can_continue()){ |
232 | 233 | $show_backup_db_text = false; |
233 | 234 | $show_continue_current_migration_script = true; |
234 | 235 | $show_most_recent_migration = true; |
235 | - }elseif(isset($this->_req_data['continue_migration'])){ |
|
236 | + } elseif(isset($this->_req_data['continue_migration'])){ |
|
236 | 237 | $show_most_recent_migration = true; |
237 | 238 | $show_continue_current_migration_script = false; |
238 | - }else{ |
|
239 | + } else{ |
|
239 | 240 | $show_most_recent_migration = false; |
240 | 241 | $show_continue_current_migration_script = false; |
241 | 242 | } |
@@ -313,7 +314,7 @@ discard block |
||
313 | 314 | if( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()){ |
314 | 315 | EE_Maintenance_Mode::instance()->set_maintenance_level($new_level); |
315 | 316 | $success = true; |
316 | - }else{ |
|
317 | + } else{ |
|
317 | 318 | EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old(); |
318 | 319 | $success= false; |
319 | 320 | } |
@@ -380,7 +381,7 @@ discard block |
||
380 | 381 | "from:$from_name<$from>", |
381 | 382 | // 'content-type:text/html charset=UTF-8' |
382 | 383 | )); |
383 | - }catch( Exception $e ){ |
|
384 | + } catch( Exception $e ){ |
|
384 | 385 | $success = FALSE; |
385 | 386 | } |
386 | 387 | $this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"),array('success'=>$success,'action'=>'confirm_migration_crash_report_sent')); |
@@ -391,7 +392,7 @@ discard block |
||
391 | 392 | public function _confirm_migration_crash_report_sent(){ |
392 | 393 | try{ |
393 | 394 | $most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true); |
394 | - }catch(EE_Error $e){ |
|
395 | + } catch(EE_Error $e){ |
|
395 | 396 | |
396 | 397 | EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage()); |
397 | 398 | //now, just so we can display the page correctly, make a error migration script stage object |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | class Maintenance_Admin_Page extends EE_Admin_Page { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $routing = TRUE ) { |
|
34 | - parent::__construct( $routing ); |
|
33 | + public function __construct($routing = TRUE) { |
|
34 | + parent::__construct($routing); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | |
47 | 47 | |
48 | 48 | protected function _ajax_hooks() { |
49 | - add_action('wp_ajax_migration_step',array($this,'migration_step')); |
|
50 | - add_action('wp_ajax_add_error_to_migrations_ran',array($this,'add_error_to_migrations_ran')); |
|
49 | + add_action('wp_ajax_migration_step', array($this, 'migration_step')); |
|
50 | + add_action('wp_ajax_add_error_to_migrations_ran', array($this, 'add_error_to_migrations_ran')); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $this->_admin_page_title = EE_MAINTENANCE_LABEL; |
57 | 57 | $this->_labels = array( |
58 | 58 | 'buttons' => array( |
59 | - 'reset_capabilities' => __( 'Reset Event Espresso Capabilities', 'event_espresso' ) |
|
59 | + 'reset_capabilities' => __('Reset Event Espresso Capabilities', 'event_espresso') |
|
60 | 60 | ) |
61 | 61 | ); |
62 | 62 | } |
@@ -155,23 +155,23 @@ discard block |
||
155 | 155 | * default maintenance page. If we're in maintenance mode level 2, then we need to show |
156 | 156 | * the migration scripts and all that UI. |
157 | 157 | */ |
158 | - public function _maintenance(){ |
|
158 | + public function _maintenance() { |
|
159 | 159 | //it all depends if we're in maintenance model level 1 (frontend-only) or |
160 | 160 | //level 2 (everything except maintenance page) |
161 | - try{ |
|
161 | + try { |
|
162 | 162 | //get the current maintenance level and check if |
163 | 163 | //we are removed |
164 | 164 | $mm = EE_Maintenance_Mode::instance()->level(); |
165 | 165 | $placed_in_mm = EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old(); |
166 | - if( $mm == EE_Maintenance_Mode::level_2_complete_maintenance && ! $placed_in_mm){ |
|
166 | + if ($mm == EE_Maintenance_Mode::level_2_complete_maintenance && ! $placed_in_mm) { |
|
167 | 167 | //we just took the site out of maintenance mode, so notify the user. |
168 | 168 | //unfortunately this message appears to be echoed on the NEXT page load... |
169 | 169 | //oh well, we should really be checking for this on addon deactivation anyways |
170 | - EE_Error::add_attention( __( 'Site taken out of maintenance mode because no data migration scripts are required', 'event_espresso' ) ); |
|
171 | - $this->_process_notices( array( 'page' => 'espresso_maintenance_settings'), false ); |
|
170 | + EE_Error::add_attention(__('Site taken out of maintenance mode because no data migration scripts are required', 'event_espresso')); |
|
171 | + $this->_process_notices(array('page' => 'espresso_maintenance_settings'), false); |
|
172 | 172 | } |
173 | 173 | //in case an exception is thrown while trying to handle migrations |
174 | - switch(EE_Maintenance_Mode::instance()->level()){ |
|
174 | + switch (EE_Maintenance_Mode::instance()->level()) { |
|
175 | 175 | case EE_Maintenance_Mode::level_0_not_in_maintenance: |
176 | 176 | case EE_Maintenance_Mode::level_1_frontend_only_maintenance: |
177 | 177 | $show_maintenance_switch = true; |
@@ -183,18 +183,18 @@ discard block |
||
183 | 183 | case EE_Maintenance_Mode::level_2_complete_maintenance: |
184 | 184 | $show_maintenance_switch = false; |
185 | 185 | $show_migration_progress = true; |
186 | - if(isset($this->_req_data['continue_migration'])){ |
|
186 | + if (isset($this->_req_data['continue_migration'])) { |
|
187 | 187 | $show_backup_db_text = false; |
188 | - }else{ |
|
188 | + } else { |
|
189 | 189 | $show_backup_db_text = true; |
190 | 190 | } |
191 | 191 | $scripts_needing_to_run = EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts(); |
192 | 192 | $addons_should_be_upgraded_first = EE_Data_Migration_Manager::instance()->addons_need_updating(); |
193 | 193 | $script_names = array(); |
194 | 194 | $current_script = NULL; |
195 | - foreach($scripts_needing_to_run as $script){ |
|
196 | - if($script instanceof EE_Data_Migration_Script_Base){ |
|
197 | - if( ! $current_script){ |
|
195 | + foreach ($scripts_needing_to_run as $script) { |
|
196 | + if ($script instanceof EE_Data_Migration_Script_Base) { |
|
197 | + if ( ! $current_script) { |
|
198 | 198 | $current_script = $script; |
199 | 199 | $current_script->migration_page_hooks(); |
200 | 200 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | $most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true); |
207 | 207 | $exception_thrown = false; |
208 | - }catch(EE_Error $e){ |
|
208 | + } catch (EE_Error $e) { |
|
209 | 209 | |
210 | 210 | EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage()); |
211 | 211 | //now, just so we can display the page correctly, make a error migration script stage object |
@@ -215,54 +215,54 @@ discard block |
||
215 | 215 | $exception_thrown = true; |
216 | 216 | } |
217 | 217 | $current_db_state = EE_Data_Migration_Manager::instance()->ensure_current_database_state_is_set(); |
218 | - $current_db_state = str_replace( '.decaf', '', $current_db_state ); |
|
219 | - if($exception_thrown || |
|
220 | - ( $most_recent_migration && |
|
218 | + $current_db_state = str_replace('.decaf', '', $current_db_state); |
|
219 | + if ($exception_thrown || |
|
220 | + ($most_recent_migration && |
|
221 | 221 | $most_recent_migration instanceof EE_Data_Migration_Script_Base && |
222 | 222 | $most_recent_migration->is_broken() |
223 | - )){ |
|
224 | - $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_was_borked_page.template.php'; |
|
225 | - $this->_template_args[ 'support_url' ] = 'http://eventespresso.com/support/forums/'; |
|
226 | - $this->_template_args[ 'next_url' ] = EEH_URL::add_query_args_and_nonce(array( 'action' => 'confirm_migration_crash_report_sent', 'success' => '0' ), EE_MAINTENANCE_ADMIN_URL ); |
|
227 | - }elseif($addons_should_be_upgraded_first){ |
|
228 | - $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_upgrade_addons_before_migrating.template.php'; |
|
229 | - }else{ |
|
230 | - if($most_recent_migration && |
|
231 | - $most_recent_migration instanceof EE_Data_Migration_Script_Base && |
|
232 | - $most_recent_migration->can_continue()){ |
|
223 | + )) { |
|
224 | + $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_migration_was_borked_page.template.php'; |
|
225 | + $this->_template_args['support_url'] = 'http://eventespresso.com/support/forums/'; |
|
226 | + $this->_template_args['next_url'] = EEH_URL::add_query_args_and_nonce(array('action' => 'confirm_migration_crash_report_sent', 'success' => '0'), EE_MAINTENANCE_ADMIN_URL); |
|
227 | + }elseif ($addons_should_be_upgraded_first) { |
|
228 | + $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_upgrade_addons_before_migrating.template.php'; |
|
229 | + } else { |
|
230 | + if ($most_recent_migration && |
|
231 | + $most_recent_migration instanceof EE_Data_Migration_Script_Base && |
|
232 | + $most_recent_migration->can_continue()) { |
|
233 | 233 | $show_backup_db_text = false; |
234 | 234 | $show_continue_current_migration_script = true; |
235 | 235 | $show_most_recent_migration = true; |
236 | - }elseif(isset($this->_req_data['continue_migration'])){ |
|
236 | + }elseif (isset($this->_req_data['continue_migration'])) { |
|
237 | 237 | $show_most_recent_migration = true; |
238 | 238 | $show_continue_current_migration_script = false; |
239 | - }else{ |
|
239 | + } else { |
|
240 | 240 | $show_most_recent_migration = false; |
241 | 241 | $show_continue_current_migration_script = false; |
242 | 242 | } |
243 | 243 | |
244 | - if(isset($current_script)){ |
|
244 | + if (isset($current_script)) { |
|
245 | 245 | $migrates_to = $current_script->migrates_to_version(); |
246 | - $plugin_slug = $migrates_to[ 'slug' ]; |
|
247 | - $new_version = $migrates_to[ 'version' ]; |
|
248 | - $this->_template_args = array_merge($this->_template_args,array( |
|
249 | - 'current_db_state'=> sprintf(__("EE%s (%s)", "event_espresso"), isset($current_db_state[$plugin_slug]) ? $current_db_state[$plugin_slug] : 3,$plugin_slug), |
|
250 | - 'next_db_state'=>isset($current_script) ? sprintf(__("EE%s (%s)", 'event_espresso'),$new_version,$plugin_slug) : NULL)); |
|
246 | + $plugin_slug = $migrates_to['slug']; |
|
247 | + $new_version = $migrates_to['version']; |
|
248 | + $this->_template_args = array_merge($this->_template_args, array( |
|
249 | + 'current_db_state'=> sprintf(__("EE%s (%s)", "event_espresso"), isset($current_db_state[$plugin_slug]) ? $current_db_state[$plugin_slug] : 3, $plugin_slug), |
|
250 | + 'next_db_state'=>isset($current_script) ? sprintf(__("EE%s (%s)", 'event_espresso'), $new_version, $plugin_slug) : NULL)); |
|
251 | 251 | } |
252 | 252 | |
253 | - $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_page.template.php'; |
|
253 | + $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_migration_page.template.php'; |
|
254 | 254 | $this->_template_args = array_merge( |
255 | 255 | $this->_template_args, |
256 | 256 | array( |
257 | - 'show_most_recent_migration' => $show_most_recent_migration,//flag for showing the most recent migration's status and/or errors |
|
258 | - 'show_migration_progress' => $show_migration_progress,//flag for showing the option to run migrations and see their progress |
|
259 | - 'show_backup_db_text' => $show_backup_db_text,//flag for showing text telling the user to backup their DB |
|
260 | - 'show_maintenance_switch'=> $show_maintenance_switch,//flag for showing the option to change maintenance mode between levels 0 and 1 |
|
261 | - 'script_names'=>$script_names,//array of names of scripts that have run |
|
262 | - 'show_continue_current_migration_script'=>$show_continue_current_migration_script,//flag to change wording to indicating that we're only CONTINUING a migration script (somehow it got interrupted0 |
|
257 | + 'show_most_recent_migration' => $show_most_recent_migration, //flag for showing the most recent migration's status and/or errors |
|
258 | + 'show_migration_progress' => $show_migration_progress, //flag for showing the option to run migrations and see their progress |
|
259 | + 'show_backup_db_text' => $show_backup_db_text, //flag for showing text telling the user to backup their DB |
|
260 | + 'show_maintenance_switch'=> $show_maintenance_switch, //flag for showing the option to change maintenance mode between levels 0 and 1 |
|
261 | + 'script_names'=>$script_names, //array of names of scripts that have run |
|
262 | + 'show_continue_current_migration_script'=>$show_continue_current_migration_script, //flag to change wording to indicating that we're only CONTINUING a migration script (somehow it got interrupted0 |
|
263 | 263 | 'reset_db_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL), |
264 | - 'update_migration_script_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'change_maintenance_level'),EE_MAINTENANCE_ADMIN_URL), |
|
265 | - 'ultimate_db_state'=> sprintf(__("EE%s", 'event_espresso'),espresso_version()), |
|
264 | + 'update_migration_script_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'change_maintenance_level'), EE_MAINTENANCE_ADMIN_URL), |
|
265 | + 'ultimate_db_state'=> sprintf(__("EE%s", 'event_espresso'), espresso_version()), |
|
266 | 266 | ) |
267 | 267 | ); |
268 | 268 | //make sure we have the form fields helper available. It usually is, but sometimes it isn't |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | 'status_fatal_error'=> EE_Data_Migration_Manager::status_fatal_error, |
277 | 277 | 'status_completed'=> EE_Data_Migration_Manager::status_completed)); |
278 | 278 | } |
279 | - $this->_template_args['most_recent_migration'] = $most_recent_migration;//the actual most recently ran migration |
|
279 | + $this->_template_args['most_recent_migration'] = $most_recent_migration; //the actual most recently ran migration |
|
280 | 280 | $this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE); |
281 | 281 | $this->display_admin_page_with_sidebar(); |
282 | 282 | } |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | /** |
287 | 287 | * returns JSON and executes another step of the currently-executing data migration (called via ajax) |
288 | 288 | */ |
289 | - public function migration_step(){ |
|
289 | + public function migration_step() { |
|
290 | 290 | $this->_template_args['data'] = EE_Data_Migration_Manager::instance()->response_to_migration_ajax_request(); |
291 | 291 | $this->_return_json(); |
292 | 292 | } |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * Can be used by js when it notices a response with HTML in it in order |
298 | 298 | * to log the malformed response |
299 | 299 | */ |
300 | - public function add_error_to_migrations_ran(){ |
|
300 | + public function add_error_to_migrations_ran() { |
|
301 | 301 | EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($this->_req_data['message']); |
302 | 302 | $this->_template_args['data'] = array('ok'=>true); |
303 | 303 | $this->_return_json(); |
@@ -308,14 +308,14 @@ discard block |
||
308 | 308 | /** |
309 | 309 | * changes the maintenance level, provided there are still no migration scripts that shoudl run |
310 | 310 | */ |
311 | - public function _change_maintenance_level(){ |
|
311 | + public function _change_maintenance_level() { |
|
312 | 312 | $new_level = intval($this->_req_data['maintenance_mode_level']); |
313 | - if( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()){ |
|
313 | + if ( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()) { |
|
314 | 314 | EE_Maintenance_Mode::instance()->set_maintenance_level($new_level); |
315 | 315 | $success = true; |
316 | - }else{ |
|
316 | + } else { |
|
317 | 317 | EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old(); |
318 | - $success= false; |
|
318 | + $success = false; |
|
319 | 319 | } |
320 | 320 | $this->_redirect_after_action($success, 'Maintenance Mode', __("Updated", "event_espresso")); |
321 | 321 | } |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | * |
328 | 328 | * @throws \EE_Error |
329 | 329 | */ |
330 | - public function _data_reset_and_delete(){ |
|
331 | - $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_data_reset_and_delete.template.php'; |
|
330 | + public function _data_reset_and_delete() { |
|
331 | + $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_data_reset_and_delete.template.php'; |
|
332 | 332 | $this->_template_args['reset_capabilities_button'] = $this->get_action_link_or_button( |
333 | 333 | 'reset_capabilities', |
334 | 334 | 'reset_capabilities', |
@@ -338,11 +338,11 @@ discard block |
||
338 | 338 | false |
339 | 339 | ); |
340 | 340 | $this->_template_args['delete_db_url'] = EE_Admin_Page::add_query_args_and_nonce( |
341 | - array( 'action' => 'delete_db' ), |
|
341 | + array('action' => 'delete_db'), |
|
342 | 342 | EE_MAINTENANCE_ADMIN_URL |
343 | 343 | ); |
344 | 344 | $this->_template_args['reset_db_url'] = EE_Admin_Page::add_query_args_and_nonce( |
345 | - array( 'action' => 'reset_db' ), |
|
345 | + array('action' => 'reset_db'), |
|
346 | 346 | EE_MAINTENANCE_ADMIN_URL |
347 | 347 | ); |
348 | 348 | $this->_template_args['admin_page_content'] = EEH_Template::display_template( |
@@ -356,9 +356,9 @@ discard block |
||
356 | 356 | |
357 | 357 | |
358 | 358 | protected function _reset_capabilities() { |
359 | - EE_Registry::instance()->CAP->init_caps( true ); |
|
360 | - EE_Error::add_success( __('Default Event Espresso capabilities have been restored for all current roles.', 'event_espresso' ) ); |
|
361 | - $this->_redirect_after_action( FALSE, '', '', array( 'action' => 'data_reset' ), TRUE ); |
|
359 | + EE_Registry::instance()->CAP->init_caps(true); |
|
360 | + EE_Error::add_success(__('Default Event Espresso capabilities have been restored for all current roles.', 'event_espresso')); |
|
361 | + $this->_redirect_after_action(FALSE, '', '', array('action' => 'data_reset'), TRUE); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | protected function _reattempt_migration() { |
370 | 370 | EE_Data_Migration_Manager::instance()->reattempt(); |
371 | - $this->_redirect_after_action( FALSE, '', '', array( 'action' => 'default' ), TRUE ); |
|
371 | + $this->_redirect_after_action(FALSE, '', '', array('action' => 'default'), TRUE); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | |
@@ -377,8 +377,8 @@ discard block |
||
377 | 377 | /** |
378 | 378 | * shows the big ol' System Information page |
379 | 379 | */ |
380 | - public function _system_status(){ |
|
381 | - $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_system_stati_page.template.php'; |
|
380 | + public function _system_status() { |
|
381 | + $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_system_stati_page.template.php'; |
|
382 | 382 | $this->_template_args['system_stati'] = EEM_System_Status::instance()->get_system_stati(); |
383 | 383 | $this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE); |
384 | 384 | $this->display_admin_page_with_sidebar(); |
@@ -386,30 +386,30 @@ discard block |
||
386 | 386 | |
387 | 387 | |
388 | 388 | |
389 | - public function _send_migration_crash_report(){ |
|
389 | + public function _send_migration_crash_report() { |
|
390 | 390 | $from = $this->_req_data['from']; |
391 | 391 | $from_name = $this->_req_data['from_name']; |
392 | 392 | $body = $this->_req_data['body']; |
393 | - try{ |
|
393 | + try { |
|
394 | 394 | $success = wp_mail(EE_SUPPORT_EMAIL, |
395 | 395 | 'Migration Crash Report', |
396 | - $body."/r/n<br>". print_r(EEM_System_Status::instance()->get_system_stati(),true), |
|
396 | + $body."/r/n<br>".print_r(EEM_System_Status::instance()->get_system_stati(), true), |
|
397 | 397 | array( |
398 | 398 | "from:$from_name<$from>", |
399 | 399 | // 'content-type:text/html charset=UTF-8' |
400 | 400 | )); |
401 | - }catch( Exception $e ){ |
|
401 | + } catch (Exception $e) { |
|
402 | 402 | $success = FALSE; |
403 | 403 | } |
404 | - $this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"),array('success'=>$success,'action'=>'confirm_migration_crash_report_sent')); |
|
404 | + $this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"), array('success'=>$success, 'action'=>'confirm_migration_crash_report_sent')); |
|
405 | 405 | } |
406 | 406 | |
407 | 407 | |
408 | 408 | |
409 | - public function _confirm_migration_crash_report_sent(){ |
|
410 | - try{ |
|
409 | + public function _confirm_migration_crash_report_sent() { |
|
410 | + try { |
|
411 | 411 | $most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true); |
412 | - }catch(EE_Error $e){ |
|
412 | + } catch (EE_Error $e) { |
|
413 | 413 | |
414 | 414 | EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage()); |
415 | 415 | //now, just so we can display the page correctly, make a error migration script stage object |
@@ -417,14 +417,14 @@ discard block |
||
417 | 417 | $most_recent_migration = new EE_DMS_Unknown_1_0_0(); |
418 | 418 | $most_recent_migration->add_error($e->getMessage()); |
419 | 419 | } |
420 | - $success = $this->_req_data['success']=='1' ? true : false; |
|
420 | + $success = $this->_req_data['success'] == '1' ? true : false; |
|
421 | 421 | $this->_template_args['success'] = $success; |
422 | - $this->_template_args[ 'most_recent_migration' ] = $most_recent_migration; |
|
422 | + $this->_template_args['most_recent_migration'] = $most_recent_migration; |
|
423 | 423 | $this->_template_args['reset_db_action_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL); |
424 | - $this->_template_args[ 'reset_db_page_url' ] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'data_reset'), EE_MAINTENANCE_ADMIN_URL); |
|
425 | - $this->_template_args[ 'reattempt_action_url' ] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'reattempt_migration'), EE_MAINTENANCE_ADMIN_URL ); |
|
426 | - $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_confirm_migration_crash_report_sent.template.php'; |
|
427 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path,$this->_template_args,TRUE); |
|
424 | + $this->_template_args['reset_db_page_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'data_reset'), EE_MAINTENANCE_ADMIN_URL); |
|
425 | + $this->_template_args['reattempt_action_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'reattempt_migration'), EE_MAINTENANCE_ADMIN_URL); |
|
426 | + $this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_confirm_migration_crash_report_sent.template.php'; |
|
427 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE); |
|
428 | 428 | $this->display_admin_page_with_sidebar(); |
429 | 429 | } |
430 | 430 | |
@@ -437,18 +437,18 @@ discard block |
||
437 | 437 | * @param boolean $nuke_old_ee4_data controls whether or not we |
438 | 438 | * destroy the old ee4 data, or just try initializing ee4 default data |
439 | 439 | */ |
440 | - public function _reset_db( $nuke_old_ee4_data = TRUE ){ |
|
440 | + public function _reset_db($nuke_old_ee4_data = TRUE) { |
|
441 | 441 | EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance); |
442 | 442 | |
443 | - if( $nuke_old_ee4_data ){ |
|
443 | + if ($nuke_old_ee4_data) { |
|
444 | 444 | EEH_Activation::delete_all_espresso_cpt_data(); |
445 | - EEH_Activation::delete_all_espresso_tables_and_data( FALSE ); |
|
445 | + EEH_Activation::delete_all_espresso_tables_and_data(FALSE); |
|
446 | 446 | EEH_Activation::remove_cron_tasks(); |
447 | 447 | } |
448 | 448 | //make sure when we reset the registry's config that it |
449 | 449 | //switches to using the new singleton |
450 | - EE_Registry::instance()->CFG = EE_Registry::instance()->CFG->reset( TRUE ); |
|
451 | - EE_System::instance()->initialize_db_if_no_migrations_required( TRUE ); |
|
450 | + EE_Registry::instance()->CFG = EE_Registry::instance()->CFG->reset(TRUE); |
|
451 | + EE_System::instance()->initialize_db_if_no_migrations_required(TRUE); |
|
452 | 452 | EE_System::instance()->redirect_to_about_ee(); |
453 | 453 | } |
454 | 454 | |
@@ -457,20 +457,20 @@ discard block |
||
457 | 457 | /** |
458 | 458 | * Deletes ALL EE tables, Records, and Options from the database. |
459 | 459 | */ |
460 | - public function _delete_db(){ |
|
460 | + public function _delete_db() { |
|
461 | 461 | EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance); |
462 | 462 | EEH_Activation::delete_all_espresso_cpt_data(); |
463 | 463 | EEH_Activation::delete_all_espresso_tables_and_data(); |
464 | 464 | EEH_Activation::remove_cron_tasks(); |
465 | 465 | EEH_Activation::deactivate_event_espresso(); |
466 | - wp_safe_redirect( admin_url( 'plugins.php' )); |
|
466 | + wp_safe_redirect(admin_url('plugins.php')); |
|
467 | 467 | exit; |
468 | 468 | } |
469 | 469 | |
470 | 470 | /** |
471 | 471 | * sets up EE4 to rerun the migrations from ee3 to ee4 |
472 | 472 | */ |
473 | - public function _rerun_migration_from_ee3(){ |
|
473 | + public function _rerun_migration_from_ee3() { |
|
474 | 474 | EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance); |
475 | 475 | EEH_Activation::delete_all_espresso_cpt_data(); |
476 | 476 | EEH_Activation::delete_all_espresso_tables_and_data(false); |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | wp_enqueue_script('ee_admin_js'); |
498 | 498 | // wp_enqueue_media(); |
499 | 499 | // wp_enqueue_script('media-upload'); |
500 | - wp_enqueue_script('ee-maintenance',EE_MAINTENANCE_ASSETS_URL.'/ee-maintenance.js',array('jquery'),EVENT_ESPRESSO_VERSION,true); |
|
500 | + wp_enqueue_script('ee-maintenance', EE_MAINTENANCE_ASSETS_URL.'/ee-maintenance.js', array('jquery'), EVENT_ESPRESSO_VERSION, true); |
|
501 | 501 | |
502 | - wp_register_style( 'espresso_maintenance', EE_MAINTENANCE_ASSETS_URL . 'ee-maintenance.css', array(), EVENT_ESPRESSO_VERSION ); |
|
502 | + wp_register_style('espresso_maintenance', EE_MAINTENANCE_ASSETS_URL.'ee-maintenance.css', array(), EVENT_ESPRESSO_VERSION); |
|
503 | 503 | wp_enqueue_style('espresso_maintenance'); |
504 | 504 | } |
505 | 505 |
@@ -5,39 +5,39 @@ discard block |
||
5 | 5 | /** @type string $reset_db_action_url */ |
6 | 6 | /** @type EE_Data_Migration_Script_Base $most_recent_migration */ |
7 | 7 | ?> |
8 | -<?php if ( $success ) { ?> |
|
9 | - <h1><?php _e( "Data Migration Report Sent", "event_espresso" ); ?></h1> |
|
10 | - <p><?php _e( "A migration crash report email was sent to Event Espresso. You should hear back from us soon.", "event_espresso" ); ?></p> |
|
8 | +<?php if ($success) { ?> |
|
9 | + <h1><?php _e("Data Migration Report Sent", "event_espresso"); ?></h1> |
|
10 | + <p><?php _e("A migration crash report email was sent to Event Espresso. You should hear back from us soon.", "event_espresso"); ?></p> |
|
11 | 11 | <?php } else {//didn't send email properly ?> |
12 | - <h1><?php _e( "Migration Report not sent", "event_espresso" ); ?></h1> |
|
13 | - <p><?php _e( "An error occurred and we were not able to automatically send a report to Event Espresso support.", "event_espresso" ); ?></p> |
|
14 | - <p><?php printf( __( "Please copy-and-paste the system information below to %s", "event_espresso" ), '<a href="mailto:' . EE_SUPPORT_EMAIL . '">' .EE_SUPPORT_EMAIL . "</a>" ); ?></p> |
|
12 | + <h1><?php _e("Migration Report not sent", "event_espresso"); ?></h1> |
|
13 | + <p><?php _e("An error occurred and we were not able to automatically send a report to Event Espresso support.", "event_espresso"); ?></p> |
|
14 | + <p><?php printf(__("Please copy-and-paste the system information below to %s", "event_espresso"), '<a href="mailto:'.EE_SUPPORT_EMAIL.'">'.EE_SUPPORT_EMAIL."</a>"); ?></p> |
|
15 | 15 | <label> |
16 | - <?php _e( "system status info", "event_espresso" ); ?> |
|
17 | - <textarea name="system_status_info" class="system_status_info"><?php print_r( EEM_System_Status::instance()->get_system_stati() ); ?></textarea> |
|
16 | + <?php _e("system status info", "event_espresso"); ?> |
|
17 | + <textarea name="system_status_info" class="system_status_info"><?php print_r(EEM_System_Status::instance()->get_system_stati()); ?></textarea> |
|
18 | 18 | </label> |
19 | 19 | <?php } ?> |
20 | 20 | |
21 | 21 | |
22 | -<h1><?php _e( "What's next?", 'event_espresso' ); ?></h1> |
|
23 | -<p><?php _e( "Well, it depends on your situation:", 'event_espresso' ); ?></p> |
|
22 | +<h1><?php _e("What's next?", 'event_espresso'); ?></h1> |
|
23 | +<p><?php _e("Well, it depends on your situation:", 'event_espresso'); ?></p> |
|
24 | 24 | <div class='ee-table-wrap'> |
25 | 25 | <table> |
26 | 26 | <thead> |
27 | 27 | <tr> |
28 | - <th><?php _e( "Your Situation", 'event_espresso' ); ?></th> |
|
29 | - <th><?php _e( "Suggested Action", 'event_espresso' ); ?></th> |
|
28 | + <th><?php _e("Your Situation", 'event_espresso'); ?></th> |
|
29 | + <th><?php _e("Suggested Action", 'event_espresso'); ?></th> |
|
30 | 30 | </tr> |
31 | 31 | </thead> |
32 | 32 | <tbody> |
33 | 33 | <tr> |
34 | - <td><p class='big-text'><?php _e( "I want to retry migrating my data", 'event_espresso' ); ?></p></td> |
|
34 | + <td><p class='big-text'><?php _e("I want to retry migrating my data", 'event_espresso'); ?></p></td> |
|
35 | 35 | <td> |
36 | 36 | <p> |
37 | 37 | <?php |
38 | 38 | printf( |
39 | - __( 'First, %1$s check the forums %2$s to see if there is a solution before re-attempting to migrate. Often it helps to deactivate other plugins which may have conflicts; or it may help to add %3$s to your %4$s wp-config.php%5$s (which will make the migrations run slower, but may resolve any memory exhaustion errors.', 'event_espresso' ), |
|
40 | - "<a href='" . EE_SUPPORT_EMAIL . "' target='_blank'>", |
|
39 | + __('First, %1$s check the forums %2$s to see if there is a solution before re-attempting to migrate. Often it helps to deactivate other plugins which may have conflicts; or it may help to add %3$s to your %4$s wp-config.php%5$s (which will make the migrations run slower, but may resolve any memory exhaustion errors.', 'event_espresso'), |
|
40 | + "<a href='".EE_SUPPORT_EMAIL."' target='_blank'>", |
|
41 | 41 | '</a>', |
42 | 42 | '<pre lang="php">define( EE_MIGRATION_STEP_SIZE, 10 );</pre>', |
43 | 43 | '<b>', |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | <p> |
50 | 50 | <?php |
51 | 51 | printf( |
52 | - __( 'To retry migrating your data: restore to the backup you made before the migration and reactivate EE (and any addons you are using) and re-run the migration scripts. If you did not make a database migration and are migrating from EE3: delete your EE4 data (use the %1$s Reset/Delete Data tab above%2$s), and then reactivate EE4, and then re-run the migration scripts. If you did not make a database backup, are not migrating from EE3, have found a solution to the fatal error you received, and are willing to possibly have some data lost, %3$sattempt to continue migrating%2$s.', 'event_espresso' ), |
|
52 | + __('To retry migrating your data: restore to the backup you made before the migration and reactivate EE (and any addons you are using) and re-run the migration scripts. If you did not make a database migration and are migrating from EE3: delete your EE4 data (use the %1$s Reset/Delete Data tab above%2$s), and then reactivate EE4, and then re-run the migration scripts. If you did not make a database backup, are not migrating from EE3, have found a solution to the fatal error you received, and are willing to possibly have some data lost, %3$sattempt to continue migrating%2$s.', 'event_espresso'), |
|
53 | 53 | "<a href='$reset_db_page_url'>", |
54 | 54 | "</a>", |
55 | 55 | "<a class='button-primary' href='$reattempt_action_url'>" |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | </tr> |
61 | 61 | <tr> |
62 | 62 | <td> |
63 | - <p class='big-text'><?php _e( "I want to hear from Support before proceeding", 'event_espresso' ); ?></p> |
|
63 | + <p class='big-text'><?php _e("I want to hear from Support before proceeding", 'event_espresso'); ?></p> |
|
64 | 64 | </td> |
65 | 65 | <td> |
66 | 66 | <?php |
67 | 67 | printf( |
68 | - __( 'Just make sure you\'ve %1$s checked for a solution in the forums,%2$s and properly contacted Support. We will get back to you as soon as possible', 'event_espresso' ), |
|
69 | - "<a href='" . EE_SUPPORT_EMAIL . "'>", |
|
68 | + __('Just make sure you\'ve %1$s checked for a solution in the forums,%2$s and properly contacted Support. We will get back to you as soon as possible', 'event_espresso'), |
|
69 | + "<a href='".EE_SUPPORT_EMAIL."'>", |
|
70 | 70 | "</a>" |
71 | 71 | ); |
72 | 72 | ?> |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | </tr> |
75 | 75 | <tr> |
76 | 76 | <td> |
77 | - <p class='big-text'><?php printf( __( 'I don\'t need my old EE %s data', 'event_espresso' ), $most_recent_migration->slug() ); ?></p> |
|
77 | + <p class='big-text'><?php printf(__('I don\'t need my old EE %s data', 'event_espresso'), $most_recent_migration->slug()); ?></p> |
|
78 | 78 | </td> |
79 | 79 | <td> |
80 | 80 | <?php |
81 | 81 | printf( |
82 | - __( 'If you are ok with losing all the EE %1$s data, you can skip the migrations and %2$s use EE4 with only default Data%3$s', 'event_espresso' ), |
|
82 | + __('If you are ok with losing all the EE %1$s data, you can skip the migrations and %2$s use EE4 with only default Data%3$s', 'event_espresso'), |
|
83 | 83 | $most_recent_migration->slug(), |
84 | 84 | "<a id='do-not-migrate' class='do-not-migrate button-primary' href='$reset_db_action_url'>", |
85 | 85 | "</a>" |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | </tr> |
90 | 90 | <tr> |
91 | 91 | <td> |
92 | - <p class='big-text'><?php printf( __( 'I want to go back to my old version of EE %1$s', 'event_espresso' ), $most_recent_migration->slug() ); ?> |
|
92 | + <p class='big-text'><?php printf(__('I want to go back to my old version of EE %1$s', 'event_espresso'), $most_recent_migration->slug()); ?> |
|
93 | 93 | </td> |
94 | 94 | <td> |
95 | 95 | <p> |
96 | 96 | <?php |
97 | 97 | printf( |
98 | - __( 'Then we suggest you re-activate the old version of EE %3$s and restore your database to the backup you made just before migrating . If you didn\'t backup your database and are migrating from EE3, you can also delete your EE4 data (use on the %1$s"Reset/Delete Data" tab above%2$s), and then reactivate EE3 from the plugins page. Note: some of your EE3 shortcodes may have been changed to their EE4 equivalents, so you will need to change them back.', 'event_espresso' ), |
|
98 | + __('Then we suggest you re-activate the old version of EE %3$s and restore your database to the backup you made just before migrating . If you didn\'t backup your database and are migrating from EE3, you can also delete your EE4 data (use on the %1$s"Reset/Delete Data" tab above%2$s), and then reactivate EE3 from the plugins page. Note: some of your EE3 shortcodes may have been changed to their EE4 equivalents, so you will need to change them back.', 'event_espresso'), |
|
99 | 99 | "<a href='$reset_db_page_url'>", |
100 | 100 | "</a>", |
101 | 101 | $most_recent_migration->slug() |
102 | 102 | ); |
103 | 103 | ?> |
104 | 104 | </p> |
105 | - <p><?php _e( "If you ever decide to re-attempt using EE4, you will again be given the option to migrate your EE3 data or not.", 'event_espresso' ); ?></p> |
|
105 | + <p><?php _e("If you ever decide to re-attempt using EE4, you will again be given the option to migrate your EE3 data or not.", 'event_espresso'); ?></p> |
|
106 | 106 | </td> |
107 | 107 | </tr> |
108 | 108 |
@@ -1,26 +1,26 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | ?> |
4 | -<h1><?php _e("Data Migration Error", "event_espresso");?></h1> |
|
5 | -<p class='error'><?php printf(__("Your last data migration had a %s FATAL ERROR, and CANNOT be continued%s.", "event_espresso"),"<b>","</b>");?></p> |
|
6 | -<a id="show-hide-migration-warnings" class="display-the-hidden"><?php _e("Show Errors", 'event_espresso');?></a> |
|
4 | +<h1><?php _e("Data Migration Error", "event_espresso"); ?></h1> |
|
5 | +<p class='error'><?php printf(__("Your last data migration had a %s FATAL ERROR, and CANNOT be continued%s.", "event_espresso"), "<b>", "</b>"); ?></p> |
|
6 | +<a id="show-hide-migration-warnings" class="display-the-hidden"><?php _e("Show Errors", 'event_espresso'); ?></a> |
|
7 | 7 | <ul class="migration-warnings" style="display:none"> |
8 | -<?php foreach($most_recent_migration->get_errors() as $error){ ?> |
|
8 | +<?php foreach ($most_recent_migration->get_errors() as $error) { ?> |
|
9 | 9 | <li><?php echo $error ?></li> |
10 | 10 | <?php }?> |
11 | 11 | </ul> |
12 | -<h2><?php _e("Fill out the below form to automatically Send Event Espresso a Crash Report", "event_espresso");?></h2> |
|
13 | -<form action='<?php echo EE_Admin_Page::add_query_args_and_nonce(array('action'=>'send_migration_crash_report'), EE_MAINTENANCE_ADMIN_URL);?>' method='post'> |
|
12 | +<h2><?php _e("Fill out the below form to automatically Send Event Espresso a Crash Report", "event_espresso"); ?></h2> |
|
13 | +<form action='<?php echo EE_Admin_Page::add_query_args_and_nonce(array('action'=>'send_migration_crash_report'), EE_MAINTENANCE_ADMIN_URL); ?>' method='post'> |
|
14 | 14 | <table class='widefat'> |
15 | - <tr><td><label for='from'><?php _e("From/Reply-To:", "event_espresso");?></label></td><td><input name='from' id='from' type='text' style="width:200px"value='<?php echo get_bloginfo('admin_email','display'); ?>'></td></tr> |
|
16 | - <tr><td><label for='from_name'><?php _e("Your Name", "event_espresso");?></label></td><td><input name='from_name' id='from_name' type='text' style="width:200px"value='<?php printf(__("Admin of %s", "event_espresso"),get_bloginfo('name','display'));?>'></td></tr> |
|
17 | - <tr><td><label for='body'><?php _e("Comments", "event_espresso");?></label></td><td><textarea name="body" id="body" class='system_status_info'><?php _e("Enter any comments about why you think the error may have occurred", "event_espresso");?></textarea> |
|
18 | - <p class='description'><?php _e("Note: the System Information report will also be added to the email's body, which contains information about your Event Espresso, Wordpress, and PHP settings which can be helpful in debugging the problem.", "event_espresso");?></p></td></tr> |
|
19 | - <tr><td colspan="2"><input type="submit" value="<?php _e("Mail Crash Report to Event Espresso", "event_espresso");?>"/></td></tr> |
|
15 | + <tr><td><label for='from'><?php _e("From/Reply-To:", "event_espresso"); ?></label></td><td><input name='from' id='from' type='text' style="width:200px"value='<?php echo get_bloginfo('admin_email', 'display'); ?>'></td></tr> |
|
16 | + <tr><td><label for='from_name'><?php _e("Your Name", "event_espresso"); ?></label></td><td><input name='from_name' id='from_name' type='text' style="width:200px"value='<?php printf(__("Admin of %s", "event_espresso"), get_bloginfo('name', 'display')); ?>'></td></tr> |
|
17 | + <tr><td><label for='body'><?php _e("Comments", "event_espresso"); ?></label></td><td><textarea name="body" id="body" class='system_status_info'><?php _e("Enter any comments about why you think the error may have occurred", "event_espresso"); ?></textarea> |
|
18 | + <p class='description'><?php _e("Note: the System Information report will also be added to the email's body, which contains information about your Event Espresso, Wordpress, and PHP settings which can be helpful in debugging the problem.", "event_espresso"); ?></p></td></tr> |
|
19 | + <tr><td colspan="2"><input type="submit" value="<?php _e("Mail Crash Report to Event Espresso", "event_espresso"); ?>"/></td></tr> |
|
20 | 20 | </table> |
21 | 21 | </form> |
22 | 22 | <br> |
23 | -<p><?php printf(__('...or copy-and-paste the below information to %1$s %2$s %3$s', "event_espresso"),'<a href="mailto:'.EE_SUPPORT_EMAIL.'">',EE_SUPPORT_EMAIL,"</a>");?></p> |
|
24 | -<textarea class="system_status_info"><?php print_r( EEM_System_Status::instance()->get_system_stati())?></textarea> |
|
25 | -<p><?php printf( __( '%1$sNext Step%2$s', 'event_espresso' ), "<a href='$next_url'>","</a>");?></p> |
|
26 | -<p><?php printf( __( '...or %1$sDON\'T send migration crash report%2$s.', 'event_espresso' ), "<a href='$next_url'>","</a>");?></p> |
|
23 | +<p><?php printf(__('...or copy-and-paste the below information to %1$s %2$s %3$s', "event_espresso"), '<a href="mailto:'.EE_SUPPORT_EMAIL.'">', EE_SUPPORT_EMAIL, "</a>"); ?></p> |
|
24 | +<textarea class="system_status_info"><?php print_r(EEM_System_Status::instance()->get_system_stati())?></textarea> |
|
25 | +<p><?php printf(__('%1$sNext Step%2$s', 'event_espresso'), "<a href='$next_url'>", "</a>"); ?></p> |
|
26 | +<p><?php printf(__('...or %1$sDON\'T send migration crash report%2$s.', 'event_espresso'), "<a href='$next_url'>", "</a>"); ?></p> |
@@ -30,8 +30,7 @@ discard block |
||
30 | 30 | </tbody> |
31 | 31 | </table> |
32 | 32 | <?php |
33 | - } |
|
34 | - else { |
|
33 | + } else { |
|
35 | 34 | ?> |
36 | 35 | <ul> |
37 | 36 | <?php |
@@ -41,7 +40,7 @@ discard block |
||
41 | 40 | </ul> |
42 | 41 | <?php |
43 | 42 | } |
44 | - }else { |
|
43 | + } else { |
|
45 | 44 | //simple value |
46 | 45 | echo $data; |
47 | 46 | } |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | }?> |
87 | 86 | </tbody> |
88 | 87 | <?php |
89 | - } |
|
90 | - else { |
|
88 | + } else { |
|
91 | 89 | ?> |
92 | 90 | <tbody> |
93 | 91 | <tr> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | function ee_resurse_into_array($data) { |
9 | 9 | if (is_object($data) || $data instanceof __PHP_Incomplete_Class) {//is_object($incomplete_class) actually returns false, hence why we check for it |
10 | - $data = (array)$data; |
|
10 | + $data = (array) $data; |
|
11 | 11 | } |
12 | 12 | if (is_array($data)) { |
13 | 13 | if (EEH_Array::is_associative_array($data)) { |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | ?> |
20 | 20 | <tr> |
21 | 21 | <td> |
22 | - <?php echo $data_key;?> |
|
22 | + <?php echo $data_key; ?> |
|
23 | 23 | </td> |
24 | 24 | <td> |
25 | - <?php ee_resurse_into_array($data_values);?> |
|
25 | + <?php ee_resurse_into_array($data_values); ?> |
|
26 | 26 | </td> |
27 | 27 | </tr> |
28 | 28 | <?php |
@@ -36,31 +36,31 @@ discard block |
||
36 | 36 | <ul> |
37 | 37 | <?php |
38 | 38 | foreach ($data as $datum) { |
39 | - echo "<li>";ee_resurse_into_array($datum);echo "</li>"; |
|
39 | + echo "<li>"; ee_resurse_into_array($datum); echo "</li>"; |
|
40 | 40 | }?> |
41 | 41 | </ul> |
42 | 42 | <?php |
43 | 43 | } |
44 | - }else { |
|
44 | + } else { |
|
45 | 45 | //simple value |
46 | 46 | echo $data; |
47 | 47 | } |
48 | 48 | } |
49 | 49 | ?> |
50 | 50 | <h1> |
51 | - <?php _e("System Information", "event_espresso");?> |
|
51 | + <?php _e("System Information", "event_espresso"); ?> |
|
52 | 52 | </h1> |
53 | 53 | <div class="padding"> |
54 | - <h2><?php _e("Raw System Data", "event_espresso");?></h2> |
|
54 | + <h2><?php _e("Raw System Data", "event_espresso"); ?></h2> |
|
55 | 55 | <textarea class="system_status_info"> |
56 | 56 | <?php print_r($system_stati)?> |
57 | 57 | </textarea> |
58 | - <h2><?php _e("System Data (formatted)", "event_espresso");?></h2> |
|
58 | + <h2><?php _e("System Data (formatted)", "event_espresso"); ?></h2> |
|
59 | 59 | <table class="widefat"> |
60 | 60 | <?php |
61 | 61 | foreach ($system_stati as $status_category_slug => $data) { |
62 | 62 | if (is_object($data)) { |
63 | - $data = (array)$data; |
|
63 | + $data = (array) $data; |
|
64 | 64 | } |
65 | 65 | ?> |
66 | 66 | <thead> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | ?> |
4 | -<h1><?php _e("You must upgrade your Event Espresso Add-ons before Migrating", "event_espresso");?></h1> |
|
5 | -<p><?php printf(__("Please %s visit the plugins page%s and upgade all Event Espresso before migrating.", "event_espresso"), "<a href='".admin_url('/plugins.php')."'>","</a>");?></p> |
|
6 | -<p><?php _e("You can also deactivate the addons, but all of their data will be lost when your database is migrated", "event_espresso");?></p> |
|
7 | 4 | \ No newline at end of file |
5 | +<h1><?php _e("You must upgrade your Event Espresso Add-ons before Migrating", "event_espresso"); ?></h1> |
|
6 | +<p><?php printf(__("Please %s visit the plugins page%s and upgade all Event Espresso before migrating.", "event_espresso"), "<a href='".admin_url('/plugins.php')."'>", "</a>"); ?></p> |
|
7 | +<p><?php _e("You can also deactivate the addons, but all of their data will be lost when your database is migrated", "event_espresso"); ?></p> |
|
8 | 8 | \ No newline at end of file |
@@ -1,29 +1,29 @@ |
||
1 | 1 | <?php if (!defined('EVENT_ESPRESSO_VERSION') ) |
2 | 2 | exit('NO direct script access allowed'); |
3 | 3 | /** |
4 | - * Event Espresso |
|
5 | - * |
|
6 | - * Event Registration and Management Plugin for Wordpress |
|
7 | - * |
|
8 | - * @package Event Espresso |
|
9 | - * @author Seth Shoultes |
|
10 | - * @copyright (c)2009-2012 Event Espresso All Rights Reserved. |
|
11 | - * @license @link http://eventespresso.com/support/terms-conditions/ ** see Plugin Licensing * * |
|
12 | - * @link http://www.eventespresso.com |
|
13 | - * @version 4.0 |
|
14 | - * |
|
15 | - * ------------------------------------------------------------------------ |
|
16 | - * |
|
17 | - * Messages_Admin_Page_Init |
|
18 | - * |
|
19 | - * for setup of the message admin pages |
|
20 | - * |
|
21 | - * @package Event Espresso |
|
22 | - * @subpackage includes/core/message/EE_Message_Admin_Page_Init.core.php |
|
23 | - * @author Darren Ethier |
|
24 | - * |
|
25 | - * ------------------------------------------------------------------------ |
|
26 | - */ |
|
4 | + * Event Espresso |
|
5 | + * |
|
6 | + * Event Registration and Management Plugin for Wordpress |
|
7 | + * |
|
8 | + * @package Event Espresso |
|
9 | + * @author Seth Shoultes |
|
10 | + * @copyright (c)2009-2012 Event Espresso All Rights Reserved. |
|
11 | + * @license @link http://eventespresso.com/support/terms-conditions/ ** see Plugin Licensing * * |
|
12 | + * @link http://www.eventespresso.com |
|
13 | + * @version 4.0 |
|
14 | + * |
|
15 | + * ------------------------------------------------------------------------ |
|
16 | + * |
|
17 | + * Messages_Admin_Page_Init |
|
18 | + * |
|
19 | + * for setup of the message admin pages |
|
20 | + * |
|
21 | + * @package Event Espresso |
|
22 | + * @subpackage includes/core/message/EE_Message_Admin_Page_Init.core.php |
|
23 | + * @author Darren Ethier |
|
24 | + * |
|
25 | + * ------------------------------------------------------------------------ |
|
26 | + */ |
|
27 | 27 | class Messages_Admin_Page_Init extends EE_Admin_Page_Init { |
28 | 28 | /** |
29 | 29 | *constructor |
@@ -1,5 +1,6 @@ |
||
1 | -<?php if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
1 | +<?php if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
2 | 2 | exit('NO direct script access allowed'); |
3 | +} |
|
3 | 4 | /** |
4 | 5 | * Event Espresso |
5 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
2 | 2 | exit('NO direct script access allowed'); |
3 | 3 | /** |
4 | 4 | * Event Espresso |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | -class Messages_Admin_Page_Init extends EE_Admin_Page_Init { |
|
27 | +class Messages_Admin_Page_Init extends EE_Admin_Page_Init { |
|
28 | 28 | /** |
29 | 29 | *constructor |
30 | 30 | *@Constructor |
@@ -33,18 +33,18 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function __construct() { |
35 | 35 | |
36 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
36 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
37 | 37 | |
38 | - if ( ! defined( 'EE_MSG_PG_SLUG' ) ) { |
|
38 | + if ( ! defined('EE_MSG_PG_SLUG')) { |
|
39 | 39 | |
40 | - define( 'EE_MSG_PG_SLUG', 'espresso_messages' ); |
|
41 | - define( 'EE_MSG_PG_NAME', ucwords( str_replace( '_', '', EE_MSG_PG_SLUG ) ) ); |
|
42 | - define( 'EE_MSG_ADMIN', EE_ADMIN_PAGES . 'messages' . DS ); |
|
43 | - define( 'EE_MSG_ADMIN_URL', admin_url( 'admin.php?page=' . EE_MSG_PG_SLUG ) ); |
|
44 | - define( 'EE_MSG_ASSETS_PATH', EE_MSG_ADMIN . 'assets' . DS ); |
|
45 | - define( 'EE_MSG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'messages/assets/' ); |
|
46 | - define( 'EE_MSG_TEMPLATE_PATH', EE_MSG_ADMIN . 'templates' . DS ); |
|
47 | - define( 'EE_MSG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'messages/templates/' ); |
|
40 | + define('EE_MSG_PG_SLUG', 'espresso_messages'); |
|
41 | + define('EE_MSG_PG_NAME', ucwords(str_replace('_', '', EE_MSG_PG_SLUG))); |
|
42 | + define('EE_MSG_ADMIN', EE_ADMIN_PAGES.'messages'.DS); |
|
43 | + define('EE_MSG_ADMIN_URL', admin_url('admin.php?page='.EE_MSG_PG_SLUG)); |
|
44 | + define('EE_MSG_ASSETS_PATH', EE_MSG_ADMIN.'assets'.DS); |
|
45 | + define('EE_MSG_ASSETS_URL', EE_ADMIN_PAGES_URL.'messages/assets/'); |
|
46 | + define('EE_MSG_TEMPLATE_PATH', EE_MSG_ADMIN.'templates'.DS); |
|
47 | + define('EE_MSG_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'messages/templates/'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | parent::__construct(); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | |
62 | 62 | protected function _set_menu_map() { |
63 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
63 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
64 | 64 | 'menu_group' => 'management', |
65 | 65 | 'menu_order' => 10, |
66 | 66 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |