WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/15/2004 03:09:39 PM (15 years ago)
Author:
saxmatt
Message:

Axing of geo stuff, major cleanups on permalink options, style tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post.php

    r1656 r1664  
    5555        $post_title = $_POST['post_title'];
    5656        $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         }
    6557        $post_status = $_POST['post_status'];
    6658        $post_name = $_POST['post_name'];
     
    113105    if ('' != $_POST['savepage']) $post_status = 'static';
    114106
    115     if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {
    116     $postquery ="INSERT INTO $wpdb->posts
    117             (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             VALUES
    119             ('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 {
    122107    $postquery ="INSERT INTO $wpdb->posts
    123108            (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)
     
    125110            ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt')
    126111            ";
    127     }
    128112
    129113    $result = $wpdb->query($postquery);
     
    179163
    180164    if ($post_status == 'publish') {
    181         if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) {
    182             pingGeoUrl($post_ID);
    183         }
    184165
    185166        if ($post_pingback) {
     
    229210        $content = $postdata->post_content;
    230211        $content = format_to_edit($content);
    231         $edited_lat = $postdata->post_lat;
    232         $edited_lon = $postdata->post_lon;
    233212        $excerpt = $postdata->post_excerpt;
    234213        $excerpt = format_to_edit($excerpt);
     
    292271        $excerpt = format_to_post($excerpt);
    293272        $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         }
    307273        $prev_status = $_POST['prev_status'];
    308274        $post_status = $_POST['post_status'];
     
    370336            post_title = '$post_title'"
    371337            .$datemodif_gmt
    372             .$datemodif.","
    373             .$latlonaddition."
    374            
     338            .$datemodif.",         
    375339            post_status = '$post_status',
    376340            comment_status = '$comment_status',
     
    468432    if ($user_level < $authordata->user_level)
    469433        die (sprintf(__('You don&#8217;t have the right to delete <strong>%s</strong>&#8217;s posts.'), $authordata[1]));
    470 
    471     // send geoURL ping to "erase" from their DB
    472     $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     }
    479434
    480435    $result = $wpdb->query("DELETE FROM $wpdb->posts WHERE ID=$post_id");
Note: See TracChangeset for help on using the changeset viewer.