Changeset 6300
- Timestamp:
- 10/31/2007 03:59:18 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r6240 r6300 21 21 var $col_info; 22 22 var $queries; 23 var $prefix = ''; 23 24 24 25 // Our tables … … 30 31 var $links; 31 32 var $options; 32 var $optiontypes;33 var $optionvalues;34 var $optiongroups;35 var $optiongroup_options;36 33 var $postmeta; 37 34 var $usermeta; … … 39 36 var $term_taxonomy; 40 37 var $term_relationships; 41 38 var $tables = array('users', 'usermeta', 'posts', 'categories', 'post2cat', 'comments', 'links', 'link2cat', 'options', 39 'postmeta', 'terms', 'term_taxonomy', 'term_relationships'); 42 40 var $charset; 43 41 var $collate; … … 85 83 function __destruct() { 86 84 return true; 85 } 86 87 function set_prefix($prefix) { 88 89 if ( preg_match('|[^a-z0-9_]|i', $prefix) ) 90 return new WP_Error('invalid_db_prefix', 'Invalid database prefix'); // No gettext here 91 92 $old_prefix = $this->prefix; 93 $this->prefix = $prefix; 94 95 foreach ( $this->tables as $table ) 96 $this->$table = $this->prefix . $table; 97 98 if ( defined('CUSTOM_USER_TABLE') ) 99 $this->users = CUSTOM_USER_TABLE; 100 101 if ( defined('CUSTOM_USER_META_TABLE') ) 102 $this->usermeta = CUSTOM_USER_META_TABLE; 103 104 return $old_prefix; 87 105 } 88 106
Note: See TracChangeset
for help on using the changeset viewer.