summaryrefslogtreecommitdiffstats
path: root/wp-admin/upgrade-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-09 15:17:25 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-09 15:17:25 +0000
commit492aa4ee7086ed94cb2f37a2bce3b52905841659 (patch)
tree825b6d0ae66246bae7a65c1f610a65b59789a6b5 /wp-admin/upgrade-functions.php
parent359223a4711934ea6ec20e4c7613832e1f1132b5 (diff)
downloadwordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.tar.gz
wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.tar.xz
wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.zip
WP Merge to rev 5007
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@909 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/upgrade-functions.php')
-rw-r--r--wp-admin/upgrade-functions.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php
index e0c347c..b7a1f93 100644
--- a/wp-admin/upgrade-functions.php
+++ b/wp-admin/upgrade-functions.php
@@ -451,7 +451,7 @@ function upgrade_160() {
if ( 0 == $wpdb->get_var("SELECT SUM(category_count) FROM $wpdb->categories") ) { // Create counts
$categories = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories");
foreach ( $categories as $cat_id ) {
- $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->post2cat, $wpdb->posts WHERE $wpdb->posts.ID=$wpdb->post2cat.post_id AND post_type='post' AND post_status='publish' AND category_id = '$cat_id'");
+ $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->post2cat, $wpdb->posts WHERE $wpdb->posts.ID=$wpdb->post2cat.post_id AND post_status='publish' AND category_id = '$cat_id'");
$wpdb->query("UPDATE $wpdb->categories SET category_count = '$count' WHERE cat_ID = '$cat_id'");
}
}
@@ -931,7 +931,7 @@ function make_site_theme_from_oldschool($theme_name, $template) {
if ($oldfile == 'index.php') { // Check to make sure it's not a new index
$index = implode('', file("$oldpath/$oldfile"));
- if ( strstr( $index, 'WP_USE_THEMES' ) ) {
+ if (strpos($index, 'WP_USE_THEMES') !== false) {
if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile"))
return false;
continue; // Don't copy anything
@@ -1003,12 +1003,12 @@ function make_site_theme_from_default($theme_name, $template) {
$f = fopen("$site_dir/style.css", 'w');
foreach ($stylelines as $line) {
- if (strstr($line, "Theme Name:")) $line = "Theme Name: $theme_name";
- elseif (strstr($line, "Theme URI:")) $line = "Theme URI: " . __get_option('siteurl');
- elseif (strstr($line, "Description:")) $line = "Description: Your theme";
- elseif (strstr($line, "Version:")) $line = "Version: 1";
- elseif (strstr($line, "Author:")) $line = "Author: You";
- fwrite($f, "{$line}\n");
+ if (strpos($line, 'Theme Name:') !== false) $line = 'Theme Name: ' . $theme_name;
+ elseif (strpos($line, 'Theme URI:') !== false) $line = 'Theme URI: ' . __get_option('url');
+ elseif (strpos($line, 'Description:') !== false) $line = 'Description: Your theme.';
+ elseif (strpos($line, 'Version:') !== false) $line = 'Version: 1';
+ elseif (strpos($line, 'Author:') !== false) $line = 'Author: You';
+ fwrite($f, $line . "\n");
}
fclose($f);
}