Changeset 891 for trunk


Ignore:
Timestamp:
10/31/11 14:08:17 (7 months ago)
Author:
r2
Message:

billing: начисление баллов после модерации

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/content/frontend.php

    r782 r891  
    477477            $article['id'] = $model->addArticle($article); 
    478478 
    479             if (IS_BILLING){             
    480                 $category_cost = $inDB->get_field('cms_category', "id='{$article['category_id']}'", 'cost'); 
    481                 $category_cost = $category_cost==='' ? false : (int)$category_cost; 
    482                 cmsBilling::process('content', 'add_content', $category_cost); 
    483             } 
    484  
    485479            $id = $article['id']; 
    486480 
     
    523517                    'description' => '' 
    524518                )); 
     519 
     520                if (IS_BILLING){ 
     521                    $category_cost = $inDB->get_field('cms_category', "id='{$article['category_id']}'", 'cost'); 
     522                    $category_cost = $category_cost==='' ? false : (int)$category_cost; 
     523                    cmsBilling::process('content', 'add_content', $category_cost); 
     524                } 
    525525 
    526526            } 
     
    606606        cmsCore::callEvent('ADD_ARTICLE_DONE', $article); 
    607607 
     608    if (IS_BILLING){ 
     609        $author = $inDB->get_fields('cms_users', "id='{$article['user_id']}'", '*'); 
     610        $category_cost = $inDB->get_field('cms_category', "id='{$article['category_id']}'", 'cost'); 
     611        $category_cost = $category_cost==='' ? false : (int)$category_cost; 
     612        cmsBilling::process('content', 'add_content', $category_cost, $author); 
     613    } 
     614     
    608615    //ðåãèñòðèðóåì ñîáûòèå 
    609616    cmsActions::log('add_article', array( 
Note: See TracChangeset for help on using the changeset viewer.