Sigh ... evenrain,你為什麼不早一點來幫忙測呢?
這絕對是 bug!謝謝你回報。
function getBlogCategories( $blogId, $onlyInMainPage = false, $order = BLOG_CATEGORIES_DEFAULT_ORDER, $page = -1, $itemsPerPage = 15 )
{
// this part of the query is the same in all the cases
$prefix = $this->getPrefix();
$query = "SELECT c.id AS id, c.name AS name, c.url AS url, c.blog_id AS blog_id,
c.last_modification AS last_modification, c.in_main_page AS in_main_page,
c.parent_id AS parent_id, c.description AS description, c.properties AS properties,
c.mangled_name AS mangled_name, IF(a.id IS NULL, 0, COUNT(*)) AS num_articles, a.date AS last_update
FROM {$prefix}articles_categories c LEFT JOIN {$prefix}article_categories_link l
ON c.id=l.category_id LEFT JOIN {$prefix}articles a ON a.id = l.article_id
WHERE c.blog_id = '".Db::qstr($blogId)."'";
請自行新增上面缺的那一個 sql 程式,或是從 SVN 1.01 branch 下載,我已經 commit 到 SV rev 1843.
Mark