Make WordPress Core

Changeset 4831


Ignore:
Timestamp:
01/30/2007 01:43:39 AM (17 years ago)
Author:
ryan
Message:

Remove notoptions caching. Multile rewrite_rules options were being created. See #3692 #2268

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r4787 r4831  
    7676</fieldset>
    7777
     78<fieldset id="tagdiv" class="dbx-box">
     79<h3 class="dbx-handle"><?php _e('Tags') ?></h3>
     80<div class="dbx-content">
     81<p id="jaxtag"></p>
     82<ul id="tagchecklist"><?php dropdown_tags(); ?></ul></div>
     83</fieldset>
     84
    7885<fieldset id="commentstatusdiv" class="dbx-box">
    7986<h3 class="dbx-handle"><?php _e('Discussion') ?></h3>
  • trunk/wp-admin/upgrade-schema.php

    r4574 r4831  
    120120  KEY post_name (post_name),
    121121  KEY type_status_date (post_type,post_status,post_date,ID)
     122);
     123CREATE TABLE $wpdb->tags (
     124  tag_id bigint(20) unsigned NOT NULL auto_increment,
     125  tag varchar(30) NOT NULL default '',
     126  raw_tag varchar(50) NOT NULL default '',
     127  tag_count bigint(20) unsigned NOT NULL default '0',
     128  PRIMARY KEY  (tag_id)
     129);
     130CREATE TABLE $wpdb->tagged (
     131  tag_id bigint(20) unsigned NOT NULL default '0',
     132  post_id bigint(20) unsigned NOT NULL default '0',
     133  PRIMARY KEY  (tag_id,post_id),
     134  KEY tag_id_index (tag_id),
     135  KEY post_id_index (post_id)
    122136);
    123137CREATE TABLE $wpdb->users (
  • trunk/wp-includes/functions.php

    r4820 r4831  
    204204    global $wpdb;
    205205
    206     // prevent non-existent options from triggering multiple queries
    207     if ( true === wp_cache_get($setting, 'notoptions') )
    208         return false;
    209 
    210206    $value = wp_cache_get($setting, 'options');
    211207
     
    220216            $value = $row->option_value;
    221217            wp_cache_set($setting, $value, 'options');
    222         } else { // option does not exist, so we must cache its non-existence
    223             wp_cache_set($setting, true, 'notoptions');
     218        } else {
    224219            return false;
    225220        }
     
    280275    }
    281276
    282     if ( true === wp_cache_get($option_name, 'notoptions') )
    283         wp_cache_delete($option_name, 'notoptions');
    284 
    285277    $_newvalue = $newvalue;
    286278    $newvalue = maybe_serialize($newvalue);
     
    302294    global $wpdb;
    303295
    304     // Make sure the option doesn't already exist we can check the cache before we ask for a db query
    305     if ( true === wp_cache_get($name, 'notoptions') )
    306         wp_cache_delete($name, 'notoptions');
    307     else
    308         if ( false !== get_option($name) )
    309             return;
     296    // Make sure the option doesn't already exist
     297    if ( false !== get_option($name) )
     298        return;
    310299
    311300    $value = maybe_serialize($value);
  • trunk/wp-includes/post.php

    r4821 r4831  
    522522    }
    523523    $post_cat = $post_category[0];
     524
     525    if ( empty($post_tags) )
     526        $post_tags = array();
    524527
    525528    if ( empty($post_author) )
     
    647650
    648651    wp_set_post_categories($post_ID, $post_category);
     652    wp_set_post_tags($post_ID, $post_tags);
    649653
    650654    if ( 'page' == $post_type ) {
  • trunk/wp-includes/version.php

    r4785 r4831  
    44
    55$wp_version = '2.2-bleeding';
    6 $wp_db_version = 4772;
     6$wp_db_version = 4815;
    77
    88?>
  • trunk/wp-includes/wp-db.php

    r4741 r4831  
    3535    var $optiongroup_options;
    3636    var $postmeta;
     37    var $tags;
     38    var $tagged;
    3739
    3840    /**
  • trunk/wp-settings.php

    r4763 r4831  
    117117$wpdb->postmeta       = $wpdb->prefix . 'postmeta';
    118118$wpdb->usermeta       = $wpdb->prefix . 'usermeta';
     119$wpdb->tags           = $wpdb->prefix . 'tags';
     120$wpdb->tagged         = $wpdb->prefix . 'tagged';
    119121
    120122if ( defined('CUSTOM_USER_TABLE') )
Note: See TracChangeset for help on using the changeset viewer.