From bab03a7a4b892eb8a881f573780654091f6281be Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Tue, 6 Jan 2004 10:33:07 +0000 Subject: [PATCH] Various fixes from forums and such. git-svn-id: https://develop.svn.wordpress.org/trunk@725 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 2 ++ wp-admin/upgrade-functions.php | 6 ++++-- wp-blog-header.php | 2 +- wp-includes/template-functions.php | 2 +- wp-settings.php | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index f201322da4..91b2747c9c 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -167,6 +167,8 @@ switch($action) { if ($post_pingback) { pingback($content, $post_ID); } + + apply_filters('action_publish_post', $post_ID); // Time for trackbacks $to_ping = $wpdb->get_var("SELECT to_ping FROM $tableposts WHERE ID = $post_ID"); diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 76f2b4dab4..44b5cf1c99 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -605,7 +605,7 @@ function upgrade_100() { foreach ($allposts as $post) { // Check to see if it's already been imported $cat = $wpdb->get_row("SELECT * FROM $tablepost2cat WHERE post_id = $post->ID AND category_id = $post->post_category"); - if (!$cat) { // If there's no result + if (!$cat && 0 != $post->post_category) { // If there's no result $wpdb->query(" INSERT INTO $tablepost2cat (post_id, category_id) @@ -617,7 +617,7 @@ function upgrade_100() { } function upgrade_101() { - global $wpdb, $tableoptionvalues; + global $wpdb, $tableoptionvalues, $tablelinkcategories; // Fix possible duplicate problem from CVS $option59 = $wpdb->get_results("SELECT * FROM $tableoptionvalues WHERE option_id = 59"); if (1 < count($option59)) { @@ -626,6 +626,8 @@ function upgrade_101() { // Remove 'automatic' option for comment moderation until it actually does something $wpdb->query("DELETE FROM $tableoptionvalues WHERE optionvalue = 'auto'"); + // Less intrusive default + $wpdb->query("ALTER TABLE `$tablelinkcategories` CHANGE `show_description` `show_description` ENUM( 'Y', 'N' ) DEFAULT 'N' NOT NULL"); } ?> \ No newline at end of file diff --git a/wp-blog-header.php b/wp-blog-header.php index 9491683824..7cfa9a1839 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -6,7 +6,7 @@ $use_cache = 1; // No reason not to $curpath = dirname(__FILE__).'/'; if (!file_exists($curpath . '/wp-config.php')) - die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it."); + die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file."); require_once ($curpath.'/wp-config.php'); diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 9d4b9f9d9a..4967d6d1dc 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -1655,7 +1655,7 @@ function comment_author_link() { } $url = str_replace('http://url', '', $url); - $url = preg_replace('|[^a-z0-9-_.,/:]|i', '', $url); + $url = preg_replace('|[^a-z0-9-_.?=&;,/:]|i', '', $url); if (empty($url) && empty($email)) { echo $author; return; diff --git a/wp-settings.php b/wp-settings.php index d1078ee67a..ca17992651 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -24,7 +24,7 @@ define('WPINC', 'wp-includes'); require (ABSPATH . WPINC . '/wp-db.php'); $wpdb->hide_errors(); -if (!$wpdb->get_row("SELECT * FROM $tableoptions LIMIT 1") && !strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'install.php')) { +if (!$wpdb->get_row("SELECT * FROM $tableusers LIMIT 1") && !strstr($HTTP_SERVER_VARS['REQUEST_URI'], 'install.php')) { die("It doesn't look like you've installed WP yet. Try running install.php."); } $wpdb->show_errors();