Changeset 835
- Timestamp:
- 01/09/07 11:30:05 (2 years ago)
- Files:
-
- trunk/wp-admin/moderation.php (modified) (1 diff)
- trunk/wp-admin/upload.css (modified) (1 diff)
- trunk/wp-admin/upload.php (modified) (1 diff)
- trunk/wp-content/themes/default/sidebar.php (modified) (2 diffs)
- trunk/wp-includes/category-template.php (modified) (1 diff)
- trunk/wp-includes/category.php (modified) (3 diffs)
- trunk/wp-includes/comment.php (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/moderation.php
r828 r835 124 124 <p><?php comment_date('M j, g:i A'); ?> — [ <?php 125 125 echo '<a href="comment.php?action=editcomment&c='.$comment->comment_ID.'">' . __('Edit') . '</a> | '; 126 echo " <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by "%s".\n"Cancel" to stop, "OK" to delete."), $comment->comment_author )) . "', theCommentList );\">" . __('Delete') . "</a> | "; ?>126 echo " <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author )) . "', theCommentList );\">" . __('Delete') . "</a> | "; ?> 127 127 <?php 128 128 $post = get_post($comment->comment_post_ID); trunk/wp-admin/upload.css
r816 r835 106 106 } 107 107 108 .wrap h2 { 109 margin: .4em 0 .5em; 110 display: block; 111 border-bottom: .5em solid #e5f3ff; 112 color: #333; 113 font: normal 32px/5px serif; 114 clear: both; 115 } 116 117 * html .wrap h2 { 118 margin-top: 1em; 119 } 120 108 121 .back { 109 122 display: block; trunk/wp-admin/upload.php
r828 r835 80 80 add_action( 'admin_head', 'wp_upload_admin_head' ); 81 81 include_once('admin-header.php'); 82 echo "<div class='wrap'>"; 82 ?> 83 <div class='wrap'> 84 <h2><?php _e('Uploads'); ?></h2> 85 <?php 83 86 endif; 84 87 trunk/wp-content/themes/default/sidebar.php
r810 r835 47 47 </li> 48 48 49 <?php wp_list_pages('title_li=<h2>Pages</h2> &sort_column=post_title&sort_order=ASC'); ?>49 <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> 50 50 51 51 <li><h2>Archives</h2> … … 55 55 </li> 56 56 57 <?php wp_list_categories(' optioncount=1&hierarchical=0&title_li=<h2>Categories</h2>'); ?>57 <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?> 58 58 59 59 <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> trunk/wp-includes/category-template.php
r819 r835 225 225 'hierarchical' => true, 'title_li' => __('Categories')); 226 226 $r = array_merge($defaults, $r); 227 if ( !isset($r['pad_counts']) && $r['show_count'] && $r['hierarchical'] ) 228 $r['pad_counts'] = true; 227 229 if ( isset($r['show_date']) ) 228 230 $r['include_last_update_time'] = $r['show_date']; trunk/wp-includes/category.php
r823 r835 22 22 $defaults = array('type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC', 23 23 'hide_empty' => true, 'include_last_update_time' => false, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 24 'number' => '' );24 'number' => '', 'pad_counts' => false); 25 25 $r = array_merge($defaults, $r); 26 26 if ( 'count' == $r['orderby'] ) … … 110 110 111 111 // Update category counts to include children. 112 if ( $hierarchical ) { 112 if ( $pad_counts ) 113 _pad_category_counts($type, $categories); 114 115 // Make sure we show empty categories that have children. 116 if ( $hierarchical && $hide_empty ) { 113 117 foreach ( $categories as $k => $category ) { 114 $progeny = 'link' == $type ? $category->link_count : $category->category_count;115 if ( $children = _get_cat_children($category->cat_ID, $categories) ) {118 if ( ! $category->{'link' == $type ? 'link_count' : 'category_count'} ) { 119 $children = _get_cat_children($category->cat_ID, $categories); 116 120 foreach ( $children as $child ) 117 $progeny += 'link' == $type ? $child->link_count : $child->category_count; 121 if ( $child->{'link' == $type ? 'link_count' : 'category_count'} ) 122 continue 2; 123 124 // It really is empty 125 unset($categories[$k]); 118 126 } 119 if ( !$progeny && $hide_empty )120 unset($categories[$k]);121 else122 $categories[$k]->{'link' == $type ? 'link_count' : 'category_count'} = $progeny;123 127 } 124 128 } … … 257 261 } 258 262 263 // Recalculates link or post counts by including items from child categories 264 // Assumes all relevant children are already in the $categories argument 265 function _pad_category_counts($type, &$categories) { 266 global $wpdb; 267 268 // Set up some useful arrays 269 foreach ( $categories as $key => $cat ) { 270 $cats[$cat->cat_ID] = & $categories[$key]; 271 $cat_IDs[] = $cat->cat_ID; 272 } 273 274 // Get the relevant post2cat or link2cat records and stick them in a lookup table 275 if ( $type == 'post' ) { 276 $results = $wpdb->get_results("SELECT post_id, category_id FROM $wpdb->post2cat LEFT JOIN $wpdb->posts ON post_id = ID WHERE category_id IN (".join(',', $cat_IDs).") AND post_type = 'post' AND post_status = 'publish'"); 277 foreach ( $results as $row ) 278 ++$cat_items[$row->category_id][$row->post_id]; 279 } else { 280 $results = $wpdb->get_results("SELECT $wpdb->link2cat.link_id, category_id FROM $wpdb->link2cat LEFT JOIN $wpdb->links USING (link_id) WHERE category_id IN (".join(',', $cat_IDs).") AND link_visible = 'Y'"); 281 foreach ( $results as $row ) 282 ++$cat_items[$row->category_id][$row->link_id]; 283 } 284 285 // Touch every ancestor's lookup row for each post in each category 286 foreach ( $cat_IDs as $cat_ID ) { 287 $child = $cat_ID; 288 while ( $parent = $cats[$child]->category_parent ) { 289 if ( !empty($cat_items[$cat_ID]) ) 290 foreach ( $cat_items[$cat_ID] as $item_id => $touches ) 291 ++$cat_items[$parent][$item_id]; 292 $child = $parent; 293 } 294 } 295 296 // Transfer the touched cells 297 foreach ( $cat_items as $id => $items ) 298 if ( isset($cats[$id]) ) 299 $cats[$id]->{'link' == $type ? 'link_count' : 'category_count'} = count($items); 300 } 301 259 302 ?> trunk/wp-includes/comment.php
r828 r835 332 332 $comment_date = current_time('mysql'); 333 333 if ( ! isset($comment_date_gmt) ) 334 $comment_date_gmt = g mdate('Y-m-d H:i:s', strtotime($comment_date));334 $comment_date_gmt = get_gmt_from_date($comment_date); 335 335 if ( ! isset($comment_parent) ) 336 336 $comment_parent = 0; … … 461 461 $comment_content = apply_filters('comment_save_pre', $comment_content); 462 462 463 $comment_date_gmt = get_gmt_from_date($comment_date); 464 463 465 $result = $wpdb->query( 464 466 "UPDATE $wpdb->comments SET … … 468 470 comment_approved = '$comment_approved', 469 471 comment_author_url = '$comment_author_url', 470 comment_date = '$comment_date' 472 comment_date = '$comment_date', 473 comment_date_gmt = '$comment_date_gmt' 471 474 WHERE comment_ID = $comment_ID" ); 472 475 trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm
r550 r835 11 11 <div style="float: left" class="title">{$lang_theme_code_title}</div> 12 12 13 <div style="float: right">14 < script language="javascript" type="text/javascript">renderWordWrap();</script>13 <div id="wrapline" style="float: right"> 14 <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label> 15 15 </div> 16 17 <br style="clear: both" /> 16 18 17 19 <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px" dir="ltr" wrap="off"></textarea>
