Completed
Pull Request — develop (#1523)
by
unknown
16:10
created
includes/class-gravityview-change-entry-creator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 			)
93 93
 		);
94 94
 
95
-		if ( ! wp_verify_nonce( $post_var['gv_nonce'], 'gv_entry_creator' ) ) {
95
+		if ( ! wp_verify_nonce( $post_var[ 'gv_nonce' ], 'gv_entry_creator' ) ) {
96 96
 			die();
97 97
 		}
98 98
 
99
-		$search_string = $post_var['q'];
99
+		$search_string = $post_var[ 'q' ];
100 100
 
101 101
 		if ( is_numeric( $search_string ) ) {
102 102
 			$user_args = array(
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		}
146 146
 
147 147
 		// Update the entry. The `false` prevents checking Akismet; `true` disables the user updated hook from firing
148
-		$result = RGFormsModel::update_entry_property( (int) $entry['id'], 'created_by', (int) $user_id, false, true );
148
+		$result = RGFormsModel::update_entry_property( (int)$entry[ 'id' ], 'created_by', (int)$user_id, false, true );
149 149
 
150 150
 		if ( false === $result ) {
151 151
 			$status = __( 'Error', 'gravityview' );
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 			return;
168 168
 		}
169 169
 
170
-		GravityView_Entry_Notes::add_note( $entry['id'], - 1, 'GravityView', $note, 'gravityview' );
170
+		GravityView_Entry_Notes::add_note( $entry[ 'id' ], - 1, 'GravityView', $note, 'gravityview' );
171 171
 
172 172
 	}
173 173
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		}
203 203
 
204 204
 		// If screen mode isn't set, then we're in the wrong place.
205
-		if ( empty( $_REQUEST['screen_mode'] ) ) {
205
+		if ( empty( $_REQUEST[ 'screen_mode' ] ) ) {
206 206
 			return;
207 207
 		}
208 208
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 		// If $_GET['screen_mode'] is set to edit, set $_POST value
230 230
 		if ( \GV\Utils::_GET( 'screen_mode' ) === 'edit' ) {
231
-			$_POST["screen_mode"] = 'edit';
231
+			$_POST[ "screen_mode" ] = 'edit';
232 232
 		}
233 233
 
234 234
 	}
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 		$entry_creator_user_id = \GV\Utils::get( $entry, 'created_by' );
304 304
 
305 305
 		$entry_creator_user = GVCommon::get_users( 'change_entry_creator', array( 'include' => $entry_creator_user_id ) );
306
-		$entry_creator_user = isset( $entry_creator_user[0] ) ? $entry_creator_user[0] : array();
306
+		$entry_creator_user = isset( $entry_creator_user[ 0 ] ) ? $entry_creator_user[ 0 ] : array();
307 307
 
308 308
 		if ( empty( $entry_creator_user ) ) {
309 309
 			$output .= '<option value="0"> &mdash; ' . esc_attr_x( 'No User', 'No user assigned to the entry', 'gravityview' ) . ' &mdash; </option>';
@@ -322,13 +322,13 @@  discard block
 block discarded – undo
322 322
 
323 323
 		$user_count = count_users();
324 324
 
325
-		if ( $user_count['total_users'] > self::DEFAULT_NUMBER_OF_USERS ) {
325
+		if ( $user_count[ 'total_users' ] > self::DEFAULT_NUMBER_OF_USERS ) {
326 326
 			$message = esc_html__( 'Use the search field to look through additional %d users.', '%d is replaced by user count', 'gravityview' );
327
-			$output  .= '<option value="_disabled" disabled="disabled">' . sprintf( $message, $user_count['total_users'] - self::DEFAULT_NUMBER_OF_USERS ) . '</option>';
327
+			$output .= '<option value="_disabled" disabled="disabled">' . sprintf( $message, $user_count[ 'total_users' ] - self::DEFAULT_NUMBER_OF_USERS ) . '</option>';
328 328
 		}
329 329
 
330 330
 		$output .= '</select>';
331
-		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry['created_by'] ) . '" type="hidden" />';
331
+		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry[ 'created_by' ] ) . '" type="hidden" />';
332 332
 		$output .= wp_nonce_field( 'gv_entry_creator', 'gv_entry_creator_nonce', false, false );
333 333
 
334 334
 		echo $output;
Please login to merge, or discard this patch.