[wp-cvs] wordpress/wp-admin upgrade-functions.php,1.75,1.76

Matthew Mullenweg saxmatt at users.sourceforge.net
Sun Sep 5 02:41:04 UTC 2004


Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12042/wp-admin

Modified Files:
	upgrade-functions.php 
Log Message:
Set GUID on upgrade. CURRENTLY NOT WORKING. For some reason the get_settings calls aren't working.

Index: upgrade-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upgrade-functions.php,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** upgrade-functions.php	5 Sep 2004 01:22:17 -0000	1.75
--- upgrade-functions.php	5 Sep 2004 02:41:01 -0000	1.76
***************
*** 148,152 ****
  
      // Remove extraneous backslashes.
! 	$posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt FROM $wpdb->posts");
  	if ($posts) {
  		foreach($posts as $post) {
--- 148,152 ----
  
      // Remove extraneous backslashes.
! 	$posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts");
  	if ($posts) {
  		foreach($posts as $post) {
***************
*** 154,158 ****
              $post_title = addslashes(deslash($post->post_title));
              $post_excerpt = addslashes(deslash($post->post_excerpt));
!             $wpdb->query("UPDATE $wpdb->posts SET post_title = '$post_title', post_content = '$post_content', post_excerpt = '$post_excerpt' WHERE ID = '$post->ID'");
  		}
  	}
--- 154,163 ----
              $post_title = addslashes(deslash($post->post_title));
              $post_excerpt = addslashes(deslash($post->post_excerpt));
! 			if ( empty($post->guid) )
! 				$guid = get_option('home') . '/' . get_permalink();
! 			else
! 				$guid = $post->guid;
! 
!             $wpdb->query("UPDATE $wpdb->posts SET post_title = '$post_title', post_content = '$post_content', post_excerpt = '$post_excerpt', guid = '$guid' WHERE ID = '$post->ID'");
  		}
  	}




More information about the cvs mailing list