Completed
Branch BUG-10236-FIX-RESET-CAPABILITI... (cbd980)
by
unknown
26:22 queued 14:04
created
defaults/default/email_registration_summary_event_list.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 		<tbody>
4 4
 			<tr>
5 5
 				<td>
6
-					<p class="callout"><strong><?php _e( 'Event:', 'event_espresso' ); ?> [EVENT_LINK]</strong></p>
6
+					<p class="callout"><strong><?php _e('Event:', 'event_espresso'); ?> [EVENT_LINK]</strong></p>
7 7
 				</td>
8 8
 			</tr>
9 9
 		</tbody>
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 			<tbody>
17 17
 				<tr>
18 18
 					<td>
19
-						<h3><?php _e( 'Registrant(s):', 'event_espresso' ); ?></h3>
19
+						<h3><?php _e('Registrant(s):', 'event_espresso'); ?></h3>
20 20
 						[ATTENDEE_LIST]
21 21
 					</td>
22 22
 				</tr>
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_To_Generate_From_Request.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
 	 * @param   EE_Message_Resource_Manager $message_resource_manager
39 39
 	 * @param   EE_Request_Handler 			$request
40 40
 	 */
41
-	public function __construct( EE_Message_Resource_Manager $message_resource_manager, EE_Request_Handler $request ) {
41
+	public function __construct(EE_Message_Resource_Manager $message_resource_manager, EE_Request_Handler $request) {
42 42
 		parent::__construct(
43
-			$request->get( 'gen_msgr' ),
44
-			$request->get( 'message_type' ),
43
+			$request->get('gen_msgr'),
44
+			$request->get('message_type'),
45 45
 			array(),
46
-			$request->get( 'context' )
46
+			$request->get('context')
47 47
 		);
48
-		if ( ! $this->valid() ) {
48
+		if ( ! $this->valid()) {
49 49
 			return;
50 50
 		}
51
-		$this->_sending_messenger = $message_resource_manager->get_active_messenger( $request->get( 'snd_msgr' ) );
52
-		$this->token = $request->get( 'token' );
51
+		$this->_sending_messenger = $message_resource_manager->get_active_messenger($request->get('snd_msgr'));
52
+		$this->token = $request->get('token');
53 53
 		$this->_validate_request();
54
-		$this->_data = $this->_get_data_from_request( $request->get( 'id' ) );
54
+		$this->_data = $this->_get_data_from_request($request->get('id'));
55 55
 	}
56 56
 
57 57
 
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
 			! $this->_sending_messenger instanceof EE_messenger
76 76
 			|| ! $this->_messenger instanceof EE_messenger
77 77
 			|| ! $this->_message_type instanceof EE_message_type
78
-			|| empty( $this->_context )
79
-			|| empty( $this->token )
78
+			|| empty($this->_context)
79
+			|| empty($this->token)
80 80
 		) {
81
-			throw new EE_Error( __( 'The request for the "msg_url_trigger" route has a malformed url.', 'event_espresso' ) );
81
+			throw new EE_Error(__('The request for the "msg_url_trigger" route has a malformed url.', 'event_espresso'));
82 82
 		}
83 83
 	}
84 84
 
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
 	 * @throws EE_Error
91 91
 	 * @return mixed (whatever the data is returned from the message type).
92 92
 	 */
93
-	protected function _get_data_from_request( $id ) {
93
+	protected function _get_data_from_request($id) {
94 94
 		//get the EE_Registration from the token
95 95
 		/** @type EE_Registration $registration */
96
-		$registration = EEM_Registration::instance()->get_one( array( array( 'REG_url_link' => $this->token ) ) );
96
+		$registration = EEM_Registration::instance()->get_one(array(array('REG_url_link' => $this->token)));
97 97
 		//if no registration then bail early.
98
-		if ( ! $registration instanceof EE_Registration ) {
99
-			throw new EE_Error( __( 'Unable to complete the request because the token is invalid.', 'event_espresso' ) );
98
+		if ( ! $registration instanceof EE_Registration) {
99
+			throw new EE_Error(__('Unable to complete the request because the token is invalid.', 'event_espresso'));
100 100
 		}
101 101
 
102
-		return $this->_get_data_to_use( $registration, $id );
102
+		return $this->_get_data_to_use($registration, $id);
103 103
 	}
104 104
 
105 105
 
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 	 * @param int             $data_id   This is sometimes used for secondary data a message type requires.
112 112
 	 * @return mixed   Data prepared as needed for generating this message.
113 113
 	 */
114
-	protected function _get_data_to_use( $registration, $data_id ) {
114
+	protected function _get_data_to_use($registration, $data_id) {
115 115
 		//use incoming data from url to setup data for the message type requirements
116
-		return $this->_message_type->get_data_for_context( $this->_context, $registration, $data_id );
116
+		return $this->_message_type->get_data_for_context($this->_context, $registration, $data_id);
117 117
 	}
118 118
 
119 119
 
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Registration_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 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
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Payment_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 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
Please login to merge, or discard this patch.
libraries/messages/message_type/EE_Pending_Approval_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 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
Please login to merge, or discard this patch.
libraries/messages/message_type/EE_Payment_Refund_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 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
Please login to merge, or discard this patch.
messages/message_type/EE_Not_Approved_Registration_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 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
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Event_List_Shortcodes.lib.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
 
50 50
 
51
-	protected function _parser( $shortcode ) {
52
-		switch ( $shortcode ) {
51
+	protected function _parser($shortcode) {
52
+		switch ($shortcode) {
53 53
 			case '[EVENT_LIST]' :
54 54
 				return $this->_get_event_list();
55 55
 				break;
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 	private function _get_event_list() {
66 66
 		$this->_validate_list_requirements();
67 67
 
68
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
68
+		if ($this->_data['data'] instanceof EE_Messages_Addressee)
69 69
 			return $this->_get_event_list_for_main();
70 70
 
71
-		else if ( $this->_data['data'] instanceof EE_Registration )
71
+		else if ($this->_data['data'] instanceof EE_Registration)
72 72
 			return $this->_get_event_list_for_registration();
73 73
 
74 74
 		//prevent recursive loop
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		$events = '';
91 91
 
92 92
 		//now we need to loop through the events array in EE_Messages_Addressee and send data to the EE_Parser helper.
93
-		foreach ( $data->events as $event ) {
93
+		foreach ($data->events as $event) {
94 94
 			$events .= $this->_shortcode_helper->parse_event_list_template($template, $event['event'], $valid_shortcodes, $this->_extra_data);
95 95
 		}
96 96
 		return $events;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	private function _get_event_list_for_registration() {
108 108
 		$valid_shortcodes = array('event', 'ticket_list', 'datetime_list', 'attendee', 'event_author', 'recipient_details', 'recipient_list', 'venue');
109
-		$template = is_array( $this->_data['template'] ) && isset($this->_data['template']['event_list']) ? $this->_data['template']['event_list'] : $this->_extra_data['template']['event_list'];
109
+		$template = is_array($this->_data['template']) && isset($this->_data['template']['event_list']) ? $this->_data['template']['event_list'] : $this->_extra_data['template']['event_list'];
110 110
 		$registration = $this->_data['data'];
111 111
 
112 112
 		//let's remove any existing [ATTENDEE_LIST] shortcode from the event list template so that we don't get recursion.
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		//we're NOT going to prepare a list of attendees this time around
120 120
 		$events = '';
121 121
 
122
-		foreach ( (array) $all_events as $event ) {
122
+		foreach ((array) $all_events as $event) {
123 123
 			$events .= $this->_shortcode_helper->parse_event_list_template($template, $event, $valid_shortcodes, $this->_extra_data);
124 124
 		}
125 125
 
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 
129 129
 
130 130
 
131
-	private function _get_events_from_registration( EE_Registration $registration ) {
132
-		return isset( $this->_extra_data['data']->registrations ) ? array($this->_extra_data['data']->registrations[$registration->ID()]['evt_obj']) : array();
131
+	private function _get_events_from_registration(EE_Registration $registration) {
132
+		return isset($this->_extra_data['data']->registrations) ? array($this->_extra_data['data']->registrations[$registration->ID()]['evt_obj']) : array();
133 133
 	}
134 134
 
135 135
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -65,15 +66,16 @@  discard block
 block discarded – undo
65 66
 	private function _get_event_list() {
66 67
 		$this->_validate_list_requirements();
67 68
 
68
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
69
-			return $this->_get_event_list_for_main();
70
-
71
-		else if ( $this->_data['data'] instanceof EE_Registration )
72
-			return $this->_get_event_list_for_registration();
69
+		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
70
+					return $this->_get_event_list_for_main();
71
+		} else if ( $this->_data['data'] instanceof EE_Registration ) {
72
+					return $this->_get_event_list_for_registration();
73
+		}
73 74
 
74 75
 		//prevent recursive loop
75
-		else
76
-			return '';
76
+		else {
77
+					return '';
78
+		}
77 79
 	}
78 80
 
79 81
 
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Ticket_List_Shortcodes.lib.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
 
50 50
 
51
-	protected function _parser( $shortcode ) {
52
-		switch ( $shortcode ) {
51
+	protected function _parser($shortcode) {
52
+		switch ($shortcode) {
53 53
 			case '[TICKET_LIST]' :
54 54
 				return $this->_get_ticket_list();
55 55
 				break;
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 	private function _get_ticket_list() {
67 67
 		$this->_validate_list_requirements();
68 68
 
69
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
69
+		if ($this->_data['data'] instanceof EE_Messages_Addressee)
70 70
 			return $this->_get_ticket_list_for_main();
71 71
 
72
-		else if ( $this->_data['data'] instanceof EE_Registration )
72
+		else if ($this->_data['data'] instanceof EE_Registration)
73 73
 			return $this->_get_ticket_list_for_attendee();
74 74
 
75
-		else if ( $this->_data['data'] instanceof EE_Event )
75
+		else if ($this->_data['data'] instanceof EE_Event)
76 76
 			return $this->_get_ticket_list_for_event();
77 77
 
78 78
 		//prevent recursive loop
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 	 * This returns the parsed ticket list for main template;
90 90
 	 */
91 91
 	private function _get_ticket_list_for_main() {
92
-		$valid_shortcodes = array('ticket', 'event_list', 'attendee_list','datetime_list', 'attendee', 'line_item_list', 'primary_registration_details', 'recipient_details' );
92
+		$valid_shortcodes = array('ticket', 'event_list', 'attendee_list', 'datetime_list', 'attendee', 'line_item_list', 'primary_registration_details', 'recipient_details');
93 93
 		$template = $this->_data['template'];
94 94
 		$data = $this->_data['data'];
95 95
 		$tktparsed = '';
96 96
 
97 97
 
98 98
 		//now we need to loop through the ticket list and send data to the EE_Parser helper.
99
-		foreach ( $data->tickets as $ticket ) {
99
+		foreach ($data->tickets as $ticket) {
100 100
 			$tktparsed .= $this->_shortcode_helper->parse_ticket_list_template($template, $ticket['ticket'], $valid_shortcodes, $this->_extra_data);
101 101
 		}
102 102
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 	 * @return string
111 111
 	 */
112 112
 	private function _get_ticket_list_for_event() {
113
-		$valid_shortcodes = array('ticket', 'attendee_list', 'datetime_list', 'attendee', 'venue', 'line_item_list', 'primary_registration_details', 'recipient_details' );
114
-		$template = is_array($this->_data['template'] ) && isset($this->_data['template']['ticket_list']) ? $this->_data['template']['ticket_list'] : $this->_extra_data['template']['ticket_list'];
113
+		$valid_shortcodes = array('ticket', 'attendee_list', 'datetime_list', 'attendee', 'venue', 'line_item_list', 'primary_registration_details', 'recipient_details');
114
+		$template = is_array($this->_data['template']) && isset($this->_data['template']['ticket_list']) ? $this->_data['template']['ticket_list'] : $this->_extra_data['template']['ticket_list'];
115 115
 		$event = $this->_data['data'];
116 116
 
117 117
 		//let's remove any existing [EVENT_LIST] shortcodes from the ticket list template so that we don't get recursion.
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		$tickets = $this->_get_tickets_from_event($event);
123 123
 
124 124
 		//each ticket in this case should be an ticket object.
125
-		foreach ( $tickets as $ticket ) {
125
+		foreach ($tickets as $ticket) {
126 126
 			$tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template($template, $ticket, $valid_shortcodes, $this->_extra_data);
127 127
 		}
128 128
 
@@ -149,18 +149,18 @@  discard block
 block discarded – undo
149 149
 		$tickets = $this->_get_ticket_list_from_registration($registration);
150 150
 
151 151
 		//each ticket in this case should be an ticket object.
152
-		foreach ( $tickets as $ticket ) {
152
+		foreach ($tickets as $ticket) {
153 153
 			$tkt_parsed .= $this->_shortcode_helper->parse_ticket_list_template($template, $ticket, $valid_shortcodes, $this->_extra_data);
154 154
 		}
155 155
 
156 156
 		return $tkt_parsed;
157 157
 	}
158 158
 
159
-	private function _get_tickets_from_event( EE_Event $event ) {
159
+	private function _get_tickets_from_event(EE_Event $event) {
160 160
 		return isset($this->_extra_data['data']->events) ? $this->_extra_data['data']->events[$event->ID()]['tkt_objs'] : array();
161 161
 	}
162 162
 
163
-	private function _get_ticket_list_from_registration( EE_Registration $registration, $att = NULL ) {
163
+	private function _get_ticket_list_from_registration(EE_Registration $registration, $att = NULL) {
164 164
 		return isset($this->_extra_data['data']->registrations) ? array($this->_extra_data['data']->registrations[$registration->ID()]['tkt_obj']) : array();
165 165
 	}
166 166
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -66,18 +67,18 @@  discard block
 block discarded – undo
66 67
 	private function _get_ticket_list() {
67 68
 		$this->_validate_list_requirements();
68 69
 
69
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
70
-			return $this->_get_ticket_list_for_main();
71
-
72
-		else if ( $this->_data['data'] instanceof EE_Registration )
73
-			return $this->_get_ticket_list_for_attendee();
74
-
75
-		else if ( $this->_data['data'] instanceof EE_Event )
76
-			return $this->_get_ticket_list_for_event();
70
+		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
71
+					return $this->_get_ticket_list_for_main();
72
+		} else if ( $this->_data['data'] instanceof EE_Registration ) {
73
+					return $this->_get_ticket_list_for_attendee();
74
+		} else if ( $this->_data['data'] instanceof EE_Event ) {
75
+					return $this->_get_ticket_list_for_event();
76
+		}
77 77
 
78 78
 		//prevent recursive loop
79
-		else
80
-			return '';
79
+		else {
80
+					return '';
81
+		}
81 82
 	}
82 83
 
83 84
 
Please login to merge, or discard this patch.