Index: trunk/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
===================================================================
--- trunk/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 157)
+++ trunk/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 158)
@@ -26,5 +26,5 @@
 	$selected_author_id = xpress_selected_author_id(false);	
 
-	global $wpdb,$wp_query;
+	global $wpdb,$wp_query,$xoops_db;
 	
 	$db_prefix = get_wp_prefix();
@@ -43,17 +43,17 @@
 	include ($mydirpath . '/wp-includes/version.php');
 		
-	$select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date, $user_tb.display_name";				
-	if ($wp_db_version >= 6124){
- 		$from  = " FROM ((((";
+	$select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date";				
+
+ 		$from  = " FROM (((";
  		$from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)";
  		$from .= " INNER JOIN $term_relationships_tb ON $post_tb.ID = $term_relationships_tb.object_id)";
  		$from .= " INNER JOIN $term_taxonomy ON $term_relationships_tb.term_taxonomy_id = $term_taxonomy.term_taxonomy_id)";
- 		$from .= " INNER JOIN $terms_tb ON $term_taxonomy.term_id = $terms_tb.term_id)";
- 		$from .= " INNER JOIN $user_tb ON $post_tb.post_author = $user_tb.ID";
+ 		$from .= " INNER JOIN $terms_tb ON $term_taxonomy.term_id = $terms_tb.term_id ";
  		
-	 	$where = " WHERE ($post_tb.post_type = 'post') AND ($post_tb.post_status = 'publish')";
-		if (!empty($selected_author_id)){
-			$where  .= " AND $post_tb.post_author = $selected_author_id ";
-		}
+	 	$where = " WHERE $post_tb.post_type = 'post' AND $post_tb.post_status = 'publish'";
+//		if (!empty($selected_author_id)){
+//			$where  .= " AND ($post_tb.post_author = $selected_author_id) ";
+//			$where  .= " AND ($post_tb.post_author = 2) ";
+//		}
 
 	 	if ($cat_select) {
@@ -67,26 +67,12 @@
 		}
 		
-	} else {
-		$from  = " FROM ((";
-		$from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)";
-		$from .= " LEFT JOIN $post2cat_tb ON $post_tb.ID = $post2cat_tb.post_id)";
-		$from .= " INNER JOIN $user_tb ON $post_tb.post_author = $user_tb.ID";
-		
-		$where = " WHERE ($post_tb.post_status = 'publish') AND  (UNIX_TIMESTAMP($post_tb.post_date) <= UNIX_TIMESTAMP())" ;
-		
-	 	if ($cat_select) {
-	 		$where .= " AND ($post2cat_tb.category_id IN ($cat_id))";
-		}
-		if (!empty($selected_author_id)){
-			$where  .= " AND $post_tb.post_author = $selected_author_id ";
-		}
-
-	}
+
 	if ($show_month_range > 0) {
 	 		$where .= " AND (UNIX_TIMESTAMP($post_tb.post_date) >= UNIX_TIMESTAMP(DATE_ADD(CURRENT_DATE, INTERVAL -$show_month_range month)))";
 	}
 	$order_limmit = " GROUP BY $post_tb.ID ORDER BY $view_tb.post_views DESC LIMIT 0, $disp_count";
-	
-	$populars = $wpdb->get_results($select . $from . $where . $order_limmit);
+	$sql = $select . $from . $where . $order_limmit;
+
+	$populars = $wpdb->get_results($sql);
 	
 	foreach ($populars as $popular){
@@ -156,5 +142,5 @@
 			$post_modified_date_time = $post_modified_date . ' ' . $post_modified_time ;
 			$trackback_url = trackback_url(false);
-			$post_viwes = xpress_post_views_count($post_id,'views: %d' ,false);
+			$post_viwes = xpress_post_views_count($post_id,__('views: %d','xpress') ,false);
 //			if (empty($tags)) $tags = __('Not Tag');
 
Index: trunk/wp-content/themes/xpress_default/ja.po
===================================================================
--- trunk/wp-content/themes/xpress_default/ja.po	(revision 157)
+++ trunk/wp-content/themes/xpress_default/ja.po	(revision 158)
@@ -18,5 +18,5 @@
 "Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n"
 "POT-Creation-Date: 2008-08-15 21:16+0900\n"
-"PO-Revision-Date: 2009-04-02 18:19+0900\n"
+"PO-Revision-Date: 2009-04-06 00:50+0900\n"
 "Last-Translator: toemon <toychee@toemon.com>\n"
 "Language-Team: toemon <info@toemon.com>\n"
@@ -631,27 +631,32 @@
 msgstr "テーマ選択"
 
-#: blocks/popular_posts_block_theme.php:114
-#: blocks/recent_posts_content_block_theme.php:62
-#: blocks/recent_posts_list_block_theme.php:60
+#: blocks/popular_posts_block_theme.php:125
+#: blocks/recent_posts_content_block_theme.php:68
+#: blocks/recent_posts_list_block_theme.php:67
 msgid "Tags:"
 msgstr "タグ:"
 
-#: blocks/popular_posts_block_theme.php:140
-#: blocks/recent_posts_content_block_theme.php:97
-#: blocks/recent_posts_list_block_theme.php:86
+#: blocks/popular_posts_block_theme.php:151
+#: blocks/recent_posts_content_block_theme.php:103
+#: blocks/recent_posts_list_block_theme.php:93
 msgid "Comments (0)"
 msgstr "コメントはありません"
 
-#: blocks/popular_posts_block_theme.php:140
-#: blocks/recent_posts_content_block_theme.php:97
-#: blocks/recent_posts_list_block_theme.php:86
+#: blocks/popular_posts_block_theme.php:151
+#: blocks/recent_posts_content_block_theme.php:103
+#: blocks/recent_posts_list_block_theme.php:93
 msgid "Comments (1)"
 msgstr "1件のコメント"
 
-#: blocks/popular_posts_block_theme.php:140
-#: blocks/recent_posts_content_block_theme.php:97
-#: blocks/recent_posts_list_block_theme.php:86
+#: blocks/popular_posts_block_theme.php:151
+#: blocks/recent_posts_content_block_theme.php:103
+#: blocks/recent_posts_list_block_theme.php:93
 msgid "Comments (%)"
 msgstr "Comments (%)"
+
+#: blocks/popular_posts_block_theme.php:160
+#, php-format
+msgid "views: %d"
+msgstr "閲覧 :%d回"
 
 #: blocks/recent_comments_block_theme.php:73
@@ -660,5 +665,5 @@
 msgstr "%1$s と %2$s"
 
-#: blocks/recent_posts_content_block_theme.php:72
+#: blocks/recent_posts_content_block_theme.php:78
 msgid "more"
 msgstr "続きを読む"
