$posted = array();
while ($rp->fetch()) {
- if (isset($posted[$rp->postnoticeurl])) {
- /* We already posted to this url. */
- continue;
+ if (!array_key_exists($rp->postnoticeurl, $posted)) {
+ common_log(LOG_DEBUG, 'Posting to ' . $rp->postnoticeurl);
+ if (omb_post_notice_keys($notice, $rp->postnoticeurl, $rp->token, $rp->secret)) {
+ common_log(LOG_DEBUG, 'Finished to ' . $rp->postnoticeurl);
+ $posted[$rp->postnoticeurl] = true;
+ } else {
+ common_log(LOG_DEBUG, 'Failed posting to ' . $rp->postnoticeurl);
+ }
}
common_debug('Posting to ' . $rp->postnoticeurl, __FILE__);