Changeset 10508 for trunk/wp-includes/rss.php
- Timestamp:
- 02/05/2009 08:47:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rss.php
r10507 r10508 715 715 $cache_timestamp = 'rss_' . $this->file_name( $url ) . '_ts'; 716 716 717 set_transient($cache_option, $rss); 718 set_transient($cache_timestamp, time() ); 717 // shouldn't these be using get_option() ? 718 if ( !$wpdb->get_var( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name = %s", $cache_option ) ) ) 719 add_option($cache_option, '', '', 'no'); 720 if ( !$wpdb->get_var( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name = %s", $cache_timestamp ) ) ) 721 add_option($cache_timestamp, '', '', 'no'); 722 723 update_option($cache_option, $rss); 724 update_option($cache_timestamp, time() ); 719 725 720 726 return $cache_option; … … 731 737 $cache_option = 'rss_' . $this->file_name( $url ); 732 738 733 if ( ! $rss = get_transient( $cache_option ) ) {739 if ( ! get_option( $cache_option ) ) { 734 740 $this->debug( 735 741 "Cache doesn't contain: $url (cache option: $cache_option)" … … 737 743 return 0; 738 744 } 745 746 $rss = get_option( $cache_option ); 739 747 740 748 return $rss; … … 753 761 $cache_timestamp = 'rss_' . $this->file_name( $url ) . '_ts'; 754 762 755 if ( $mtime = get_ transient($cache_timestamp) ) {763 if ( $mtime = get_option($cache_timestamp) ) { 756 764 // find how long ago the file was added to the cache 757 765 // and whether that is longer then MAX_AGE
Note: See TracChangeset
for help on using the changeset viewer.