Ticket #4007: is_installed_option.diff
File is_installed_option.diff, 1.7 KB (added by , 17 years ago) |
---|
-
wp-admin/upgrade-functions.php
24 24 $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 25 25 update_option('siteurl', $guessurl); 26 26 27 28 $temp_file=file_get_contents('../wp-config.php'); 29 $temp_file=str_replace("define('SITE_URL','')","define('SITE_URL','$guessurl')",$temp_file); 30 $handle = fopen('../wp-config.php', 'w'); 31 32 fwrite($handle,$temp_file); 33 fclose($handle); 34 unset($configFile); 35 27 36 // If not a public blog, don't ping. 28 37 if ( ! $public ) 29 38 update_option('default_pingback_flag', 0); -
wp-config-sample.php
6 6 define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value 7 7 define('DB_CHARSET', 'utf8'); 8 8 define('DB_COLLATE', ''); 9 9 define('SITE_URL',''); 10 10 // You can have multiple installations in one database if you give each a unique prefix 11 11 $table_prefix = 'wp_'; // Only numbers, letters, and underscores please! 12 12 -
wp-includes/functions.php
989 989 } 990 990 991 991 function is_blog_installed() { 992 993 if (defined('SITE_URL') && SITE_URL!=='') return SITE_URL; 994 992 995 global $wpdb; 993 996 $wpdb->hide_errors(); 994 997 $installed = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");