Changeset 6184
- Timestamp:
- 10/03/2007 04:26:16 PM (17 years ago)
- Location:
- branches/2.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/wp-admin/includes/template.php
r6089 r6184 494 494 $current = ''; 495 495 496 echo "\n\t<option value='$item->ID'$current>$pad $item->post_title</option>";496 echo "\n\t<option value='$item->ID'$current>$pad " . wp_specialchars($item->post_title) . "</option>"; 497 497 parent_dropdown( $default, $item->ID, $level +1 ); 498 498 } -
branches/2.3/wp-includes/post.php
r6155 r6184 103 103 } elseif ( is_object($post) ) { 104 104 if ( 'page' == $post->post_type ) 105 return get_page($post, $output );105 return get_page($post, $output, $filter); 106 106 if ( !isset($post_cache[$blog_id][$post->ID]) ) 107 107 $post_cache[$blog_id][$post->ID] = &$post; … … 112 112 $_post = & $post_cache[$blog_id][$post]; 113 113 elseif ( $_post = wp_cache_get($post, 'pages') ) 114 return get_page($_post, $output );114 return get_page($_post, $output, $filter); 115 115 else { 116 116 $query = "SELECT * FROM $wpdb->posts WHERE ID = '$post' LIMIT 1"; 117 117 $_post = & $wpdb->get_row($query); 118 118 if ( 'page' == $_post->post_type ) 119 return get_page($_post, $output );119 return get_page($_post, $output, $filter); 120 120 $post_cache[$blog_id][$post] = & $_post; 121 121 } … … 973 973 // Retrieves page data given a page ID or page object. 974 974 // Handles page caching. 975 function &get_page(&$page, $output = OBJECT ) {975 function &get_page(&$page, $output = OBJECT, $filter = 'raw') { 976 976 global $wpdb, $blog_id; 977 977 … … 986 986 } elseif ( is_object($page) ) { 987 987 if ( 'post' == $page->post_type ) 988 return get_post($page, $output );988 return get_post($page, $output, $filter); 989 989 wp_cache_add($page->ID, $page, 'pages'); 990 990 $_page = $page; … … 999 999 wp_cache_add($_page->ID, $_page, 'pages'); 1000 1000 } elseif ( isset($GLOBALS['post_cache'][$blog_id][$page]) ) { // it's actually a page, and is cached 1001 return get_post($page, $output );1001 return get_post($page, $output, $filter); 1002 1002 } else { // it's not in any caches, so off to the DB we go 1003 1003 // Why are we using assignment for this query? 1004 1004 $_page = & $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID= '$page' LIMIT 1"); 1005 1005 if ( 'post' == $_page->post_type ) 1006 return get_post($_page, $output );1006 return get_post($_page, $output, $filter); 1007 1007 // Potential issue: we're not checking to see if the post_type = 'page' 1008 1008 // So all non-'post' posts will get cached as pages. … … 1011 1011 } 1012 1012 } 1013 1014 $_page = sanitize_post($_page, $filter); 1013 1015 1014 1016 // at this point, one way or another, $_post contains the page object
Note: See TracChangeset
for help on using the changeset viewer.