Changeset 2960
- Timestamp:
- 10/20/2005 09:20:52 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-mail.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-mail.php
r2196 r2960 137 137 138 138 $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status'); 139 $post_data = add_magic_quotes($post_data); 139 140 140 141 $post_ID = wp_insert_post($post_data); … … 151 152 echo "\n<b>Posted content:</b><br /><pre>".$content.'</pre></p>'; 152 153 153 if (!$post_categories) $post_categories[] = 1;154 foreach ($post_categories as $post_category) :155 $post_category = intval($post_category);156 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");159 160 if (!$exists && $result) {161 $wpdb->query("162 INSERT INTO $wpdb->post2cat163 (post_id, category_id)164 VALUES165 ($post_ID, $post_category)166 ");167 }168 endforeach;169 170 154 if(!$pop3->delete($i)) { 171 155 echo '<p>Oops '.$pop3->ERROR.'</p></div>';
Note: See TracChangeset
for help on using the changeset viewer.