$first_post = get_site_option( 'first_post' );
if ( empty($first_post) )
- $first_post = stripslashes( __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ) );
+ $first_post = __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' );
$first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post );
$first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post );
update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
- update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array ( ), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'sidebar-2' => array ( ), 'sidebar-3' => array ( ), 'array_version' => 3 ) );
+ update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'sidebar-2' => array (),'array_version' => 3 ) );
if ( ! is_multisite() )
update_user_meta( $user_id, 'show_welcome_panel', 1 );
foreach ($categories as $category) {
if ('' == $category->category_nicename) {
$newtitle = sanitize_title($category->cat_name);
- $wpdb>update( $wpdb->categories, array('category_nicename' => $newtitle), array('cat_ID' => $category->cat_ID) );
+ $wpdb->update( $wpdb->categories, array('category_nicename' => $newtitle), array('cat_ID' => $category->cat_ID) );
}
}
$users = $wpdb->get_results("SELECT * FROM $wpdb->users");
foreach ( $users as $user ) :
if ( !empty( $user->user_firstname ) )
- update_user_meta( $user->ID, 'first_name', $wpdb->escape($user->user_firstname) );
+ update_user_meta( $user->ID, 'first_name', wp_slash($user->user_firstname) );
if ( !empty( $user->user_lastname ) )
- update_user_meta( $user->ID, 'last_name', $wpdb->escape($user->user_lastname) );
+ update_user_meta( $user->ID, 'last_name', wp_slash($user->user_lastname) );
if ( !empty( $user->user_nickname ) )
- update_user_meta( $user->ID, 'nickname', $wpdb->escape($user->user_nickname) );
+ update_user_meta( $user->ID, 'nickname', wp_slash($user->user_nickname) );
if ( !empty( $user->user_level ) )
update_user_meta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level );
if ( !empty( $user->user_icq ) )
- update_user_meta( $user->ID, 'icq', $wpdb->escape($user->user_icq) );
+ update_user_meta( $user->ID, 'icq', wp_slash($user->user_icq) );
if ( !empty( $user->user_aim ) )
- update_user_meta( $user->ID, 'aim', $wpdb->escape($user->user_aim) );
+ update_user_meta( $user->ID, 'aim', wp_slash($user->user_aim) );
if ( !empty( $user->user_msn ) )
- update_user_meta( $user->ID, 'msn', $wpdb->escape($user->user_msn) );
+ update_user_meta( $user->ID, 'msn', wp_slash($user->user_msn) );
if ( !empty( $user->user_yim ) )
- update_user_meta( $user->ID, 'yim', $wpdb->escape($user->user_icq) );
+ update_user_meta( $user->ID, 'yim', wp_slash($user->user_icq) );
if ( !empty( $user->user_description ) )
- update_user_meta( $user->ID, 'description', $wpdb->escape($user->user_description) );
+ update_user_meta( $user->ID, 'description', wp_slash($user->user_description) );
if ( isset( $user->user_idmode ) ):
$idmode = $user->user_idmode;
foreach ( $link_cats as $category) {
$cat_id = (int) $category->cat_id;
$term_id = 0;
- $name = $wpdb->escape($category->cat_name);
+ $name = wp_slash($category->cat_name);
$slug = sanitize_title($name);
$term_group = 0;
update_site_option( 'ms_files_rewriting', '1' );
// 3.5.2
- if ( $wp_current_db_version < 22442 ) {
+ if ( $wp_current_db_version < 24448 ) {
$illegal_names = get_site_option( 'illegal_names' );
if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) {
$illegal_name = reset( $illegal_names );
if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting || 'tag_base' == $setting )
$option = untrailingslashit( $option );
- @ $kellogs = unserialize( $option );
- if ( $kellogs !== false )
- return $kellogs;
- else
- return $option;
+ return maybe_unserialize( $option );
}
/**
// Get the default value from the array
//echo "{$cfields[strtolower($tablefield->Field)]}<br>";
- if (preg_match("| DEFAULT '(.*)'|i", $cfields[strtolower($tablefield->Field)], $matches)) {
+ if (preg_match("| DEFAULT '(.*?)'|i", $cfields[strtolower($tablefield->Field)], $matches)) {
$default_value = $matches[1];
if ($tablefield->Default != $default_value) {
// Add a query to change the column's default value
foreach ( (array) $indices as $index ) {
// Push a query line into $cqueries that adds the index to that table
$cqueries[] = "ALTER TABLE {$table} ADD $index";
- $for_update[$table.'.'.$fieldname] = 'Added index '.$table.' '.$index;
+ $for_update[] = 'Added index ' . $table . ' ' . $index;
}
// Remove the original table creation query from processing