diff options
Diffstat (limited to 'wp-includes/rss.php')
| -rw-r--r-- | wp-includes/rss.php | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/wp-includes/rss.php b/wp-includes/rss.php index 8746767..18e489d 100644 --- a/wp-includes/rss.php +++ b/wp-includes/rss.php @@ -1,17 +1,26 @@ <?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'); -define('MAGPIE_USER_AGENT', 'WordPressMU/' . $GLOBALS['wp_version']); +define('MAGPIE_USER_AGENT', 'WordPress/' . $GLOBALS['wp_version']); class MagpieRSS { var $parser; @@ -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); |
