Various fixes from forums and such.

git-svn-id: http://svn.automattic.com/wordpress/trunk@725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-01-06 10:33:07 +00:00
parent 0cfd832cbe
commit 0d24e188a0
5 changed files with 9 additions and 5 deletions

View File

@ -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");

View File

@ -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");
}
?>

View File

@ -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 <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>.");
die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='wp-admin/install-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.");
require_once ($curpath.'/wp-config.php');

View File

@ -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;

View File

@ -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 <a href='wp-admin/install.php'>install.php</a>.");
}
$wpdb->show_errors();