]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/rss.php
Wordpress 2.5.1
[autoinstalls/wordpress.git] / wp-includes / rss.php
index 76841bf97b0ac7b1f03cace37a0f20ceaaa23284..f91aac545a4d30420b0203984ec3641411056876 100644 (file)
@@ -1,13 +1,22 @@
 <?php
-do_action('load_feed_engine');
+/**
+ * MagpieRSS: a simple RSS integration tool
+ *
+ * A compiled file for RSS syndication
+ *
+ * @author Kellan Elliott-McCrea <kellan@protest.net>
+ * @version 0.51
+ * @license GPL
+ *
+ * @package External
+ * @subpackage MagpieRSS
+ */
 
 /*
- * Project:     MagpieRSS: a simple RSS integration tool
- * File:        A compiled file for RSS syndication
- * Author:      Kellan Elliott-McCrea <kellan@protest.net>
- * Version:            0.51
- * License:            GPL
+ * Hook to use another RSS object instead of MagpieRSS
  */
+do_action('load_feed_engine');
+
 
 define('RSS', 'RSS');
 define('ATOM', 'Atom');
@@ -667,9 +676,10 @@ class RSSCache {
                $cache_option = 'rss_' . $this->file_name( $url );
                $cache_timestamp = 'rss_' . $this->file_name( $url ) . '_ts';
 
-               if ( !$wpdb->get_var("SELECT option_name FROM $wpdb->options WHERE option_name = '$cache_option'") )
+               // shouldn't these be using get_option() ?
+               if ( !$wpdb->get_var( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name = %s", $cache_option ) ) )
                        add_option($cache_option, '', '', 'no');
-               if ( !$wpdb->get_var("SELECT option_name FROM $wpdb->options WHERE option_name = '$cache_timestamp'") )
+               if ( !$wpdb->get_var( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name = %s", $cache_timestamp ) ) )
                        add_option($cache_timestamp, '', '', 'no');
 
                update_option($cache_option, $rss);