Completed
Branch FET-8347-separate-logging (f2247f)
by
unknown
1350:06 queued 1338:18
created
admin_pages/maintenance/Maintenance_Admin_Page.core.php 2 patches
Braces   +11 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
215 215
 			$exception_thrown = true;
216 216
 		}
217 217
 		$current_db_state = EE_Data_Migration_Manager::instance()->ensure_current_database_state_is_set();
218
-		if($exception_thrown ||
219
-				(	$most_recent_migration &&
218
+		if ($exception_thrown ||
219
+				($most_recent_migration &&
220 220
 					$most_recent_migration instanceof EE_Data_Migration_Script_Base &&
221 221
 					$most_recent_migration->is_broken()
222
-				)){
223
-			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_was_borked_page.template.php';
224
-			$this->_template_args[ 'support_url' ] = 'http://eventespresso.com/support/forums/';
225
-			$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
-			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_upgrade_addons_before_migrating.template.php';
228
-		}else{
229
-			if($most_recent_migration &&
230
-					$most_recent_migration instanceof EE_Data_Migration_Script_Base  &&
231
-					$most_recent_migration->can_continue()){
222
+				)) {
223
+			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_migration_was_borked_page.template.php';
224
+			$this->_template_args['support_url'] = 'http://eventespresso.com/support/forums/';
225
+			$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
+			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_upgrade_addons_before_migrating.template.php';
228
+		} else {
229
+			if ($most_recent_migration &&
230
+					$most_recent_migration instanceof EE_Data_Migration_Script_Base &&
231
+					$most_recent_migration->can_continue()) {
232 232
 				$show_backup_db_text = false;
233 233
 				$show_continue_current_migration_script = true;
234 234
 				$show_most_recent_migration = true;
235
-			}elseif(isset($this->_req_data['continue_migration'])){
235
+			}elseif (isset($this->_req_data['continue_migration'])) {
236 236
 				$show_most_recent_migration = true;
237 237
 				$show_continue_current_migration_script = false;
238
-			}else{
238
+			} else {
239 239
 				$show_most_recent_migration = false;
240 240
 				$show_continue_current_migration_script = false;
241 241
 			}
242 242
 
243
-			if(isset($current_script)){
243
+			if (isset($current_script)) {
244 244
 				$migrates_to = $current_script->migrates_to_version();
245
-				$plugin_slug = $migrates_to[ 'slug' ];
246
-				$new_version = $migrates_to[ 'version' ];
247
-				$this->_template_args = array_merge($this->_template_args,array(
248
-					'current_db_state'=>  sprintf(__("EE%s (%s)", "event_espresso"), isset($current_db_state[$plugin_slug]) ? $current_db_state[$plugin_slug] : 3,$plugin_slug),
249
-					'next_db_state'=>isset($current_script) ? sprintf(__("EE%s (%s)", 'event_espresso'),$new_version,$plugin_slug) : NULL));
245
+				$plugin_slug = $migrates_to['slug'];
246
+				$new_version = $migrates_to['version'];
247
+				$this->_template_args = array_merge($this->_template_args, array(
248
+					'current_db_state'=>  sprintf(__("EE%s (%s)", "event_espresso"), isset($current_db_state[$plugin_slug]) ? $current_db_state[$plugin_slug] : 3, $plugin_slug),
249
+					'next_db_state'=>isset($current_script) ? sprintf(__("EE%s (%s)", 'event_espresso'), $new_version, $plugin_slug) : NULL));
250 250
 			}
251 251
 
252
-			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_migration_page.template.php';
253
-			$this->_template_args = array_merge($this->_template_args,array(
254
-			'show_most_recent_migration' => $show_most_recent_migration,//flag for showing the most recent migration's status and/or errors
255
-			'show_migration_progress' => $show_migration_progress,//flag for showing the option to run migrations and see their progress
256
-			'show_backup_db_text' => $show_backup_db_text,//flag for showing text telling the user to backup their DB
257
-			'show_maintenance_switch'=> $show_maintenance_switch,//flag for showing the option to change maintenance mode between levels 0 and 1
258
-			'script_names'=>$script_names,//array of names of scripts that have run
259
-			'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
252
+			$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_migration_page.template.php';
253
+			$this->_template_args = array_merge($this->_template_args, array(
254
+			'show_most_recent_migration' => $show_most_recent_migration, //flag for showing the most recent migration's status and/or errors
255
+			'show_migration_progress' => $show_migration_progress, //flag for showing the option to run migrations and see their progress
256
+			'show_backup_db_text' => $show_backup_db_text, //flag for showing text telling the user to backup their DB
257
+			'show_maintenance_switch'=> $show_maintenance_switch, //flag for showing the option to change maintenance mode between levels 0 and 1
258
+			'script_names'=>$script_names, //array of names of scripts that have run
259
+			'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
260 260
 			'reset_db_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL),
261
-			'update_migration_script_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'change_maintenance_level'),EE_MAINTENANCE_ADMIN_URL),
262
-			'ultimate_db_state'=>  sprintf(__("EE%s", 'event_espresso'),espresso_version()),
261
+			'update_migration_script_page_link' => EE_Admin_Page::add_query_args_and_nonce(array('action'=>'change_maintenance_level'), EE_MAINTENANCE_ADMIN_URL),
262
+			'ultimate_db_state'=>  sprintf(__("EE%s", 'event_espresso'), espresso_version()),
263 263
 		));
264 264
 		//make sure we have the form fields helper available. It usually is, but sometimes it isn't
265
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
265
+		EE_Registry::instance()->load_helper('Form_Fields');
266 266
 		//localize script stuff
267 267
 		wp_localize_script('ee-maintenance', 'ee_maintenance', array(
268 268
 			'migrating'=>  __("Migrating...", "event_espresso"),
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			'status_fatal_error'=>  EE_Data_Migration_Manager::status_fatal_error,
274 274
 			'status_completed'=>  EE_Data_Migration_Manager::status_completed));
275 275
 		}
276
-		$this->_template_args['most_recent_migration'] = $most_recent_migration;//the actual most recently ran migration
276
+		$this->_template_args['most_recent_migration'] = $most_recent_migration; //the actual most recently ran migration
277 277
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
278 278
 		$this->display_admin_page_with_sidebar();
279 279
 	}
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	/**
284 284
 	 * returns JSON and executes another step of the currently-executing data migration (called via ajax)
285 285
 	 */
286
-	public function migration_step(){
286
+	public function migration_step() {
287 287
 		$this->_template_args['data'] = EE_Data_Migration_Manager::instance()->response_to_migration_ajax_request();
288 288
 		$this->_return_json();
289 289
 	}
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 	 * Can be used by js when it notices a response with HTML in it in order
295 295
 	 * to log the malformed response
296 296
 	 */
297
-	public function add_error_to_migrations_ran(){
297
+	public function add_error_to_migrations_ran() {
298 298
 		EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($this->_req_data['message']);
299 299
 		$this->_template_args['data'] = array('ok'=>true);
300 300
 		$this->_return_json();
@@ -305,14 +305,14 @@  discard block
 block discarded – undo
305 305
 	/**
306 306
 	 * changes the maintenance level, provided there are still no migration scripts that shoudl run
307 307
 	 */
308
-	public function _change_maintenance_level(){
308
+	public function _change_maintenance_level() {
309 309
 		$new_level = intval($this->_req_data['maintenance_mode_level']);
310
-		if( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()){
310
+		if ( ! EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts()) {
311 311
 			EE_Maintenance_Mode::instance()->set_maintenance_level($new_level);
312 312
 			$success = true;
313
-		}else{
313
+		} else {
314 314
 			EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
315
-			$success= false;
315
+			$success = false;
316 316
 		}
317 317
 		$this->_redirect_after_action($success, 'Maintenance Mode', __("Updated", "event_espresso"));
318 318
 	}
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 	/**
323 323
 	 * a tab with options for reseting and/or deleting EE data
324 324
 	 */
325
-	public function _data_reset_and_delete(){
326
-		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_data_reset_and_delete.template.php';
327
-		$this->_template_args['reset_capabilities_button'] = $this->get_action_link_or_button( 'reset_capabilities', 'reset_capabilities', array(),  'button button-primary' );
325
+	public function _data_reset_and_delete() {
326
+		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_data_reset_and_delete.template.php';
327
+		$this->_template_args['reset_capabilities_button'] = $this->get_action_link_or_button('reset_capabilities', 'reset_capabilities', array(), 'button button-primary');
328 328
 		$this->_template_args['delete_db_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'delete_db'), EE_MAINTENANCE_ADMIN_URL);
329 329
 		$this->_template_args['reset_db_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL);
330 330
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
@@ -334,9 +334,9 @@  discard block
 block discarded – undo
334 334
 
335 335
 
336 336
 	protected function _reset_capabilities() {
337
-		EE_Registry::instance()->CAP->init_caps( true );
338
-		EE_Error::add_success( __('Default Event Espresso capabilities have been restored for all current roles.', 'event_espresso' ) );
339
-		$this->_redirect_after_action( FALSE, '', '', array( 'action' => 'data_reset' ), TRUE );
337
+		EE_Registry::instance()->CAP->init_caps(true);
338
+		EE_Error::add_success(__('Default Event Espresso capabilities have been restored for all current roles.', 'event_espresso'));
339
+		$this->_redirect_after_action(FALSE, '', '', array('action' => 'data_reset'), TRUE);
340 340
 	}
341 341
 
342 342
 	/**
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 	 */
347 347
 	protected function _reattempt_migration() {
348 348
 		EE_Data_Migration_Manager::instance()->reattempt();
349
-		$this->_redirect_after_action( FALSE, '', '', array( 'action' => 'default' ), TRUE );
349
+		$this->_redirect_after_action(FALSE, '', '', array('action' => 'default'), TRUE);
350 350
 	}
351 351
 
352 352
 
@@ -355,8 +355,8 @@  discard block
 block discarded – undo
355 355
 	/**
356 356
 	 * shows the big ol' System Information page
357 357
 	 */
358
-	public function _system_status(){
359
-		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_system_stati_page.template.php';
358
+	public function _system_status() {
359
+		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_system_stati_page.template.php';
360 360
 		$this->_template_args['system_stati'] = EEM_System_Status::instance()->get_system_stati();
361 361
 		EE_Registry::instance()->load_helper('Array');
362 362
 		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
@@ -365,30 +365,30 @@  discard block
 block discarded – undo
365 365
 
366 366
 
367 367
 
368
-	public function _send_migration_crash_report(){
368
+	public function _send_migration_crash_report() {
369 369
 		$from = $this->_req_data['from'];
370 370
 		$from_name = $this->_req_data['from_name'];
371 371
 		$body = $this->_req_data['body'];
372
-		try{
372
+		try {
373 373
 		$success = wp_mail(EE_SUPPORT_EMAIL,
374 374
 				'Migration Crash Report',
375
-				$body."/r/n<br>".  print_r(EEM_System_Status::instance()->get_system_stati(),true),
375
+				$body."/r/n<br>".print_r(EEM_System_Status::instance()->get_system_stati(), true),
376 376
 				array(
377 377
 					"from:$from_name<$from>",
378 378
 //					'content-type:text/html charset=UTF-8'
379 379
 					));
380
-		}catch( Exception $e ){
380
+		} catch (Exception $e) {
381 381
 			$success = FALSE;
382 382
 		}
383
-		$this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"),array('success'=>$success,'action'=>'confirm_migration_crash_report_sent'));
383
+		$this->_redirect_after_action($success, __("Migration Crash Report", "event_espresso"), __("sent", "event_espresso"), array('success'=>$success, 'action'=>'confirm_migration_crash_report_sent'));
384 384
 	}
385 385
 
386 386
 
387 387
 
388
-	public function _confirm_migration_crash_report_sent(){
389
-		try{
388
+	public function _confirm_migration_crash_report_sent() {
389
+		try {
390 390
 			$most_recent_migration = EE_Data_Migration_Manager::instance()->get_last_ran_script(true);
391
-		}catch(EE_Error $e){
391
+		} catch (EE_Error $e) {
392 392
 
393 393
 			EE_Data_Migration_Manager::instance()->add_error_to_migrations_ran($e->getMessage());
394 394
 			//now, just so we can display the page correctly, make a error migration script stage object
@@ -396,14 +396,14 @@  discard block
 block discarded – undo
396 396
 			$most_recent_migration = new EE_DMS_Unknown_1_0_0();
397 397
 			$most_recent_migration->add_error($e->getMessage());
398 398
 		}
399
-		$success = $this->_req_data['success']=='1' ? true : false;
399
+		$success = $this->_req_data['success'] == '1' ? true : false;
400 400
 		$this->_template_args['success'] = $success;
401
-		$this->_template_args[ 'most_recent_migration' ] = $most_recent_migration;
401
+		$this->_template_args['most_recent_migration'] = $most_recent_migration;
402 402
 		$this->_template_args['reset_db_action_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'reset_db'), EE_MAINTENANCE_ADMIN_URL);
403
-		$this->_template_args[ 'reset_db_page_url' ] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'data_reset'), EE_MAINTENANCE_ADMIN_URL);
404
-		$this->_template_args[ 'reattempt_action_url' ] = EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'reattempt_migration'), EE_MAINTENANCE_ADMIN_URL );
405
-		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH . 'ee_confirm_migration_crash_report_sent.template.php';
406
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path,$this->_template_args,TRUE);
403
+		$this->_template_args['reset_db_page_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'data_reset'), EE_MAINTENANCE_ADMIN_URL);
404
+		$this->_template_args['reattempt_action_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'reattempt_migration'), EE_MAINTENANCE_ADMIN_URL);
405
+		$this->_template_path = EE_MAINTENANCE_TEMPLATE_PATH.'ee_confirm_migration_crash_report_sent.template.php';
406
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($this->_template_path, $this->_template_args, TRUE);
407 407
 		$this->display_admin_page_with_sidebar();
408 408
 	}
409 409
 
@@ -416,18 +416,18 @@  discard block
 block discarded – undo
416 416
 	 * @param boolean $nuke_old_ee4_data controls whether or not we
417 417
 	 * destroy the old ee4 data, or just try initializing ee4 default data
418 418
 	 */
419
-	public function _reset_db( $nuke_old_ee4_data = TRUE ){
419
+	public function _reset_db($nuke_old_ee4_data = TRUE) {
420 420
 		EE_Registry::instance()->load_helper('Activation');
421 421
 		EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance);
422 422
 
423
-		if( $nuke_old_ee4_data ){
423
+		if ($nuke_old_ee4_data) {
424 424
 			EEH_Activation::delete_all_espresso_cpt_data();
425
-			EEH_Activation::delete_all_espresso_tables_and_data( FALSE );
425
+			EEH_Activation::delete_all_espresso_tables_and_data(FALSE);
426 426
 		}
427 427
 		//make sure when we reset the registry's config that it
428 428
 		//switches to using the new singleton
429
-		EE_Registry::instance()->CFG = EE_Registry::instance()->CFG->reset( TRUE );
430
-		EE_System::instance()->initialize_db_if_no_migrations_required( TRUE );
429
+		EE_Registry::instance()->CFG = EE_Registry::instance()->CFG->reset(TRUE);
430
+		EE_System::instance()->initialize_db_if_no_migrations_required(TRUE);
431 431
 		EE_System::instance()->redirect_to_about_ee();
432 432
 	}
433 433
 
@@ -436,20 +436,20 @@  discard block
 block discarded – undo
436 436
 	/**
437 437
 	 * Deletes ALL EE tables, Records, and Options from the database.
438 438
 	 */
439
-	public function _delete_db(){
439
+	public function _delete_db() {
440 440
 		EE_Registry::instance()->load_helper('Activation');
441 441
 		EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance);
442 442
 		EEH_Activation::delete_all_espresso_cpt_data();
443 443
 		EEH_Activation::delete_all_espresso_tables_and_data();
444 444
 		EEH_Activation::deactivate_event_espresso();
445
-		wp_safe_redirect( admin_url( 'plugins.php' ));
445
+		wp_safe_redirect(admin_url('plugins.php'));
446 446
 		exit;
447 447
 	}
448 448
 
449 449
 	/**
450 450
 	 * sets up EE4 to rerun the migrations from ee3 to ee4
451 451
 	 */
452
-	public function _rerun_migration_from_ee3(){
452
+	public function _rerun_migration_from_ee3() {
453 453
 		EE_Registry::instance()->load_helper('Activation');
454 454
 		EE_Maintenance_Mode::instance()->set_maintenance_level(EE_Maintenance_Mode::level_0_not_in_maintenance);
455 455
 		EEH_Activation::delete_all_espresso_cpt_data();
@@ -477,9 +477,9 @@  discard block
 block discarded – undo
477 477
 		wp_enqueue_script('ee_admin_js');
478 478
 //		wp_enqueue_media();
479 479
 //		wp_enqueue_script('media-upload');
480
-		wp_enqueue_script('ee-maintenance',EE_MAINTENANCE_ASSETS_URL.'/ee-maintenance.js',array('jquery'),EVENT_ESPRESSO_VERSION,true);
480
+		wp_enqueue_script('ee-maintenance', EE_MAINTENANCE_ASSETS_URL.'/ee-maintenance.js', array('jquery'), EVENT_ESPRESSO_VERSION, true);
481 481
 
482
-		wp_register_style( 'espresso_maintenance', EE_MAINTENANCE_ASSETS_URL . 'ee-maintenance.css', array(), EVENT_ESPRESSO_VERSION );
482
+		wp_register_style('espresso_maintenance', EE_MAINTENANCE_ASSETS_URL.'ee-maintenance.css', array(), EVENT_ESPRESSO_VERSION);
483 483
 		wp_enqueue_style('espresso_maintenance');
484 484
 	}
485 485
 
Please login to merge, or discard this patch.
maintenance/templates/ee_confirm_migration_crash_report_sent.template.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,39 +5,39 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
admin_pages/maintenance/templates/ee_migration_was_borked_page.template.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
admin_pages/maintenance/templates/ee_system_stati_page.template.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,22 +36,22 @@  discard block
 block discarded – undo
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
-	<h3 class="espresso-header"><?php _e("Raw System Data", "event_espresso");?></h3>
54
+	<h3 class="espresso-header"><?php _e("Raw System Data", "event_espresso"); ?></h3>
55 55
 	<textarea class="system_status_info">
56 56
 		<?php print_r($system_stati)?>
57 57
 	</textarea>
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		<?php
60 60
 		foreach ($system_stati as $status_category_slug => $data) {
61 61
 			if (is_object($data)) {
62
-				$data = (array)$data;
62
+				$data = (array) $data;
63 63
 			}
64 64
 			?>
65 65
 			<thead>
Please login to merge, or discard this patch.
Braces   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
86 85
 				}?>
87 86
 			</tbody>
88 87
 			<?php
89
-			}
90
-			else {
88
+			} else {
91 89
 				?>
92 90
 				<tbody>
93 91
 					<tr>
Please login to merge, or discard this patch.
maintenance/templates/ee_upgrade_addons_before_migrating.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
admin_pages/messages/Messages_Template_List_Table.class.php 2 patches
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 /**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 	protected function _setup_data() {
34
-		$this->_data = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, FALSE);
35
-		$this->_all_data_count = $this->_admin_page->get_message_templates( $this->_per_page, $this->_view, TRUE, TRUE );
34
+		$this->_data = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, FALSE);
35
+		$this->_all_data_count = $this->_admin_page->get_message_templates($this->_per_page, $this->_view, TRUE, TRUE);
36 36
 	}
37 37
 
38 38
 
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 
42 42
 	protected function _set_properties() {
43 43
 		$this->_wp_list_args = array(
44
-			'singular' => __('Message Template Group', 'event_espresso' ),
45
-			'plural' => __('Message Template', 'event_espresso' ),
44
+			'singular' => __('Message Template Group', 'event_espresso'),
45
+			'plural' => __('Message Template', 'event_espresso'),
46 46
 			'ajax' => TRUE, //for now,
47 47
 			'screen' => $this->_admin_page->get_current_screen()->id
48 48
 			);
49 49
 		$this->_columns = array(
50 50
 			//'cb' => '<input type="checkbox" />', //no deleting default (global) templates!
51 51
 			'message_type' => __('Message Type', 'event_espresso'),
52
-			'messenger' => __( 'Messenger', 'event_espresso'),
53
-			'description' => __( 'Description', 'event_espresso' ),
52
+			'messenger' => __('Messenger', 'event_espresso'),
53
+			'description' => __('Description', 'event_espresso'),
54 54
 			//'messages_sent' => __( 'Total Sent', 'event_espresso' ) //todo this will come later when we've got message tracking in place.
55 55
 			);
56 56
 
57 57
 		$this->_sortable_columns = array(
58
-			'messenger' => array( 'MTP_messenger' => TRUE ),
58
+			'messenger' => array('MTP_messenger' => TRUE),
59 59
 			//'message_type' => array( 'MTP_message_type' => FALSE )
60 60
 			);
61 61
 
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
 	 *
75 75
 	 * @return string
76 76
 	 */
77
-	public function single_row( $item ) {
77
+	public function single_row($item) {
78 78
 		$message_type = $item->message_type_obj();
79 79
 		$messenger = $item->messenger_obj();
80 80
 
81
-		if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger ) {
81
+		if ( ! $message_type instanceof EE_message_type || ! $messenger instanceof EE_messenger) {
82 82
 			echo '';
83 83
 			return;
84 84
 		}
85 85
 
86
-		parent::single_row( $item );
86
+		parent::single_row($item);
87 87
 	}
88 88
 
89 89
 
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 
93 93
 	protected function _get_table_filters() {
94 94
 		$filters = array();
95
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
95
+		EE_Registry::instance()->load_helper('Form_Fields');
96 96
 		$messengers = $this->_admin_page->get_active_messengers();
97 97
 		$message_types = $this->_admin_page->get_installed_message_types();
98 98
 
99 99
 
100 100
 		//setup messengers for selects
101
-		$i=1;
101
+		$i = 1;
102 102
 		$m_values[0]['id'] = 'all';
103
-		$m_values[0]['text'] = __('All Messengers', 'event_espresso' );
104
-		foreach ( $messengers as $messenger => $args ) {
103
+		$m_values[0]['text'] = __('All Messengers', 'event_espresso');
104
+		foreach ($messengers as $messenger => $args) {
105 105
 			$m_values[$i]['id'] = $messenger;
106 106
 			$m_values[$i]['text'] = ucwords($args['obj']->label['singular']);
107 107
 			$i++;
108 108
 		}
109 109
 
110 110
 		//lets do the same for message types
111
-		$i=1;
112
-		foreach ( $message_types as $message_type => $args ) {
111
+		$i = 1;
112
+		foreach ($message_types as $message_type => $args) {
113 113
 			$mt_values[$i]['id'] = $message_type;
114 114
 			$mt_values[$i]['text'] = ucwords($args['obj']->label['singular']);
115 115
 			$i++;
@@ -125,28 +125,28 @@  discard block
 block discarded – undo
125 125
 			'text' => __('Show All', 'event_espresso')
126 126
 			);
127 127
 
128
-		$msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array();
129
-		$mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array();
128
+		$msgr_filters = ! empty($m_values) ? array_merge($msgr_default, $m_values) : array();
129
+		$mt_filters = ! empty($mt_values) ? array_merge($mt_default, $mt_values) : array();
130 130
 
131
-		if ( empty( $m_values ) )
131
+		if (empty($m_values))
132 132
 			$msgr_filters[0] = array(
133 133
 				'id' => 'no_messenger_options',
134 134
 				'text' => __('No Messengers active', 'event_espresso')
135 135
 				);
136 136
 
137
-		if ( empty($mt_values) )
137
+		if (empty($mt_values))
138 138
 			$mt_filters[0] = array(
139 139
 				'id' => 'no_message_type_options',
140 140
 				'text' => __('No Message Types active', 'event_espresso')
141 141
 				);
142 142
 
143
-		if ( count( $messengers ) >= 1  && !empty( $m_values ) ) {
144
-			unset( $msgr_filters[0] );
145
-			$msgr_filters = array_values( $msgr_filters ); //reindex keys
143
+		if (count($messengers) >= 1 && ! empty($m_values)) {
144
+			unset($msgr_filters[0]);
145
+			$msgr_filters = array_values($msgr_filters); //reindex keys
146 146
 		}
147 147
 
148
-		$filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key( $this->_req_data['ee_messenger_filter_by']) : '' );
149
-		$filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key( $this->_req_data['ee_message_type_filter_by']) : '');
148
+		$filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key($this->_req_data['ee_messenger_filter_by']) : '');
149
+		$filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key($this->_req_data['ee_message_type_filter_by']) : '');
150 150
 		return $filters;
151 151
 	}
152 152
 
@@ -154,20 +154,20 @@  discard block
 block discarded – undo
154 154
 	 * we're just removing the search box for message templates, not needed.
155 155
 	 * @return string (empty);
156 156
 	 */
157
-	function search_box( $text, $input_id ) {
157
+	function search_box($text, $input_id) {
158 158
 		return '';
159 159
 	}
160 160
 
161 161
 
162 162
 	protected function _add_view_counts() {
163
-		foreach ( $this->_views as $view => $args )  {
164
-			$this->_views[$view]['count'] = $this->_admin_page->get_message_templates( $this->_per_page, $view, TRUE, TRUE );
163
+		foreach ($this->_views as $view => $args) {
164
+			$this->_views[$view]['count'] = $this->_admin_page->get_message_templates($this->_per_page, $view, TRUE, TRUE);
165 165
 		}
166 166
 	}
167 167
 
168 168
 
169 169
 
170
-	public function column_cb( $item ) {
170
+	public function column_cb($item) {
171 171
 		return '';
172 172
 	}
173 173
 
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
 
176 176
 
177 177
 
178
-	function column_description( $item ) {
179
-		return '<p>' . $item->message_type_obj()->description . '</p>';
178
+	function column_description($item) {
179
+		return '<p>'.$item->message_type_obj()->description.'</p>';
180 180
 	}
181 181
 
182 182
 
@@ -191,27 +191,27 @@  discard block
 block discarded – undo
191 191
 		$actions = array();
192 192
 
193 193
 		// edit link but only if item isn't trashed.
194
-		if ( !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ) {
195
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_message_template', 'id'=>$item->GRP_ID() ), EE_MSG_ADMIN_URL );
196
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template Group', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
194
+		if ( ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID())) {
195
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID()), EE_MSG_ADMIN_URL);
196
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template Group', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
197 197
 		}
198 198
 
199
-		$name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Template Group', 'event_espresso' ) . '">' . ucwords( $item->messenger_obj()->label['singular'] ) . '</a>' : ucwords( $item->messenger_obj()->label['singular'] );
199
+		$name_link = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Template Group', 'event_espresso').'">'.ucwords($item->messenger_obj()->label['singular']).'</a>' : ucwords($item->messenger_obj()->label['singular']);
200 200
 
201 201
 		//we want to display the contexts in here so we need to set them up
202 202
 		$c_label = $item->context_label();
203 203
 		$c_configs = $item->contexts_config();
204 204
 		$ctxt = array();
205 205
 		$context_templates = $item->context_templates();
206
-		foreach ( $context_templates as $context => $template_fields ) {
207
-			$mtp_to = !empty( $context_templates[$context]['to'] ) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL;
208
-			$inactive = empty( $mtp_to ) && !empty( $context_templates[$context]['to'] ) ? ' class="mtp-inactive"' : '';
206
+		foreach ($context_templates as $context => $template_fields) {
207
+			$mtp_to = ! empty($context_templates[$context]['to']) && $context_templates[$context]['to'] instanceof EE_Message_Template ? $context_templates[$context]['to']->get('MTP_content') : NULL;
208
+			$inactive = empty($mtp_to) && ! empty($context_templates[$context]['to']) ? ' class="mtp-inactive"' : '';
209 209
 			$context_title = ucwords($c_configs[$context]['label']);
210
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL );
211
-			$ctxt[] = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? '<a' . $inactive . ' href="'. $edit_link . '" title="' . esc_attr__('Edit Context', 'event_espresso') . '">' . $context_title . '</a>' : $context_title;
210
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_message_template', 'id'=>$item->GRP_ID(), 'context' => $context), EE_MSG_ADMIN_URL);
211
+			$ctxt[] = EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? '<a'.$inactive.' href="'.$edit_link.'" title="'.esc_attr__('Edit Context', 'event_espresso').'">'.$context_title.'</a>' : $context_title;
212 212
 		}
213 213
 
214
-		$ctx_content = !$item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $item->ID() ) ? sprintf( __('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural']) ) . implode(' | ', $ctxt) : '';
214
+		$ctx_content = ! $item->get('MTP_deleted') && EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $item->ID()) ? sprintf(__('<strong>%s:</strong> ', 'event_espresso'), ucwords($c_label['plural'])).implode(' | ', $ctxt) : '';
215 215
 
216 216
 
217 217
 		//Return the name contents
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 										/* $1%s */ $name_link,
220 220
 										/* $2%s */ $item->GRP_ID(),
221 221
 										/* %4$s */ $ctx_content,
222
-										/* $3%s */ $this->row_actions( $actions )
222
+										/* $3%s */ $this->row_actions($actions)
223 223
 		);
224 224
 	}
225 225
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	 * @return string       message_type name
230 230
 	 */
231 231
 	function column_message_type($item) {
232
-		return ucwords($item->message_type_obj()->label['singular'] );
232
+		return ucwords($item->message_type_obj()->label['singular']);
233 233
 	}
234 234
 
235 235
 
Please login to merge, or discard this patch.
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
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
@@ -128,17 +129,19 @@  discard block
 block discarded – undo
128 129
 		$msgr_filters = !empty($m_values) ? array_merge( $msgr_default, $m_values ) : array();
129 130
 		$mt_filters = !empty($mt_values) ? array_merge( $mt_default, $mt_values ) : array();
130 131
 
131
-		if ( empty( $m_values ) )
132
-			$msgr_filters[0] = array(
132
+		if ( empty( $m_values ) ) {
133
+					$msgr_filters[0] = array(
133 134
 				'id' => 'no_messenger_options',
134 135
 				'text' => __('No Messengers active', 'event_espresso')
135 136
 				);
137
+		}
136 138
 
137
-		if ( empty($mt_values) )
138
-			$mt_filters[0] = array(
139
+		if ( empty($mt_values) ) {
140
+					$mt_filters[0] = array(
139 141
 				'id' => 'no_message_type_options',
140 142
 				'text' => __('No Message Types active', 'event_espresso')
141 143
 				);
144
+		}
142 145
 
143 146
 		if ( count( $messengers ) >= 1  && !empty( $m_values ) ) {
144 147
 			unset( $msgr_filters[0] );
Please login to merge, or discard this patch.
admin_pages/messages/espresso_events_Messages_Hooks.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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,7 +30,7 @@  discard block
 block discarded – undo
30 30
 class espresso_events_Messages_Hooks extends EE_Admin_Hooks {
31 31
 
32 32
 
33
-	public function __construct( EE_Admin_Page $admin_page ) {
33
+	public function __construct(EE_Admin_Page $admin_page) {
34 34
 		parent::__construct($admin_page);
35 35
 	}
36 36
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin_pages/messages/help_tabs/messages_overview_messengers.help_tab.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <h3><?php _e('Messengers', 'event_espresso'); ?></h3>
2 2
 <p>
3
-<?php printf( __('Messengers are the vehicles that deliver messages to individuals (recipients). By default, every install of Event Espresso has the %sEmail%s messenger active. The Email messenger is a vehicle for delivering messages.  Other possible vehicles might be any social media applications, 3rd party API\'s etc.', 'event_espresso'), '<strong>', '</strong>' ); ?>
3
+<?php printf(__('Messengers are the vehicles that deliver messages to individuals (recipients). By default, every install of Event Espresso has the %sEmail%s messenger active. The Email messenger is a vehicle for delivering messages.  Other possible vehicles might be any social media applications, 3rd party API\'s etc.', 'event_espresso'), '<strong>', '</strong>'); ?>
4 4
 </p>
5 5
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/messages/help_tabs/messages_settings_messengers.help_tab.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <h3><?php _e('Activating / Deactivating Messengers', 'event_espresso'); ?></h3>
2 2
 <p><?php _e('You can select Messengers via the tabs across the top of the settings page. The available messengers you see depends on what version of Event Espresso you have and what addons are installed. Every install include an "Email" messenger tab.  When you click one of those tabs it will display that messenger.', 'event_espresso'); ?></p>
3 3
 <p><?php _e('There are two ways to determine whether a messenger is active or not.  The first way is via the messenger tab itself.', 'event_espresso'); ?></p>
4
-<p><?php echo _e('The green colored gear <img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '" alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" /> indicates that this messenger is currently active.', 'event_espresso'); echo _e(' The white colored gear <img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png' . '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" /> indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.', 'event_espresso'); ?></p>
4
+<p><?php echo _e('The green colored gear <img class="inline-text" src="'.EE_MSG_ASSETS_URL.'images/email-tab-active.png'.'" alt="'.esc_attr__('Active Email Tab', 'event_espresso').'" /> indicates that this messenger is currently active.', 'event_espresso'); echo _e(' The white colored gear <img class="inline-text" src="'.EE_MSG_ASSETS_URL.'images/email-tab-inactive.png'.'" alt="'.esc_attr__('Inactive Email Tab', 'event_espresso').'" /> indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.', 'event_espresso'); ?></p>
5 5
 <p><?php _e('The second way to determine whether a messenger is active or not is via the "on/off" button in the top right corner of the active messenger displayed content:', 'event_espresso'); ?></p>
6
-<p><?php printf( __('%1$s means of course that the messenger is active and %2$s means the messenger is inactive.', 'event_espresso'), '<div class="switch"><input id="ee-on-off-toggle-on" class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" checked="checked" disabled><label for="ee-on-off-toggle-on"></label></div>', '<div class="switch"><input id="ee-on-off-toggle-on" class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" disabled><label for="ee-on-off-toggle-on"></label></div>' ); ?></p>
7
-<p><?php _e( 'The on/off toggle is also what you use to activate or deactivate a messenger.', 'event_espresso' ); ?></p>
8
-<p><?php _e( 'What happens when you click the toggle to activate is the messenger is activated and the system determines what default message types are activated with the messenger.  Then, if there are any default settings for either the messenger or message types those settings are saved.  Next, the system will generate any default templates (if none have been generated before, if there are previously generated templates then they are reactivated).  Finally, you will see the display change to reflect that the messenger is active. If the messenger has settings you can modify them then. Any message types that have settings will also automatically expand so you can see the default settings and make any changes as necessary to fit your needs. Usually the defaults are sufficient however.', 'event_espresso'); ?></p>
9
-<p><?php _e( 'When you deactivate a messenger, the system will first check if there are any custom event templates for that messenger. If there are you will be unable to deactivate the messenger. This is a fail safe to make sure you know that no messages will go out for those specific events so you don\'t accidentally deactivate.  If this check passes, then the system will deactivate any global templates for that messenger (note the templates are not erased, they just become inactive, so if you decide to reactivate the messenger later all your customizations are preserved). Then the display will change to reflect the deactivation.', 'event_espresso'); ?></p>
6
+<p><?php printf(__('%1$s means of course that the messenger is active and %2$s means the messenger is inactive.', 'event_espresso'), '<div class="switch"><input id="ee-on-off-toggle-on" class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" checked="checked" disabled><label for="ee-on-off-toggle-on"></label></div>', '<div class="switch"><input id="ee-on-off-toggle-on" class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" disabled><label for="ee-on-off-toggle-on"></label></div>'); ?></p>
7
+<p><?php _e('The on/off toggle is also what you use to activate or deactivate a messenger.', 'event_espresso'); ?></p>
8
+<p><?php _e('What happens when you click the toggle to activate is the messenger is activated and the system determines what default message types are activated with the messenger.  Then, if there are any default settings for either the messenger or message types those settings are saved.  Next, the system will generate any default templates (if none have been generated before, if there are previously generated templates then they are reactivated).  Finally, you will see the display change to reflect that the messenger is active. If the messenger has settings you can modify them then. Any message types that have settings will also automatically expand so you can see the default settings and make any changes as necessary to fit your needs. Usually the defaults are sufficient however.', 'event_espresso'); ?></p>
9
+<p><?php _e('When you deactivate a messenger, the system will first check if there are any custom event templates for that messenger. If there are you will be unable to deactivate the messenger. This is a fail safe to make sure you know that no messages will go out for those specific events so you don\'t accidentally deactivate.  If this check passes, then the system will deactivate any global templates for that messenger (note the templates are not erased, they just become inactive, so if you decide to reactivate the messenger later all your customizations are preserved). Then the display will change to reflect the deactivation.', 'event_espresso'); ?></p>
10 10
 <p><strong><?php _e('Important', 'event_espresso'); ?></strong><br />
11 11
 <?php _e('Although customizations made to global templates are preserved when a messenger is deactivated, any settings for that messenger (or the message types that were attached to it) are lost on deactivation.  Also, once you deactivate a messenger, no more messages will be delivered using that messenger for any of your events.', 'event_espresso'); ?></p>
Please login to merge, or discard this patch.