Show
Ignore:
Timestamp:
03/05/08 21:02:26 (10 months ago)
Author:
inureyes
Message:

#863

  • 카테고리 출력시에도 숫자를 사용하도록 수정
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/view/view.php

    r5534 r5539  
    405405 
    406406function getCategoriesView($totalPosts, $categories, $selected, $xhtml = false) { 
    407     global $blogURL, $service; 
     407    global $blogURL, $service, $blog; 
    408408    requireModel('blog.category'); 
    409409    requireLibrary('blog.skin'); 
     
    418418            foreach ($category1['children'] as $category2) { 
    419419                if( doesHaveOwnership() || getCategoryVisibility($blogid, $category2['id']) > 1) { 
    420                     array_push($children, array('id' => $category2['id'], 'label' => $category2['name'], 'value' => (doesHaveOwnership() ? $category2['entriesInLogin'] : $category2['entries']), 'link' => "$blogURL/category/" . URL::encode($category2['label'],$service['useEncodedURL']), 'children' => array())); 
     420                    array_push($children,  
     421                        array('id' => $category2['id'],  
     422                            'label' => $category2['name'],  
     423                            'value' => (doesHaveOwnership() ? $category2['entriesInLogin'] : $category2['entries']),  
     424                            'link' => "$blogURL/category/" . ($blog['useSlogan'] ? URL::encode($category2['label'],$service['useEncodedURL']) : $category2['id']),  
     425                            'children' => array() 
     426                        ) 
     427                    ); 
    421428                    $categoryCount = $categoryCount + (doesHaveOwnership() ? $category2['entriesInLogin'] : $category2['entries']); 
    422429                } 
     
    425432            $parentCategoryCount = (doesHaveOwnership() ? $category1['entriesInLogin'] - $categoryCountAll : $category1['entries'] - $categoryCountAll); 
    426433            if($category1['id'] != 0) { 
    427                 array_push($tree['children'], array('id' => $category1['id'], 'label' => $category1['name'], 'value' => $categoryCount + $parentCategoryCount, 'link' => "$blogURL/category/" . URL::encode($category1['label'],$service['useEncodedURL']), 'children' => $children)); 
     434                array_push($tree['children'],  
     435                    array('id' => $category1['id'],  
     436                        'label' => $category1['name'],  
     437                        'value' => $categoryCount + $parentCategoryCount,  
     438                        'link' => "$blogURL/category/" . ($blog['useSlogan'] ? URL::encode($category1['label'],$service['useEncodedURL']) : $category1['id']),  
     439                        'children' => $children) 
     440                ); 
    428441            } 
    429442            $categoryCount = 0;