Skip to content

Commit

Permalink
Merge pull request #165 from websharks/feature/162
Browse files Browse the repository at this point in the history
PR: feature/162
  • Loading branch information
JasWSInc committed Dec 1, 2015
2 parents 27e0663 + c97712c commit c632e1c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitchange
@@ -1 +1 @@
1437781827
1448952510
37 changes: 19 additions & 18 deletions comment-mail/includes/classes/import-stcr.php
Expand Up @@ -197,26 +197,27 @@ protected function maybe_import_sub($post_id, \stdClass $sub)
$sub_inserter = new sub_inserter($sub_insert_data);
if($sub_inserter->did_insert()) $this->total_imported_subs++;
}
# Otherwise, specific comment(s) only; i.e. "Replies Only".

foreach($this->sub_comment_ids($post_id, $sub->email) as $_comment_id)
else # Otherwise, specific comment(s) only; i.e. "Replies Only".
{
$_sub_insert_data = array(
'post_id' => $post_id,
'comment_id' => $_comment_id,

'status' => 'subscribed',
'deliver' => 'asap',

'fname' => $sub->fname,
'email' => $sub->email,

'insertion_time' => $sub->time,
);
$_sub_inserter = new sub_inserter($_sub_insert_data);
if($_sub_inserter->did_insert()) $this->total_imported_subs++;
foreach($this->sub_comment_ids($post_id, $sub->email) as $_comment_id)
{
$_sub_insert_data = array(
'post_id' => $post_id,
'comment_id' => $_comment_id,

'status' => 'subscribed',
'deliver' => 'asap',

'fname' => $sub->fname,
'email' => $sub->email,

'insertion_time' => $sub->time,
);
$_sub_inserter = new sub_inserter($_sub_insert_data);
if($_sub_inserter->did_insert()) $this->total_imported_subs++;
}
unset($_comment_id, $_sub_insert_data, $_sub_inserter); // Housekeeping.
}
unset($_comment_id, $_sub_insert_data, $_sub_inserter); // Housekeeping.
}

/**
Expand Down

0 comments on commit c632e1c

Please sign in to comment.