Ignore:
Timestamp:
2007/08/10 18:33:39 (17 years ago)
Author:
nanasess
Message:

リファクタリング

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/util/SC_Utils.php

    r15238 r15279  
    8888            require_once($extern_php); 
    8989        } 
    90     } 
    91  
    92     function sf_getBasisData() { 
    93         //DBから設定情報を取得 
    94         $objConn = new SC_DbConn(DEFAULT_DSN); 
    95         $result = $objConn->getAll("SELECT * FROM dtb_baseinfo"); 
    96         if(is_array($result[0])) { 
    97             foreach ( $result[0] as $key=>$value ){ 
    98                 $CONF["$key"] = $value; 
    99             } 
    100         } 
    101         return $CONF; 
    10290    } 
    10391 
     
    16281616    } 
    16291617 
    1630     // ROOTID取得判定用のグローバル変数(一度取得されていたら再取得しないようにする) 
    1631     //$g_root_on = false; 
    1632     //$g_root_id = ""; 
    1633  
    1634     /* 選択中のアイテムのルートカテゴリIDを取得する */ 
    1635     function sfGetRootId() { 
    1636         global $g_root_on; 
    1637         global $g_root_id; 
    1638         if(!$g_root_on) { 
    1639             $g_root_on = true; 
    1640             $objQuery = new SC_Query(); 
    1641             if($_GET['product_id'] != "" || $_GET['category_id'] != "") { 
    1642                 // 選択中のカテゴリIDを判定する 
    1643                 $category_id = SC_Utils::sfGetCategoryId($_GET['product_id'], $_GET['category_id']); 
    1644                 // ROOTカテゴリIDの取得 
    1645                  $arrRet = SC_Utils::sfGetParents($objQuery, 'dtb_category', 'parent_category_id', 'category_id', $category_id); 
    1646                  $root_id = $arrRet[0]; 
    1647             } else { 
    1648                 // ROOTカテゴリIDをなしに設定する 
    1649                 $root_id = ""; 
    1650             } 
    1651             $g_root_id = $root_id; 
    1652         } 
    1653         return $g_root_id; 
    1654     } 
    1655  
    16561618    /* カテゴリから商品を検索する場合のWHERE文と値を返す */ 
    16571619    function sfGetCatWhere($category_id) { 
Note: See TracChangeset for help on using the changeset viewer.