diff --git a/wp-admin/help/en/linkcategories.php.help.html b/wp-admin/help/en/linkcategories.php.help.html
new file mode 100644
index 0000000000..c292c89379
--- /dev/null
+++ b/wp-admin/help/en/linkcategories.php.help.html
@@ -0,0 +1,78 @@
+
+
+
+ '."\n";
foreach ($results as $row) {
@@ -90,22 +91,21 @@ $links_show_order = $HTTP_COOKIE_VARS["links_show_order"];
if ($action2 != '')
$action = $action2;
-//error_log("action=$action");
switch ($action) {
case 'Assign':
{
$standalone = 1;
include_once('b2header.php');
-
+
// check the current user's level first.
if ($user_level < $minadminlevel)
die ("Cheatin' uh ?");
-
+
//for each link id (in $linkcheck[]): if the current user level >= the
//userlevel of the owner of the link then we can proceed.
if (count($linkcheck) == 0) {
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
exit;
}
$all_links = join(',', $linkcheck);
@@ -120,21 +120,21 @@ switch ($action) {
$all_links = join(',', $ids_to_change);
$q = $wpdb->query("update $tablelinks SET link_owner='$newowner' WHERE link_id IN ($all_links)");
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
break;
}
case 'Visibility':
{
$standalone = 1;
include_once('b2header.php');
-
+
// check the current user's level first.
if ($user_level < $minadminlevel)
die ("Cheatin' uh ?");
-
+
//for each link id (in $linkcheck[]): toggle the visibility
if (count($linkcheck) == 0) {
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
exit;
}
$all_links = join(',', $linkcheck);
@@ -152,13 +152,13 @@ switch ($action) {
$all_linksoff = join(',', $ids_to_turnoff);
$q = $wpdb->query("update $tablelinks SET link_visible='N' WHERE link_id IN ($all_linksoff)");
}
-
+
if (count($ids_to_turnon)) {
$all_linkson = join(',', $ids_to_turnon);
$q = $wpdb->query("update $tablelinks SET link_visible='Y' WHERE link_id IN ($all_linkson)");
}
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
break;
}
case 'Move':
@@ -168,17 +168,17 @@ switch ($action) {
// check the current user's level first.
if ($user_level < $minadminlevel)
die ("Cheatin' uh ?");
-
+
//for each link id (in $linkcheck[]) change category to selected value
if (count($linkcheck) == 0) {
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
exit;
}
$all_links = join(',', $linkcheck);
// should now have an array of links we can change
$q = $wpdb->query("update $tablelinks SET link_category='$category' WHERE link_id IN ($all_links)");
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
break;
}
@@ -213,7 +213,7 @@ switch ($action) {
. addslashes($link_image) . "', '$link_target', $link_category, '"
. addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) . "', '" . addslashes($link_notes) . "')");
- header('Location: linkmanager.php');
+ header('Location: '.$this_file);
break;
} // end Add
@@ -263,10 +263,9 @@ switch ($action) {
" link_rel='" . addslashes($link_rel) . "',\n" .
" link_notes='" . addslashes($link_notes) . "'\n" .
" WHERE link_id=$link_id");
- //error_log($sql);
} // end if save
setcookie('links_show_cat_id', $links_show_cat_id, time()+600);
- header("Location: linkmanager.php");
+ header('Location: '.$this_file);
break;
} // end Save
@@ -291,7 +290,7 @@ switch ($action) {
}
$links_show_cat_id = $cat_id;
setcookie("links_show_cat_id", $links_show_cat_id, time()+600);
- header("Location: linkmanager.php");
+ header('Location: '.$this_file);
break;
} // end Delete
@@ -382,10 +381,10 @@ switch ($action) {
Visible:
-
+ value="Y">
Yes
-
+ value="N">
No
@@ -465,7 +464,7 @@ switch ($action) {
if ($action != "popup") {
?>
+
-
You can drag link this to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.
+
You can drag link this to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.
';
} else {
$res .= 'There was a problem with ' . $tablename . ' ';
++$error_count;
}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_images enum('Y','N') NOT NULL default 'Y'";
+maybe_add_column($tablename, 'show_images', $ddl);
+if (check_column($tablename, 'show_images', "enum('Y','N')")) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_description enum('Y','N') NOT NULL default 'Y'";
+maybe_add_column($tablename, 'show_description', $ddl);
+if (check_column($tablename, 'show_description', "enum('Y','N')")) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_rating enum('Y','N') NOT NULL default 'Y'";
+maybe_add_column($tablename, 'show_rating', $ddl);
+if (check_column($tablename, 'show_rating', "enum('Y','N')")) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_updated enum('Y','N') NOT NULL default 'Y'";
+maybe_add_column($tablename, 'show_updated', $ddl);
+if (check_column($tablename, 'show_updated', "enum('Y','N')")) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN sort_order varchar(64) NOT NULL default 'name'";
+maybe_add_column($tablename, 'sort_order', $ddl);
+if (check_column($tablename, 'sort_order', "varchar(64)")) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN sort_desc enum('Y','N') NOT NULL default 'N'";
+maybe_add_column($tablename, 'sort_desc', $ddl);
+if (check_column($tablename, 'sort_Desc', "enum('Y','N')")) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN text_before_link varchar(128) not null default ''";
+maybe_add_column($tablename, 'text_before_link', $ddl);
+if (check_column($tablename, 'text_before_link', 'varchar(128)')) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN text_after_link varchar(128) not null default ' '";
+maybe_add_column($tablename, 'text_after_link', $ddl);
+if (check_column($tablename, 'text_after_link', 'varchar(128)')) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN text_after_all varchar(128) not null default ' '";
+maybe_add_column($tablename, 'text_after_all', $ddl);
+if (check_column($tablename, 'text_after_all', 'varchar(128)')) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+$tablename = $tablelinkcategories;
+$ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN list_limit int not null default -1";
+maybe_add_column($tablename, 'list_limit', $ddl);
+if (check_column($tablename, 'list_limit', 'int(11)')) {
+ $res .= $tablename . ' - ok ';
+} else {
+ $res .= 'There was a problem with ' . $tablename . ' ';
+ ++$error_count;
+}
+
+if ($error_count > 0) {
+?>
+Hmmm... there was some kind of error. If you cannot figure out
+ see from the output above how to correct the problems please
+ visit our support
+ forums and report your problem.
+
OK, that wasn't too bad was it? Let's move on to step 2 !
-
Step 2
@@ -104,7 +214,7 @@ CREATE TABLE $tableoptions (
option_id int(11) NOT NULL auto_increment,
blog_id int(11) NOT NULL default 0,
option_name varchar(64) NOT NULL default '',
- option_can_override enum ('Y','N') NOT NULL default 'Y',
+ option_can_override enum('Y','N') NOT NULL default 'Y',
option_type int(11) NOT NULL default 1,
option_value varchar(255) NOT NULL default '',
option_width int NOT NULL default 20,
diff --git a/wp-admin/wp-install-helper.php b/wp-admin/wp-install-helper.php
index 8a3ab8d811..08161c4154 100644
--- a/wp-admin/wp-install-helper.php
+++ b/wp-admin/wp-install-helper.php
@@ -95,10 +95,10 @@ function check_column($table_name, $col_name, $col_type, $is_null = null, $key =
$results = $wpdb->get_results("DESC $table_name");
foreach ($results as $row ) {
- print_r($row);
+ //print_r($row);
if ($row->Field == $col_name) {
// got our column, check the params
- echo ("checking $row->Type != $col_type\n");
+ //echo ("checking $row->Type against $col_type\n");
if (($col_type != null) && ($row->Type != $col_type)) {
++$diffs;
}
@@ -114,8 +114,10 @@ function check_column($table_name, $col_name, $col_type, $is_null = null, $key =
if (($extra != null) && ($row->Extra != $extra)) {
++$diffs;
}
- if ($diffs > 0)
+ if ($diffs > 0) {
+ //echo ("diffs = $diffs returning false\n");
return false;
+ }
return true;
} // end if found our column
}
diff --git a/wp-admin/wp-install.php b/wp-admin/wp-install.php
index 41826e09b0..2bed723a50 100644
--- a/wp-admin/wp-install.php
+++ b/wp-admin/wp-install.php
@@ -89,6 +89,16 @@ if (!$got_cats) {
" cat_id int(11) NOT NULL auto_increment, " .
" cat_name tinytext NOT NULL, ".
" auto_toggle enum ('Y','N') NOT NULL default 'N', ".
+ " show_images enum ('Y','N') NOT NULL default 'Y', " .
+ " show_description enum ('Y','N') NOT NULL default 'Y', " .
+ " show_rating enum ('Y','N') NOT NULL default 'Y', " .
+ " show_updated enum ('Y','N') NOT NULL default 'Y', " .
+ " sort_order varchar(64) NOT NULL default 'name', " .
+ " sort_desc enum('Y','N') NOT NULL default 'N', " .
+ " text_before_link varchar(128) not null default '', " .
+ " text_after_link varchar(128) not null default ' '," .
+ " text_after_all varchar(128) not null default ' ', " .
+ " list_limit int not null default -1, " .
" PRIMARY KEY (cat_id) ".
") ";
$result = mysql_query($sql) or print ("Can't create the table '$tablelinkcategories' in the database. " . $sql . " " . mysql_error());