prepare(), insert(), update() for wp-includes/ taxonomy.php, rss.php, registration.php

git-svn-id: https://develop.svn.wordpress.org/trunk@6241 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2007-10-13 03:51:11 +00:00
parent 13758c870e
commit 00a44f580a
3 changed files with 44 additions and 48 deletions

View File

@@ -667,9 +667,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);