Completed
Push — master ( a7cd2a...eabd6c )
by Stephen
38:42
created
tools/i18n/extract.php 1 patch
Switch Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -75,35 +75,35 @@
 block discarded – undo
75 75
 		for( $i = 0; $i < count( $rule ); ++$i ) {
76 76
 			if ( $rule[$i] && ( !isset( $call['args'][$i] ) || !is_string( $call['args'][$i] ) || '' == $call['args'][$i] ) ) return false;
77 77
 			switch( $rule[$i] ) {
78
-			case 'string':
79
-				if ( $complete ) {
80
-					$multiple[] = $entry;
81
-					$entry = new Translation_Entry;
82
-					$complete = false;
83
-				}
84
-				$entry->singular = $call['args'][$i];
85
-				$complete = true;
86
-				break;
87
-			case 'singular':
88
-				if ( $complete ) {
89
-					$multiple[] = $entry;
90
-					$entry = new Translation_Entry;
91
-					$complete = false;
92
-				}
93
-				$entry->singular = $call['args'][$i];
94
-				$entry->is_plural = true;
95
-				break;
96
-			case 'plural':
97
-				$entry->plural = $call['args'][$i];
98
-				$entry->is_plural = true;
99
-				$complete = true;
100
-				break;
101
-			case 'context':
102
-				$entry->context = $call['args'][$i];
103
-				foreach( $multiple as &$single_entry ) {
104
-					$single_entry->context = $entry->context;
105
-				}
106
-				break;
78
+				case 'string':
79
+					if ( $complete ) {
80
+						$multiple[] = $entry;
81
+						$entry = new Translation_Entry;
82
+						$complete = false;
83
+					}
84
+					$entry->singular = $call['args'][$i];
85
+					$complete = true;
86
+					break;
87
+				case 'singular':
88
+					if ( $complete ) {
89
+						$multiple[] = $entry;
90
+						$entry = new Translation_Entry;
91
+						$complete = false;
92
+					}
93
+					$entry->singular = $call['args'][$i];
94
+					$entry->is_plural = true;
95
+					break;
96
+				case 'plural':
97
+					$entry->plural = $call['args'][$i];
98
+					$entry->is_plural = true;
99
+					$complete = true;
100
+					break;
101
+				case 'context':
102
+					$entry->context = $call['args'][$i];
103
+					foreach( $multiple as &$single_entry ) {
104
+						$single_entry->context = $entry->context;
105
+					}
106
+					break;
107 107
 			}
108 108
 		}
109 109
 		if ( isset( $call['line'] ) && $call['line'] ) {
Please login to merge, or discard this patch.
src/wp-admin/network/site-users.php 1 patch
Switch Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -203,36 +203,36 @@
 block discarded – undo
203 203
 
204 204
 if ( isset($_GET['update']) ) :
205 205
 	switch($_GET['update']) {
206
-	case 'adduser':
207
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
208
-		break;
209
-	case 'err_add_member':
210
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
211
-		break;
212
-	case 'err_add_notfound':
213
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
214
-		break;
215
-	case 'promote':
216
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
217
-		break;
218
-	case 'err_promote':
219
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
220
-		break;
221
-	case 'remove':
222
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
223
-		break;
224
-	case 'err_remove':
225
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
226
-		break;
227
-	case 'newuser':
228
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
229
-		break;
230
-	case 'err_new':
231
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
232
-		break;
233
-	case 'err_new_dup':
234
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
235
-		break;
206
+		case 'adduser':
207
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
208
+			break;
209
+		case 'err_add_member':
210
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
211
+			break;
212
+		case 'err_add_notfound':
213
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
214
+			break;
215
+		case 'promote':
216
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
217
+			break;
218
+		case 'err_promote':
219
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
220
+			break;
221
+		case 'remove':
222
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
223
+			break;
224
+		case 'err_remove':
225
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
226
+			break;
227
+		case 'newuser':
228
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
229
+			break;
230
+		case 'err_new':
231
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
232
+			break;
233
+		case 'err_new_dup':
234
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
235
+			break;
236 236
 	}
237 237
 endif; ?>
238 238
 
Please login to merge, or discard this patch.
src/wp-admin/media.php 1 patch
Switch Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -15,87 +15,87 @@  discard block
 block discarded – undo
15 15
 wp_reset_vars(array('action'));
16 16
 
17 17
 switch ( $action ) {
18
-case 'editattachment' :
19
-	$attachment_id = (int) $_POST['attachment_id'];
20
-	check_admin_referer('media-form');
21
-
22
-	if ( !current_user_can('edit_post', $attachment_id) )
23
-		wp_die ( __('You are not allowed to edit this attachment.') );
24
-
25
-	$errors = media_upload_form_handler();
26
-
27
-	if ( empty($errors) ) {
28
-		$location = 'media.php';
29
-		if ( $referer = wp_get_original_referer() ) {
30
-			if ( false !== strpos($referer, 'upload.php') || ( url_to_postid($referer) == $attachment_id )  )
31
-				$location = $referer;
32
-		}
33
-		if ( false !== strpos($location, 'upload.php') ) {
34
-			$location = remove_query_arg('message', $location);
35
-			$location = add_query_arg('posted',	$attachment_id, $location);
36
-		} elseif ( false !== strpos($location, 'media.php') ) {
37
-			$location = add_query_arg('message', 'updated', $location);
18
+	case 'editattachment' :
19
+		$attachment_id = (int) $_POST['attachment_id'];
20
+		check_admin_referer('media-form');
21
+
22
+		if ( !current_user_can('edit_post', $attachment_id) )
23
+			wp_die ( __('You are not allowed to edit this attachment.') );
24
+
25
+		$errors = media_upload_form_handler();
26
+
27
+		if ( empty($errors) ) {
28
+			$location = 'media.php';
29
+			if ( $referer = wp_get_original_referer() ) {
30
+				if ( false !== strpos($referer, 'upload.php') || ( url_to_postid($referer) == $attachment_id )  )
31
+					$location = $referer;
32
+			}
33
+			if ( false !== strpos($location, 'upload.php') ) {
34
+				$location = remove_query_arg('message', $location);
35
+				$location = add_query_arg('posted',	$attachment_id, $location);
36
+			} elseif ( false !== strpos($location, 'media.php') ) {
37
+				$location = add_query_arg('message', 'updated', $location);
38
+			}
39
+			wp_redirect($location);
40
+			exit;
38 41
 		}
39
-		wp_redirect($location);
40
-		exit;
41
-	}
42 42
 
43
-	// No break.
44
-case 'edit' :
45
-	$title = __('Edit Media');
43
+		// No break.
44
+	case 'edit' :
45
+		$title = __('Edit Media');
46 46
 
47
-	if ( empty($errors) )
48
-		$errors = null;
47
+		if ( empty($errors) )
48
+			$errors = null;
49 49
 
50
-	if ( empty( $_GET['attachment_id'] ) ) {
51
-		wp_redirect( admin_url('upload.php') );
52
-		exit();
53
-	}
54
-	$att_id = (int) $_GET['attachment_id'];
55
-
56
-	if ( !current_user_can('edit_post', $att_id) )
57
-		wp_die ( __('You are not allowed to edit this attachment.') );
58
-
59
-	$att = get_post($att_id);
60
-
61
-	if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn&#8217;t exist. Perhaps it was deleted?') );
62
-	if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn&#8217;t an attachment. Please go back and try again.') );
63
-	if ( $att->post_status == 'trash' ) wp_die( __('You can&#8217;t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
64
-
65
-	add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
66
-
67
-	wp_enqueue_script( 'wp-ajax-response' );
68
-	wp_enqueue_script('image-edit');
69
-	wp_enqueue_style('imgareaselect');
70
-
71
-	get_current_screen()->add_help_tab( array(
72
-		'id'      => 'overview',
73
-		'title'   => __('Overview'),
74
-		'content' =>
75
-			'<p>' . __('This screen allows you to edit five fields for metadata in a file within the media library.') . '</p>' .
76
-			'<p>' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '</p>' .
77
-			'<p>' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '</p>' .
78
-			'<p>' . __('Remember to click Update Media to save metadata entered or changed.') . '</p>'
79
-	) );
80
-
81
-	get_current_screen()->set_help_sidebar(
82
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
83
-	'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
84
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
85
-	);
86
-
87
-	require( ABSPATH . 'wp-admin/admin-header.php' );
88
-
89
-	$parent_file = 'upload.php';
90
-	$message = '';
91
-	$class = '';
92
-	if ( isset($_GET['message']) ) {
93
-		switch ( $_GET['message'] ) {
50
+		if ( empty( $_GET['attachment_id'] ) ) {
51
+			wp_redirect( admin_url('upload.php') );
52
+			exit();
53
+		}
54
+		$att_id = (int) $_GET['attachment_id'];
55
+
56
+		if ( !current_user_can('edit_post', $att_id) )
57
+			wp_die ( __('You are not allowed to edit this attachment.') );
58
+
59
+		$att = get_post($att_id);
60
+
61
+		if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn&#8217;t exist. Perhaps it was deleted?') );
62
+		if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn&#8217;t an attachment. Please go back and try again.') );
63
+		if ( $att->post_status == 'trash' ) wp_die( __('You can&#8217;t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
64
+
65
+		add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
66
+
67
+		wp_enqueue_script( 'wp-ajax-response' );
68
+		wp_enqueue_script('image-edit');
69
+		wp_enqueue_style('imgareaselect');
70
+
71
+		get_current_screen()->add_help_tab( array(
72
+			'id'      => 'overview',
73
+			'title'   => __('Overview'),
74
+			'content' =>
75
+				'<p>' . __('This screen allows you to edit five fields for metadata in a file within the media library.') . '</p>' .
76
+				'<p>' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '</p>' .
77
+				'<p>' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '</p>' .
78
+				'<p>' . __('Remember to click Update Media to save metadata entered or changed.') . '</p>'
79
+		) );
80
+
81
+		get_current_screen()->set_help_sidebar(
82
+		'<p><strong>' . __('For more information:') . '</strong></p>' .
83
+		'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
84
+		'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
85
+		);
86
+
87
+		require( ABSPATH . 'wp-admin/admin-header.php' );
88
+
89
+		$parent_file = 'upload.php';
90
+		$message = '';
91
+		$class = '';
92
+		if ( isset($_GET['message']) ) {
93
+			switch ( $_GET['message'] ) {
94 94
 			case 'updated' :
95 95
 				$message = __('Media attachment updated.');
96 96
 				$class = 'updated';
97 97
 				break;
98
-		}
98
+			}
99 99
 	}
100 100
 	if ( $message )
101 101
 		echo "<div id='message' class='$class'><p>$message</p></div>\n";
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 
140 140
 	exit;
141 141
 
142
-default:
143
-	wp_redirect( admin_url('upload.php') );
144
-	exit;
142
+	default:
143
+		wp_redirect( admin_url('upload.php') );
144
+		exit;
145 145
 
146 146
 }
Please login to merge, or discard this patch.
src/wp-admin/includes/image.php 1 patch
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,12 +156,12 @@
 block discarded – undo
156 156
 		} else {
157 157
 			$ext = '.jpg';
158 158
 			switch ( $metadata['image']['mime'] ) {
159
-			case 'image/gif':
160
-				$ext = '.gif';
161
-				break;
162
-			case 'image/png':
163
-				$ext = '.png';
164
-				break;
159
+				case 'image/gif':
160
+					$ext = '.gif';
161
+					break;
162
+				case 'image/png':
163
+					$ext = '.png';
164
+					break;
165 165
 			}
166 166
 			$basename = str_replace( '.', '-', basename( $file ) ) . '-image' . $ext;
167 167
 			$uploaded = wp_upload_bits( $basename, '', $metadata['image']['data'] );
Please login to merge, or discard this patch.
src/wp-admin/includes/upgrade.php 1 patch
Switch Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -2103,15 +2103,15 @@  discard block
 block discarded – undo
2103 2103
 			// Verify the found field name.
2104 2104
 			$validfield = true;
2105 2105
 			switch (strtolower($fieldname)) {
2106
-			case '':
2107
-			case 'primary':
2108
-			case 'index':
2109
-			case 'fulltext':
2110
-			case 'unique':
2111
-			case 'key':
2112
-				$validfield = false;
2113
-				$indices[] = trim(trim($fld), ", \n");
2114
-				break;
2106
+				case '':
2107
+				case 'primary':
2108
+				case 'index':
2109
+				case 'fulltext':
2110
+				case 'unique':
2111
+				case 'key':
2112
+					$validfield = false;
2113
+					$indices[] = trim(trim($fld), ", \n");
2114
+					break;
2115 2115
 			}
2116 2116
 			$fld = trim($fld);
2117 2117
 
@@ -2495,22 +2495,22 @@  discard block
 block discarded – undo
2495 2495
  */
2496 2496
 function translate_level_to_role($level) {
2497 2497
 	switch ($level) {
2498
-	case 10:
2499
-	case 9:
2500
-	case 8:
2501
-		return 'administrator';
2502
-	case 7:
2503
-	case 6:
2504
-	case 5:
2505
-		return 'editor';
2506
-	case 4:
2507
-	case 3:
2508
-	case 2:
2509
-		return 'author';
2510
-	case 1:
2511
-		return 'contributor';
2512
-	case 0:
2513
-		return 'subscriber';
2498
+		case 10:
2499
+		case 9:
2500
+		case 8:
2501
+			return 'administrator';
2502
+		case 7:
2503
+		case 6:
2504
+		case 5:
2505
+			return 'editor';
2506
+		case 4:
2507
+		case 3:
2508
+		case 2:
2509
+			return 'author';
2510
+		case 1:
2511
+			return 'contributor';
2512
+		case 0:
2513
+			return 'subscriber';
2514 2514
 	}
2515 2515
 }
2516 2516
 
Please login to merge, or discard this patch.
src/wp-includes/bookmark.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -354,24 +354,24 @@
 block discarded – undo
354 354
  */
355 355
 function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
356 356
 	switch ( $field ) {
357
-	case 'link_id' : // ints
358
-	case 'link_rating' :
359
-		$value = (int) $value;
360
-		break;
361
-	case 'link_category' : // array( ints )
362
-		$value = array_map('absint', (array) $value);
363
-		// We return here so that the categories aren't filtered.
364
-		// The 'link_category' filter is for the name of a link category, not an array of a link's link categories
365
-		return $value;
366
-
367
-	case 'link_visible' : // bool stored as Y|N
368
-		$value = preg_replace('/[^YNyn]/', '', $value);
369
-		break;
370
-	case 'link_target' : // "enum"
371
-		$targets = array('_top', '_blank');
372
-		if ( ! in_array($value, $targets) )
373
-			$value = '';
374
-		break;
357
+		case 'link_id' : // ints
358
+		case 'link_rating' :
359
+			$value = (int) $value;
360
+			break;
361
+		case 'link_category' : // array( ints )
362
+			$value = array_map('absint', (array) $value);
363
+			// We return here so that the categories aren't filtered.
364
+			// The 'link_category' filter is for the name of a link category, not an array of a link's link categories
365
+			return $value;
366
+
367
+		case 'link_visible' : // bool stored as Y|N
368
+			$value = preg_replace('/[^YNyn]/', '', $value);
369
+			break;
370
+		case 'link_target' : // "enum"
371
+			$targets = array('_top', '_blank');
372
+			if ( ! in_array($value, $targets) )
373
+				$value = '';
374
+			break;
375 375
 	}
376 376
 
377 377
 	if ( 'raw' == $context )
Please login to merge, or discard this patch.
src/wp-includes/functions.php 1 patch
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -2440,15 +2440,15 @@  discard block
 block discarded – undo
2440 2440
 		}
2441 2441
 		$errors = $message->get_error_messages();
2442 2442
 		switch ( count( $errors ) ) {
2443
-		case 0 :
2444
-			$message = '';
2445
-			break;
2446
-		case 1 :
2447
-			$message = "<p>{$errors[0]}</p>";
2448
-			break;
2449
-		default :
2450
-			$message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>";
2451
-			break;
2443
+			case 0 :
2444
+				$message = '';
2445
+				break;
2446
+			case 1 :
2447
+				$message = "<p>{$errors[0]}</p>";
2448
+				break;
2449
+			default :
2450
+				$message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>";
2451
+				break;
2452 2452
 		}
2453 2453
 	} elseif ( is_string( $message ) ) {
2454 2454
 		$message = "<p>$message</p>";
@@ -4447,17 +4447,17 @@  discard block
 block discarded – undo
4447 4447
  */
4448 4448
 function _wp_mysql_week( $column ) {
4449 4449
 	switch ( $start_of_week = (int) get_option( 'start_of_week' ) ) {
4450
-	case 1 :
4451
-		return "WEEK( $column, 1 )";
4452
-	case 2 :
4453
-	case 3 :
4454
-	case 4 :
4455
-	case 5 :
4456
-	case 6 :
4457
-		return "WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )";
4458
-	case 0 :
4459
-	default :
4460
-		return "WEEK( $column, 0 )";
4450
+		case 1 :
4451
+			return "WEEK( $column, 1 )";
4452
+		case 2 :
4453
+		case 3 :
4454
+		case 4 :
4455
+		case 5 :
4456
+		case 6 :
4457
+			return "WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )";
4458
+		case 0 :
4459
+		default :
4460
+			return "WEEK( $column, 0 )";
4461 4461
 	}
4462 4462
 }
4463 4463
 
Please login to merge, or discard this patch.
src/wp-includes/post.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5208,18 +5208,18 @@
 block discarded – undo
5208 5208
 	}
5209 5209
 
5210 5210
 	switch ( $type ) {
5211
-	case 'image':
5212
-		$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
5213
-		return in_array( $ext, $image_exts );
5211
+		case 'image':
5212
+			$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
5213
+			return in_array( $ext, $image_exts );
5214 5214
 
5215
-	case 'audio':
5216
-		return in_array( $ext, wp_get_audio_extensions() );
5215
+		case 'audio':
5216
+			return in_array( $ext, wp_get_audio_extensions() );
5217 5217
 
5218
-	case 'video':
5219
-		return in_array( $ext, wp_get_video_extensions() );
5218
+		case 'video':
5219
+			return in_array( $ext, wp_get_video_extensions() );
5220 5220
 
5221
-	default:
5222
-		return $type === $ext;
5221
+		default:
5222
+			return $type === $ext;
5223 5223
 	}
5224 5224
 }
5225 5225
 
Please login to merge, or discard this patch.
src/wp-includes/Text/Diff/Engine/shell.php 1 patch
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -91,29 +91,29 @@
 block discarded – undo
91 91
             }
92 92
 
93 93
             switch ($match[3]) {
94
-            case 'd':
95
-                // deleted lines
96
-                array_push($edits,
97
-                    new Text_Diff_Op_delete(
98
-                        $this->_getLines($from_lines, $from_line_no, $match[2])));
99
-                $to_line_no++;
100
-                break;
101
-
102
-            case 'c':
103
-                // changed lines
104
-                array_push($edits,
105
-                    new Text_Diff_Op_change(
106
-                        $this->_getLines($from_lines, $from_line_no, $match[2]),
107
-                        $this->_getLines($to_lines, $to_line_no, $match[5])));
108
-                break;
109
-
110
-            case 'a':
111
-                // added lines
112
-                array_push($edits,
113
-                    new Text_Diff_Op_add(
114
-                        $this->_getLines($to_lines, $to_line_no, $match[5])));
115
-                $from_line_no++;
116
-                break;
94
+            	case 'd':
95
+                	// deleted lines
96
+                	array_push($edits,
97
+                    	new Text_Diff_Op_delete(
98
+                        	$this->_getLines($from_lines, $from_line_no, $match[2])));
99
+                	$to_line_no++;
100
+                	break;
101
+
102
+            	case 'c':
103
+                	// changed lines
104
+                	array_push($edits,
105
+                    	new Text_Diff_Op_change(
106
+                        	$this->_getLines($from_lines, $from_line_no, $match[2]),
107
+                        	$this->_getLines($to_lines, $to_line_no, $match[5])));
108
+                	break;
109
+
110
+            	case 'a':
111
+                	// added lines
112
+                	array_push($edits,
113
+                    	new Text_Diff_Op_add(
114
+                        	$this->_getLines($to_lines, $to_line_no, $match[5])));
115
+                	$from_line_no++;
116
+                	break;
117 117
             }
118 118
         }
119 119
 
Please login to merge, or discard this patch.