Ignore:
Timestamp:
2013/05/02 18:11:36 (11 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

File:
1 edited

Legend:

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

    r22597 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Products_Category extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Products_Category extends LC_Page_Admin_Ex { 
    3635 
    3736    // {{{ properties 
     
    4544     * @return void 
    4645     */ 
    47     function init() 
    48     { 
     46    function init() { 
    4947        parent::init(); 
    5048        $this->tpl_maintitle = '商品管理'; 
     
    6159     * @return void 
    6260     */ 
    63     function process() 
    64     { 
     61    function process() { 
    6562        $this->action(); 
    6663        $this->sendResponse(); 
     
    7269     * @return void 
    7370     */ 
    74     function action() 
    75     { 
     71    function action() { 
    7672 
    7773        $objDb      = new SC_Helper_DB_Ex(); 
    7874        $objFormParam = new SC_FormParam_Ex(); 
    79         $objCategory = new SC_Helper_Category_Ex(); 
    8075 
    8176        // 入力パラメーター初期化 
     
    184179        $this->arrList = $this->findCategoiesByParentCategoryId($parent_category_id); 
    185180        // カテゴリツリーを取得 
    186         $this->arrTree = $objCategory->getTree(); 
    187         $this->arrParentID = $objCategory->getTreeTrail($parent_category_id); 
     181        $this->arrTree = $objDb->sfGetCatTree($parent_category_id); 
    188182        // ぱんくずの生成 
    189         $arrBread = $objCategory->getTreeTrail($this->arrForm['parent_category_id'], FALSE); 
    190         $this->tpl_bread_crumbs = SC_Utils_Ex::jsonEncode(array_reverse($arrBread)); 
     183        $arrBread = array(); 
     184        $objDb->findTree($this->arrTree, $parent_category_id, $arrBread); 
     185        $this->tpl_bread_crumbs = SC_Utils_Ex::jsonEncode($arrBread); 
    191186 
    192187    } 
     
    206201     * @return void 
    207202     */ 
    208     function doDelete(&$objFormParam, &$objDb) 
    209     { 
     203    function doDelete(&$objFormParam, &$objDb) { 
    210204        $category_id = $objFormParam->getValue('category_id'); 
    211205        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    237231     * @return void 
    238232     */ 
    239     function doPreEdit(&$objFormParam) 
    240     { 
     233    function doPreEdit(&$objFormParam) { 
    241234        $category_id = $objFormParam->getValue('category_id'); 
    242235 
    243         $objCategory = new SC_Helper_Category_Ex(); 
    244         $arrRes = $objCategory->get($category_id); 
     236        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     237 
     238        // 編集対象のカテゴリ名をDBより取得する 
     239        $where = 'category_id = ?'; 
     240        $arrRes = $objQuery->getRow('*', 'dtb_category', $where, array($category_id)); 
    245241 
    246242        $objFormParam->setParam($arrRes); 
     
    261257     * @return void 
    262258     */ 
    263     function doEdit(&$objFormParam) 
    264     { 
     259    function doEdit(&$objFormParam) { 
    265260        $category_id = $objFormParam->getValue('category_id'); 
    266261 
     
    298293     * @return void 
    299294     */ 
    300     function checkError(&$objFormParam, $add) 
    301     { 
     295    function checkError(&$objFormParam, $add) { 
    302296        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    303297 
     
    354348     * @return void 
    355349     */ 
    356     function doUp(&$objFormParam) 
    357     { 
     350    function doUp(&$objFormParam) { 
    358351        $category_id = $objFormParam->getValue('category_id'); 
    359352 
     
    382375     * @return void 
    383376     */ 
    384     function doDown(&$objFormParam) 
    385     { 
     377    function doDown(&$objFormParam) { 
    386378        $category_id = $objFormParam->getValue('category_id'); 
    387379 
     
    410402     * @return void 
    411403     */ 
    412     function initParam(&$objFormParam) 
    413     { 
     404    function initParam(&$objFormParam) { 
    414405        $objFormParam->addParam('親カテゴリID', 'parent_category_id', null, null, array()); 
    415406        $objFormParam->addParam('カテゴリID', 'category_id', null, null, array()); 
     
    427418     * @return array カテゴリの配列 
    428419     */ 
    429     function findCategoiesByParentCategoryId($parent_category_id) 
    430     { 
     420    function findCategoiesByParentCategoryId($parent_category_id) { 
    431421        if (!$parent_category_id) { 
    432422            $parent_category_id = 0; 
     
    445435     * @return void 
    446436     */ 
    447     function updateCategory($category_id, $arrCategory) 
    448     { 
     437    function updateCategory($category_id, $arrCategory) { 
    449438        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    450439 
     
    463452     * @return void 
    464453     */ 
    465     function registerCategory($arrCategory) 
    466     { 
     454    function registerCategory($arrCategory) { 
    467455        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    468456 
     
    510498     * @param 超えている場合 true 
    511499     */ 
    512     function isOverLevel($parent_category_id) 
    513     { 
     500    function isOverLevel($parent_category_id) { 
    514501        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    515502        $level = $objQuery->get('level', 'dtb_category', 'category_id = ?', array($parent_category_id)); 
     
    522509     * @return void 
    523510     */ 
    524     function destroy() 
    525     { 
     511    function destroy() { 
    526512        parent::destroy(); 
    527513    } 
    528514 
    529515    // 並びが1つ下のIDを取得する。 
    530     function lfGetDownRankID($objQuery, $table, $pid_name, $id_name, $id) 
    531     { 
     516    function lfGetDownRankID($objQuery, $table, $pid_name, $id_name, $id) { 
    532517        // 親IDを取得する。 
    533518        $col = "$pid_name"; 
     
    550535 
    551536    // 並びが1つ上のIDを取得する。 
    552     function lfGetUpRankID($objQuery, $table, $pid_name, $id_name, $id) 
    553     { 
     537    function lfGetUpRankID($objQuery, $table, $pid_name, $id_name, $id) { 
    554538        // 親IDを取得する。 
    555539        $col = "$pid_name"; 
     
    571555    } 
    572556 
    573     function lfCountChilds($objQuery, $table, $pid_name, $id_name, $id) 
    574     { 
     557    function lfCountChilds($objQuery, $table, $pid_name, $id_name, $id) { 
    575558        $objDb = new SC_Helper_DB_Ex(); 
    576559        // 子ID一覧を取得 
     
    579562    } 
    580563 
    581     function lfUpRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count) 
    582     { 
     564    function lfUpRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count) { 
    583565        $objDb = new SC_Helper_DB_Ex(); 
    584566        // 子ID一覧を取得 
     
    592574    } 
    593575 
    594     function lfDownRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count) 
    595     { 
     576    function lfDownRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count) { 
    596577        $objDb = new SC_Helper_DB_Ex(); 
    597578        // 子ID一覧を取得 
Note: See TracChangeset for help on using the changeset viewer.