Code Duplication    Length = 5-5 lines in 2 locations

modules/publicize/publicize.php 2 locations

@@ 881-885 (lines=5) @@
878
			isset( $_POST[$this->ADMIN_PAGE] );
879
880
		if ( ( $from_web || defined( 'POST_BY_EMAIL' ) ) && isset( $_POST['wpas_title'] ) ) {
881
			if ( empty( $_POST['wpas_title'] ) ) {
882
				delete_post_meta( $post_id, $this->POST_MESS );
883
			} else {
884
				update_post_meta( $post_id, $this->POST_MESS, trim( stripslashes( $_POST['wpas_title'] ) ) );
885
			}
886
		}
887
888
		// change current user to provide context for get_services() if we're running during cron
@@ 1154-1158 (lines=5) @@
1151
1152
			$publicize_field = $request['publicize'];
1153
1154
			if ( empty( $publicize_field['title'] ) ) {
1155
				delete_post_meta( $post->ID, $this->POST_MESS );
1156
			} else {
1157
				update_post_meta( $post->ID, $this->POST_MESS, trim( stripslashes( $publicize_field['title'] ) ) );
1158
			}
1159
			if ( isset( $publicize_field['connections'] ) ) {
1160
				foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) {
1161
					foreach ( $connections as $connection ) {