Ignore:
Timestamp:
2012/01/06 19:54:03 (12 years ago)
Author:
kotani
Message:

Merge from version-2_11-dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php

    r21357 r21390  
    205205        // 子カテゴリのチェック 
    206206        $where = "parent_category_id = ? AND del_flg = 0"; 
    207         $count = $objQuery->count("dtb_category", $where, array($category_id)); 
    208         if ($count > 0) { 
     207        $exists = $objQuery->exists("dtb_category", $where, array($category_id)); 
     208        if ($exists) { 
    209209             $this->arrErr['category_name'] = "※ 子カテゴリが存在するため削除できません。<br/>"; 
    210210             return; 
     
    213213        $table = "dtb_product_categories AS T1 LEFT JOIN dtb_products AS T2 ON T1.product_id = T2.product_id"; 
    214214        $where = "T1.category_id = ? AND T2.del_flg = 0"; 
    215         $count = $objQuery->count($table, $where, array($category_id)); 
    216         if ($count > 0) { 
     215        $exists = $objQuery->exists($table, $where, array($category_id)); 
     216        if ($exists) { 
    217217            $this->arrErr['category_name'] = "※ カテゴリ内に商品が存在するため削除できません。<br/>"; 
    218218            return; 
     
    331331            $arrWhereVal[] = $category_id; 
    332332        } 
    333         $count = $objQuery->count('dtb_category', $where, $arrWhereVal); 
    334         if ($count > 0) { 
     333        $exists = $objQuery->exists('dtb_category', $where, $arrWhereVal); 
     334        if ($exists) { 
    335335            $arrErr['category_name'] = "※ 既に同じ内容の登録が存在します。<br/>"; 
    336336            return $arrErr; 
Note: See TracChangeset for help on using the changeset viewer.