Ignore:
Timestamp:
2008/04/04 15:41:15 (16 years ago)
Author:
satou
Message:

fixed by Yammy (merge r17155)

File:
1 edited

Legend:

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

    r17199 r17206  
    489489 
    490490    // 配列の値をカンマ区切りで返す。 
    491     function sfGetCommaList($array, $space=true) { 
     491    function sfGetCommaList($array, $space=true, $arrPop = array()) { 
    492492        if (count($array) > 0) { 
    493493            $line = ""; 
    494494            foreach($array as $val) { 
    495                 if ($space) { 
    496                     $line .= $val . ", "; 
    497                 }else{ 
    498                     $line .= $val . ","; 
     495                if (!in_array($val, $arrPop)) { 
     496                    if ($space) { 
     497                        $line .= $val . ", "; 
     498                    } else { 
     499                        $line .= $val . ","; 
     500                    } 
    499501                } 
    500502            } 
    501503            if ($space) { 
    502504                $line = ereg_replace(", $", "", $line); 
    503             }else{ 
     505            } else { 
    504506                $line = ereg_replace(",$", "", $line); 
    505507            } 
    506508            return $line; 
    507         }else{ 
     509        } else { 
    508510            return false; 
    509511        } 
Note: See TracChangeset for help on using the changeset viewer.