Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions includes/push-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ function ajax_push() {
$push_args['post_status'] = $_POST['postStatus'];
}

$remote_id = $external_connection->push( intval( $_POST['postId'] ), $push_args );
$post_id = intval( $_POST['postId'] );
$remote_id = $external_connection->push( $post_id, $push_args );

/**
* Record the external connection id's remote post id for this local post
Expand All @@ -269,7 +270,7 @@ function ajax_push() {
$external_connection->log_sync( array( $remote_id => $_POST['postId'] ) );
} else {
$external_push_results[ (int) $connection['id'] ] = array(
'post_id' => (int) $remote_id,
'post_id' => $post_id,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add an error attribute here with the (error) results from $external_connection->push? That will set us up for displaying the error on the front end.

'date' => date( 'F j, Y g:i a' ),
'status' => 'fail',
);
Expand Down Expand Up @@ -550,3 +551,5 @@ function menu_content() {
}
}

$post_id = intval( $_POST['postId'] );
$remote_id = $external_connection->push( $post_id, $push_args );
Comment on lines +554 to +555
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were these lines left by accident?