Ignore:
Timestamp:
2012/03/26 21:44:52 (12 years ago)
Author:
Seasoft
Message:

#1613 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

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

    r21515 r21684  
    108108 
    109109        // 開始~終了 
    110         if( ($from_year != '') && ($from_month != '') && ($from_day != '') && 
    111             ($to_year != '') && ($to_month != '') && ($to_day != '')) { 
     110        if (($from_year != '') && ($from_month != '') && ($from_day != '') 
     111            && ($to_year != '') && ($to_month != '') && ($to_day != '') 
     112        ) { 
    112113            $this->setWhere($column . ' >= ? AND ' . $column . ' < date(?)'); 
    113114            $return[] = $date1; 
     
    130131 
    131132            if (count($arr) > 1) { 
    132                 if(! is_null($data)) $item .= $ItemStr . ' = ? OR '; 
     133                if (!is_null($data)) { 
     134                    $item .= $ItemStr . ' = ? OR '; 
     135                } 
    133136            } else { 
    134                 if(! is_null($data)) $item = $ItemStr . ' = ?'; 
     137                if (!is_null($data)) { 
     138                    $item = $ItemStr . ' = ?'; 
     139                } 
    135140            } 
    136141            $return[] = $data; 
    137142        } 
    138143 
    139         if( count($arr) > 1)  $item = '(' . rtrim($item, ' OR ') . ')'; 
     144        if (count($arr) > 1) { 
     145            // FIXME 多分この rtrim の使い方は不適切(偶然動作しそうだが) 
     146            $item = '(' . rtrim($item, ' OR ') . ')'; 
     147        } 
    140148        $this->setWhere($item); 
    141149        return $return; 
     
    190198 
    191199        for ($i = 0; $i < $count; $i++) { 
    192  
    193             if( isset($arrWhere[$i]['value'])) $statement .= $arrWhere[$i]['column'] .' = ' . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) .' OR '  ; 
     200            if (isset($arrWhere[$i]['value'])) { 
     201                $statement .= $arrWhere[$i]['column'] .' = ' . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) .' OR '; 
     202            } 
    194203        } 
    195204 
Note: See TracChangeset for help on using the changeset viewer.