Plugin Directory

Changeset 1313896


Ignore:
Timestamp:
12/21/2015 11:43:43 PM (10 years ago)
Author:
trackhs
Message:

1.9.9 fixes

Location:
track-connect/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • track-connect/trunk/includes/api/request.php

    r1313832 r1313896  
    276276                $post_id = $wpdb->insert_id;
    277277               
    278                 if(!$custom_desc){
    279                     $wpdb->update( $wpdb->posts,
    280                         array( 'post_content' => $unit->description ),
    281                         array( 'ID' => $post_id ),
    282                         array( '%s' ), array( '%d' ) );
    283                 }
     278
     279                $wpdb->update( $wpdb->posts,
     280                    array( 'post_content' => $unit->description ),
     281                    array( 'ID' => $post_id ),
     282                    array( '%s' ), array( '%d' ) );
     283               
    284284                                 
    285285                $wpdb->query( $wpdb->prepare(
     
    442442                $term_taxonomy_id = $wpdb->insert_id;
    443443                   
    444                
    445                 foreach($node->units as $unitId){
    446                     $post = $wpdb->get_row("SELECT ID FROM wp_posts WHERE unit_id = '".$unitId."';");
    447                     if($post){
    448                         $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id = '".$post->ID."' AND term_taxonomy_id = '".$term_taxonomy_id."';");
    449                         $wpdb->insert( 'wp_term_relationships',
    450                             array( 'object_id' => $post->ID, 'term_taxonomy_id' => $term_taxonomy_id ), 
    451                             array( '%d', '%d' ) );
     444                if(isset($node->units)){
     445                    foreach($node->units as $unitId){
     446                        $post = $wpdb->get_row("SELECT ID FROM wp_posts WHERE unit_id = '".$unitId."';");
     447                        if($post){
     448                            $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id = '".$post->ID."' AND term_taxonomy_id = '".$term_taxonomy_id."';");
     449                            $wpdb->insert( 'wp_term_relationships',
     450                                array( 'object_id' => $post->ID, 'term_taxonomy_id' => $term_taxonomy_id ), 
     451                                array( '%d', '%d' ) );
     452                        }
    452453                    }
    453454                }
     
    547548               
    548549                 $wpdb->insert( 'wp_term_taxonomy',
    549                     array( 'term_id' => $termId, 'taxonomy' => 'features', 'description' => $amenity->groupname, 'parent' => 0 ), 
     550                    array( 'term_id' => $term->term_id, 'taxonomy' => 'features', 'description' => $amenity->groupname, 'parent' => 0 ), 
    550551                    array( '%d', '%s', '%s', '%d' ) );
    551552               
     
    557558                    array( '%s', '%s', ), array( '%d' ) );
    558559               
     560                $amenityTax = $wpdb->get_row("SELECT term_id FROM wp_term_taxonomy WHERE term_id = '".$term->term_id."';");
     561                if($amenityTax){
    559562                $wpdb->update( 'wp_term_taxonomy',
    560563                    array( 'description' => $amenity->groupname ),
    561564                    array( 'term_id' => $term->term_id ),
    562                     array( '%s' ), array( '%d' ) );             
     565                    array( '%s' ), array( '%d' ) );
     566                }else{
     567                    $wpdb->insert( 'wp_term_taxonomy',
     568                    array( 'term_id' => $term->term_id, 'taxonomy' => 'features', 'description' => $amenity->groupname, 'parent' => 0 ), 
     569                    array( '%d', '%s', '%s', '%d' ) );
     570                }             
    563571               
    564572            }
  • track-connect/trunk/plugin.php

    r1313832 r1313896  
    77    Author URI: http://www.trackhs.com
    88
    9     Version: 1.9.8
     9    Version: 1.9.9
    1010
    1111    License: GNU General Public License v2.0 (or later)
     
    5555
    5656    define( 'WP_LISTINGS_URL', plugin_dir_url( __FILE__ ) );
    57     define( 'WP_LISTINGS_VERSION', '1.9.8' );
     57    define( 'WP_LISTINGS_VERSION', '1.9.9' );
    5858
    5959    /** Load textdomain for translation */
  • track-connect/trunk/readme.txt

    r1313832 r1313896  
    44Requires at least: 3.7
    55Tested up to: 4.2.3
    6 Stable tag: 1.9.8
     6Stable tag: 1.9.9
    77
    88Creates and syncs listing-type posts from TRACK PM, a cloud-based property management system (www.trackhs.com).
Note: See TracChangeset for help on using the changeset viewer.