[wp-cvs] wordpress/wp-admin admin-functions.php,1.48,1.49
Ryan Boren
rboren at users.sourceforge.net
Fri Oct 8 00:16:46 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11427
Modified Files:
admin-functions.php
Log Message:
Check to see if any pages exist when generating page rewrite rules. Bug 345. Patch from MC_incubus.
Index: admin-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-functions.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** admin-functions.php 6 Oct 2004 06:20:51 -0000 1.48
--- admin-functions.php 8 Oct 2004 00:16:44 -0000 1.49
***************
*** 521,535 ****
$page_rewrite_rules = array();
!
! foreach ($posts as $post) {
! // URI => page name
! $uri = get_page_uri($post->ID);
!
! $page_rewrite_rules[$uri] = $post->post_name;
}
-
- update_option('page_uris', $page_rewrite_rules);
-
- save_mod_rewrite_rules();
}
--- 521,537 ----
$page_rewrite_rules = array();
!
! if ($posts) {
! foreach ($posts as $post) {
! // URI => page name
! $uri = get_page_uri($post->ID);
!
! $page_rewrite_rules[$uri] = $post->post_name;
! }
!
! update_option('page_uris', $page_rewrite_rules);
!
! save_mod_rewrite_rules();
}
}
More information about the cvs
mailing list