Changeset 1313832
- Timestamp:
- 12/21/2015 09:38:27 PM (10 years ago)
- Location:
- track-connect/trunk
- Files:
-
- 3 edited
-
includes/api/request.php (modified) (3 diffs)
-
plugin.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
track-connect/trunk/includes/api/request.php
r1313783 r1313832 249 249 // Update the Amenities 250 250 foreach($unit->amenities as $amenity){ 251 $term = $wpdb->get_row("SELECT term_id FROM wp_terms WHERE amenity_id = '".$amenity->id."' ;"); 251 $term = $wpdb->get_row("SELECT term_taxonomy_id FROM wp_term_taxonomy 252 JOIN wp_terms ON wp_terms.term_id = wp_term_taxonomy.term_id 253 WHERE amenity_id = '".$amenity->id."' ;"); 252 254 if($term){ 253 $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id = '".$post_id."' AND term_taxonomy_id = '".$term->term_ id."';");255 $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id = '".$post_id."' AND term_taxonomy_id = '".$term->term_taxonomy_id."';"); 254 256 $wpdb->query("INSERT INTO wp_term_relationships set 255 257 object_id = '".$post_id."', 256 term_taxonomy_id = '".$term->term_ id."';");258 term_taxonomy_id = '".$term->term_taxonomy_id."';"); 257 259 } 258 260 } … … 340 342 if(isset($unit->amenities)){ 341 343 foreach($unit->amenities as $amenity){ 342 $term = $wpdb->get_row("SELECT term_id FROM wp_terms WHERE amenity_id = '".$amenity->id."';"); 344 $term = $wpdb->get_row("SELECT term_taxonomy_id FROM wp_term_taxonomy 345 JOIN wp_terms ON wp_terms.term_id = wp_term_taxonomy.term_id 346 WHERE amenity_id = '".$amenity->id."';"); 343 347 if($term){ 344 348 $wpdb->insert( 'wp_term_relationships', 345 array( 'object_id' => $post_id, 'term_taxonomy_id' => $term->term_ id ),349 array( 'object_id' => $post_id, 'term_taxonomy_id' => $term->term_taxonomy_id ), 346 350 array( '%d', '%d' ) ); 347 351 } … … 465 469 JOIN wp_terms ON wp_terms.term_id = wp_term_taxonomy.term_id 466 470 WHERE node_id = '".$nodeId."' 467 LIMIT 1;"); 468 471 LIMIT 1;"); 472 469 473 if($term){ 470 474 if(isset($node->units)){ -
track-connect/trunk/plugin.php
r1313783 r1313832 7 7 Author URI: http://www.trackhs.com 8 8 9 Version: 1.9. 79 Version: 1.9.8 10 10 11 11 License: GNU General Public License v2.0 (or later) … … 55 55 56 56 define( 'WP_LISTINGS_URL', plugin_dir_url( __FILE__ ) ); 57 define( 'WP_LISTINGS_VERSION', '1.9. 7' );57 define( 'WP_LISTINGS_VERSION', '1.9.8' ); 58 58 59 59 /** Load textdomain for translation */ -
track-connect/trunk/readme.txt
r1313783 r1313832 4 4 Requires at least: 3.7 5 5 Tested up to: 4.2.3 6 Stable tag: 1.9. 76 Stable tag: 1.9.8 7 7 8 8 Creates 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.