Ignore:
Timestamp:
2013/03/05 09:21:53 (11 years ago)
Author:
pineray
Message:

#2166 同じ処理を繰り返さないようにスタティック変数を使用.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/util/SC_Utils.php

    r22602 r22603  
    19691969     * @param string $glue_key 親IDキー名 
    19701970     * @param array $correction 階層構造が含まれている配列 
     1971     * @param boolean $cid_is_key キーがIDの配列の場合はtrue 
    19711972     * @param integer $root_id ルートID 
    19721973     * @param boolean $id_only IDだけの配列を返す場合はtrue 
    19731974     * @return array 親ID配列 
    19741975     */ 
    1975     public static function getTreeTrail($start_id, $primary_key, $glue_key, $correction = array(), $root_id = 0, $id_only = TRUE) 
    1976     { 
    1977         $arrIDToKay = SC_Utils_Ex::makeArrayIDToKey($primary_key, $correction); 
     1976    public static function getTreeTrail($start_id, $primary_key, $glue_key, $correction = array(), $cid_is_key = FALSE, $root_id = 0, $id_only = TRUE) 
     1977    { 
     1978        if ($cid_is_key) { 
     1979            $arrIDToKay = $correction; 
     1980        } else { 
     1981            $arrIDToKay = SC_Utils_Ex::makeArrayIDToKey($primary_key, $correction); 
     1982        } 
    19781983        $id = $start_id; 
    19791984        $arrTrail = array(); 
Note: See TracChangeset for help on using the changeset viewer.