Changeset 2176
- Timestamp:
- 01/31/2005 07:00:25 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-mail.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-mail.php
r2174 r2176 24 24 25 25 $message = $pop3->get($i); 26 27 if(!$pop3->delete($i)) {28 echo '<p>Oops '.$pop3->ERROR.'</p></div>';29 $pop3->reset();30 exit;31 } else {32 echo "<p>Mission complete, message <strong>$i</strong> deleted.</p>";33 }34 26 35 27 $content = ''; … … 145 137 $post_ID = wp_insert_post($post_data); 146 138 139 if (!$post_ID) { 140 // we couldn't post, for whatever reason. better move forward to the next email 141 continue; 142 } 143 147 144 do_action('publish_phone', $post_ID); 148 145 … … 153 150 if (!$post_categories) $post_categories[] = 1; 154 151 foreach ($post_categories as $post_category) : 155 $post_category = intval($post_category);152 $post_category = intval($post_category); 156 153 157 // Double check it's not there already158 $exists = $wpdb->get_row("SELECT * FROM $wpdb->post2cat WHERE post_id = $post_ID AND category_id = $post_category");154 // Double check it's not there already 155 $exists = $wpdb->get_row("SELECT * FROM $wpdb->post2cat WHERE post_id = $post_ID AND category_id = $post_category"); 159 156 160 if (!$exists && $result) { 161 $wpdb->query(" 162 INSERT INTO $wpdb->post2cat 163 (post_id, category_id) 164 VALUES 165 ($post_ID, $post_category) 166 "); 157 if (!$exists && $result) { 158 $wpdb->query(" 159 INSERT INTO $wpdb->post2cat 160 (post_id, category_id) 161 VALUES 162 ($post_ID, $post_category) 163 "); 164 } 165 endforeach; 166 167 if(!$pop3->delete($i)) { 168 echo '<p>Oops '.$pop3->ERROR.'</p></div>'; 169 $pop3->reset(); 170 exit; 171 } else { 172 echo "<p>Mission complete, message <strong>$i</strong> deleted.</p>"; 167 173 } 168 endforeach;169 174 170 175 endfor;
Note: See TracChangeset
for help on using the changeset viewer.