Remove optiongroups table.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7e1cc4c8c0
commit
6b43f65c25
|
@ -342,21 +342,6 @@ CREATE TABLE $wpdb->options (
|
||||||
";
|
";
|
||||||
$q = $wpdb->query($query);
|
$q = $wpdb->query($query);
|
||||||
|
|
||||||
$query = "
|
|
||||||
CREATE TABLE $wpdb->optiongroups (
|
|
||||||
group_id int(11) NOT NULL auto_increment,
|
|
||||||
group_name varchar(64) not null,
|
|
||||||
group_desc varchar(255),
|
|
||||||
group_longdesc tinytext,
|
|
||||||
PRIMARY KEY (group_id)
|
|
||||||
)
|
|
||||||
";
|
|
||||||
$q = $wpdb->query($query);
|
|
||||||
|
|
||||||
|
|
||||||
// $query = "DROP TABLE IF EXISTS $wpdb->optiongroup_options";
|
|
||||||
// $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$wpdb->optiongroup_options\" in the database.");
|
|
||||||
|
|
||||||
$query = "
|
$query = "
|
||||||
CREATE TABLE $wpdb->optiongroup_options (
|
CREATE TABLE $wpdb->optiongroup_options (
|
||||||
group_id int(11) NOT NULL,
|
group_id int(11) NOT NULL,
|
||||||
|
@ -418,7 +403,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(53,'time_format', 3, 'g:i a', 'see note for format characters', 4, 20)",
|
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(53,'time_format', 3, 'g:i a', 'see note for format characters', 4, 20)",
|
||||||
|
|
||||||
//'pages' of options
|
//'pages' of options
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(1, 'Other Options', 'Posts per page etc. Original options page')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,48,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,48,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,49,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,49,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,50,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,50,3 )",
|
||||||
|
@ -426,7 +410,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,52,5 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,52,5 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,53,6 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(1,53,6 )",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(2, 'General blog settings', 'Things you\'ll probably want to tweak')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,9 ,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,9 ,1 )",
|
||||||
//"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,10,2 )",
|
//"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,10,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,11,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,11,3 )",
|
||||||
|
@ -440,7 +423,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,19,11)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,19,11)",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,20,12)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(2,20,12)",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(3, 'RSS/RDF Feeds, Track/Ping-backs', 'Settings for RSS/RDF Feeds, Track/ping-backs')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,21,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,21,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,22,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,22,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,23,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,23,3 )",
|
||||||
|
@ -452,7 +434,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,29,9 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,29,9 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,30,10)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(3,30,10)",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(4, 'File uploads', 'Settings for file uploads')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,31,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,31,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,32,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,32,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,33,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,33,3 )",
|
||||||
|
@ -461,7 +442,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,36,6 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,36,6 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,37,7 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(4,37,7 )",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(5, 'Blog-by-Email settings', 'Settings for blogging via email')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,38,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,38,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,39,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,39,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,40,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,40,3 )",
|
||||||
|
@ -473,7 +453,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,46,9 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,46,9 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,47,10)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(5,47,10)",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(6, 'Base settings', 'Basic settings required to get your blog working')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,1,1)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,1,1)",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,2,2)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,2,2)",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,3,3)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,3,3)",
|
||||||
|
@ -498,7 +477,6 @@ $option_data = array(
|
||||||
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(59,'default_post_category', 7, '1', 'The default category for each new post', 8, 20)",
|
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(59,'default_post_category', 7, '1', 'The default category for each new post', 8, 20)",
|
||||||
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(83,'default_post_edit_rows', 1, '9', 'The number of rows in the edit post form (min 3, max 100)', 8, 5)",
|
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(83,'default_post_edit_rows', 1, '9', 'The number of rows in the edit post form (min 3, max 100)', 8, 5)",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(7, 'Default post options', 'Default settings for new posts.')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,55,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,55,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,56,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,56,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,57,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,57,3 )",
|
||||||
|
@ -541,7 +519,6 @@ $links_option_data = array(
|
||||||
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(82,'links_recently_updated_time', 1, '120', 'The time in minutes to consider a link recently updated', 8, 20)",
|
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(82,'links_recently_updated_time', 1, '120', 'The time in minutes to consider a link recently updated', 8, 20)",
|
||||||
|
|
||||||
//group them together
|
//group them together
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(8, 'Link Manager Settings', 'Various settings for the link manager.')",
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,60,1 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,60,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,61,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,61,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,62,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,62,3 )",
|
||||||
|
@ -581,7 +558,6 @@ $geo_option_data = array(
|
||||||
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(86,'default_geourl_lat ', 8, 0.0, 'The default Latitude ICBM value - <a href=\"http://www.geourl.org/resources.html\" target=\"_blank\">see here</a>', 8, 20)",
|
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(86,'default_geourl_lat ', 8, 0.0, 'The default Latitude ICBM value - <a href=\"http://www.geourl.org/resources.html\" target=\"_blank\">see here</a>', 8, 20)",
|
||||||
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(87,'default_geourl_lon', 8, 0.0, 'The default Longitude ICBM value', 8, 20)",
|
"INSERT INTO $wpdb->options (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(87,'default_geourl_lon', 8, 0.0, 'The default Longitude ICBM value', 8, 20)",
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES(9,'Geo Options', 'Settings which control the posting and display of Geo Options')",
|
|
||||||
|
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(9,84,1)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(9,84,1)",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(9,85,1)",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(9,85,1)",
|
||||||
|
|
|
@ -3,19 +3,6 @@
|
||||||
if ($user_level <= 6) {
|
if ($user_level <= 6) {
|
||||||
die( __('You have do not have sufficient permissions to edit the options for this blog.') );
|
die( __('You have do not have sufficient permissions to edit the options for this blog.') );
|
||||||
}
|
}
|
||||||
|
|
||||||
//we need to iterate through the available option groups.
|
|
||||||
$groups = '';
|
|
||||||
$option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $wpdb->optiongroups ORDER BY group_id");
|
|
||||||
foreach ($option_groups as $option_group) {
|
|
||||||
if ($option_group->group_id == $option_group_id) {
|
|
||||||
$current_desc = $option_group->group_desc;
|
|
||||||
$current_long_desc = $option_group->group_longdesc;
|
|
||||||
$groups .= "<li><a class='current' title='{$option_group->group_desc}'>{$option_group->group_name}</a></li>\n";
|
|
||||||
} else {
|
|
||||||
$groups .= "<li><a href='options.php?option_group_id={$option_group->group_id}' title='{$option_group->group_desc}'>{$option_group->group_name}</a></li>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
|
|
|
@ -125,32 +125,7 @@ default:
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php include('options-head.php'); ?>
|
||||||
if ($non_was_selected) { // no group pre-selected, display opening page
|
|
||||||
?>
|
|
||||||
<div class="wrap">
|
|
||||||
<dl>
|
|
||||||
<?php
|
|
||||||
//iterate through the available option groups. output them as a definition list.
|
|
||||||
$option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $wpdb->optiongroups ORDER BY group_id");
|
|
||||||
foreach ($option_groups as $option_group) {
|
|
||||||
echo(" <dt><a href=\"$this_file?option_group_id={$option_group->group_id}\" title=\"{$option_group->group_desc}\">{$option_group->group_name}</a></dt>\n");
|
|
||||||
$current_long_desc = $option_group->group_longdesc;
|
|
||||||
if ($current_long_desc == '') {
|
|
||||||
$current_long_desc = __('No help for this group of options.');
|
|
||||||
}
|
|
||||||
echo(" <dd>{$option_group->group_desc}: $current_long_desc</dd>\n");
|
|
||||||
} // end for each group
|
|
||||||
?>
|
|
||||||
<dt><a href="options-permalink.php"><?php _e('Permalinks') ?></a></dt>
|
|
||||||
<dd><?php _e('Permanent link configuration') ?></dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
} else { //there was a group selected.
|
|
||||||
include('options-head.php');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php echo $current_desc; ?></h2>
|
<h2><?php echo $current_desc; ?></h2>
|
||||||
|
|
|
@ -71,13 +71,6 @@ CREATE TABLE $wpdb->optiongroup_options (
|
||||||
seq int(11) NOT NULL default '0',
|
seq int(11) NOT NULL default '0',
|
||||||
PRIMARY KEY (group_id,option_id)
|
PRIMARY KEY (group_id,option_id)
|
||||||
);
|
);
|
||||||
CREATE TABLE $wpdb->optiongroups (
|
|
||||||
group_id int(11) NOT NULL auto_increment,
|
|
||||||
group_name varchar(64) NOT NULL default '',
|
|
||||||
group_desc varchar(255) default NULL,
|
|
||||||
group_longdesc tinytext,
|
|
||||||
PRIMARY KEY (group_id)
|
|
||||||
);
|
|
||||||
CREATE TABLE $wpdb->options (
|
CREATE TABLE $wpdb->options (
|
||||||
option_id int(11) NOT NULL auto_increment,
|
option_id int(11) NOT NULL auto_increment,
|
||||||
blog_id int(11) NOT NULL default '0',
|
blog_id int(11) NOT NULL default '0',
|
||||||
|
@ -217,15 +210,6 @@ function upgrade_072() {
|
||||||
PRIMARY KEY (option_id, blog_id, option_name)
|
PRIMARY KEY (option_id, blog_id, option_name)
|
||||||
)
|
)
|
||||||
");
|
");
|
||||||
maybe_create_table($wpdb->optiongroups, "
|
|
||||||
CREATE TABLE $wpdb->optiongroups (
|
|
||||||
group_id int(11) NOT NULL auto_increment,
|
|
||||||
group_name varchar(64) not null,
|
|
||||||
group_desc varchar(255),
|
|
||||||
group_longdesc tinytext,
|
|
||||||
PRIMARY KEY (group_id)
|
|
||||||
)
|
|
||||||
");
|
|
||||||
maybe_create_table($wpdb->optiongroup_options, "
|
maybe_create_table($wpdb->optiongroup_options, "
|
||||||
CREATE TABLE $wpdb->optiongroup_options (
|
CREATE TABLE $wpdb->optiongroup_options (
|
||||||
group_id int(11) NOT NULL,
|
group_id int(11) NOT NULL,
|
||||||
|
@ -328,25 +312,6 @@ $guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $HTTP_HOST . $REQUES
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$option_groups = array(
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (1, 'Other Options', 'Posts per page etc. Original options page')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (2, 'General blog settings', 'Things you\'ll probably want to tweak')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (3, 'RSS/RDF Feeds, Track/Ping-backs', 'Settings for RSS/RDF Feeds, Track/ping-backs')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (4, 'File uploads', 'Settings for file uploads')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (5, 'Blog-by-Email settings', 'Settings for blogging via email')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (6, 'Base settings', 'Basic settings required to get your blog working')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (7, 'Default post options', 'Default settings for new posts.')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (8, 'Link Manager Settings', 'Various settings for the link manager.')",
|
|
||||||
"INSERT INTO $wpdb->optiongroups (group_id, group_name, group_desc) VALUES (9, 'Geo Options', 'Settings which control the posting and display of Geo Options')");
|
|
||||||
|
|
||||||
foreach ($option_groups as $query) {
|
|
||||||
$option_id = preg_match('|VALUES \(([0-9]+)|', $query, $matches);
|
|
||||||
$option_id = $matches[1];
|
|
||||||
if(!$wpdb->get_var("SELECT * FROM $wpdb->optiongroups WHERE group_id = '$option_id'")) {
|
|
||||||
$wpdb->query($query);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$optiongroup_options = array ( "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES (1,48,1 )",
|
$optiongroup_options = array ( "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES (1,48,1 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES (1,49,2 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES (1,49,2 )",
|
||||||
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES (1,50,3 )",
|
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES (1,50,3 )",
|
||||||
|
@ -514,7 +479,6 @@ function upgrade_100() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$oid = $wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'comment_moderation'");
|
$oid = $wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'comment_moderation'");
|
||||||
$gid = $wpdb->get_var("SELECT group_id FROM $wpdb->optiongroups WHERE group_name = 'General blog settings'");
|
|
||||||
$seq = $wpdb->get_var("SELECT MAX(seq) FROM $wpdb->optiongroup_options WHERE group_id = '$gid'");
|
$seq = $wpdb->get_var("SELECT MAX(seq) FROM $wpdb->optiongroup_options WHERE group_id = '$gid'");
|
||||||
++$seq;
|
++$seq;
|
||||||
if (!$wpdb->get_row("SELECT * FROM $wpdb->optiongroup_options WHERE group_id = '$gid' AND option_id = '$oid'")) {
|
if (!$wpdb->get_row("SELECT * FROM $wpdb->optiongroup_options WHERE group_id = '$gid' AND option_id = '$oid'")) {
|
||||||
|
@ -692,17 +656,6 @@ function upgrade_110() {
|
||||||
$wpdb->query('UPDATE '.$wpdb->users.' SET user_pass = MD5(\''.$row->user_pass.'\') WHERE ID = \''.$row->ID.'\'');
|
$wpdb->query('UPDATE '.$wpdb->users.' SET user_pass = MD5(\''.$row->user_pass.'\') WHERE ID = \''.$row->ID.'\'');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 1");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 2");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 3");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 4");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 5");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 6");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 7");
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->optiongroups WHERE group_id = 9");
|
|
||||||
|
|
||||||
$wpdb->query("UPDATE $wpdb->optiongroups SET group_name = 'Link Manager' WHERE group_id = 8");
|
|
||||||
|
|
||||||
// Add blog_charset option
|
// Add blog_charset option
|
||||||
if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'blog_charset'")) {
|
if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'blog_charset'")) {
|
||||||
|
@ -878,6 +831,7 @@ function upgrade_130() {
|
||||||
// Obsolete tables
|
// Obsolete tables
|
||||||
$wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optionvalues');
|
$wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optionvalues');
|
||||||
$wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optiontypes');
|
$wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optiontypes');
|
||||||
|
$wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optiongroups');
|
||||||
}
|
}
|
||||||
|
|
||||||
// The functions we use to actually do stuff
|
// The functions we use to actually do stuff
|
||||||
|
|
Loading…
Reference in New Issue