Changeset 1664 for trunk/wp-admin/post.php
- Timestamp:
- 09/15/2004 03:09:39 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1656 r1664 55 55 $post_title = $_POST['post_title']; 56 56 $post_categories = $_POST['post_category']; 57 if(get_settings('use_geo_positions')) {58 $latstr = $_POST['post_latf'];59 $lonstr = $_POST['post_lonf'];60 if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) {61 $post_latf = floatval($_POST['post_latf']);62 $post_lonf = floatval($_POST['post_lonf']);63 }64 }65 57 $post_status = $_POST['post_status']; 66 58 $post_name = $_POST['post_name']; … … 113 105 if ('' != $_POST['savepage']) $post_status = 'static'; 114 106 115 if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {116 $postquery ="INSERT INTO $wpdb->posts117 (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt)118 VALUES119 ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt')120 ";121 } else {122 107 $postquery ="INSERT INTO $wpdb->posts 123 108 (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt) … … 125 110 ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt') 126 111 "; 127 }128 112 129 113 $result = $wpdb->query($postquery); … … 179 163 180 164 if ($post_status == 'publish') { 181 if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) {182 pingGeoUrl($post_ID);183 }184 165 185 166 if ($post_pingback) { … … 229 210 $content = $postdata->post_content; 230 211 $content = format_to_edit($content); 231 $edited_lat = $postdata->post_lat;232 $edited_lon = $postdata->post_lon;233 212 $excerpt = $postdata->post_excerpt; 234 213 $excerpt = format_to_edit($excerpt); … … 292 271 $excerpt = format_to_post($excerpt); 293 272 $post_title = $_POST['post_title']; 294 if(get_settings('use_geo_positions')) {295 $latf = floatval($_POST["post_latf"]);296 $lonf = floatval($_POST["post_lonf"]);297 $latlonaddition = "";298 if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) {299 pingGeoUrl($post_ID);300 $latlonaddition = " post_lat=".$latf.", post_lon =".$lonf.", ";301 } else {302 $latlonaddition = " post_lat=null, post_lon=null, ";303 }304 } else {305 $latlonaddition = '';306 }307 273 $prev_status = $_POST['prev_status']; 308 274 $post_status = $_POST['post_status']; … … 370 336 post_title = '$post_title'" 371 337 .$datemodif_gmt 372 .$datemodif."," 373 .$latlonaddition." 374 338 .$datemodif.", 375 339 post_status = '$post_status', 376 340 comment_status = '$comment_status', … … 468 432 if ($user_level < $authordata->user_level) 469 433 die (sprintf(__('You don’t have the right to delete <strong>%s</strong>’s posts.'), $authordata[1])); 470 471 // send geoURL ping to "erase" from their DB472 $query = "SELECT post_lat from $wpdb->posts WHERE ID=$post_id";473 $rows = $wpdb->query($query);474 $myrow = $rows[0];475 $latf = $myrow->post_lat;476 if($latf != null ) {477 pingGeoUrl($post);478 }479 434 480 435 $result = $wpdb->query("DELETE FROM $wpdb->posts WHERE ID=$post_id");
Note: See TracChangeset
for help on using the changeset viewer.