Changeset 21445


Ignore:
Timestamp:
2012/02/06 21:31:07 (9 years ago)
Author:
Seasoft
Message:

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

  • 無意味なスペースを削除
Location:
branches/version-2_12-dev
Files:
7 edited

Legend:

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

    r21444 r21445  
    966966            $this->arrErr[$value[5]] = "※ " . $value[1] . "を正しく指定してください。<br />"; 
    967967        } 
    968         if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]] ) > 0) &&  (strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]]) > 0)) { 
     968        if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]]) > 0) &&  (strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]]) > 0)) { 
    969969 
    970970            $date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]) .sprintf("%02d",$this->arrParam[$value[4]]) ."000000"; 
     
    10141014            $this->arrErr[$value[2]] = "※ " . $value[0] . "を正しく指定してください。<br />"; 
    10151015        } 
    1016         if ((strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]] ) > 0 || strlen($this->arrParam[$value[11]]) > 0) && ! checkdate($this->arrParam[$value[9]], $this->arrParam[$value[10]], $this->arrParam[$value[8]])) { 
     1016        if ((strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]]) > 0 || strlen($this->arrParam[$value[11]]) > 0) && ! checkdate($this->arrParam[$value[9]], $this->arrParam[$value[10]], $this->arrParam[$value[8]])) { 
    10171017            $this->arrErr[$value[8]] = "※ " . $value[1] . "を正しく指定してください。<br />"; 
    10181018        } 
    1019         if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]] ) > 0 && strlen($this->arrParam[$value[5]] ) > 0) &&  (strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]] ) > 0 || strlen($this->arrParam[$value[11]]) > 0)) { 
     1019        if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]]) > 0 && strlen($this->arrParam[$value[5]]) > 0) &&  (strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]]) > 0 || strlen($this->arrParam[$value[11]]) > 0)) { 
    10201020 
    10211021            $date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]) .sprintf("%02d",$this->arrParam[$value[4]]) .sprintf("%02d",$this->arrParam[$value[5]]).sprintf("%02d",$this->arrParam[$value[6]]).sprintf("%02d",$this->arrParam[$value[7]]); 
  • branches/version-2_12-dev/data/class/SC_Customer.php

    r21444 r21445  
    303303    function updateOrderSummary($customer_id){ 
    304304        $objQuery = new SC_Query_Ex(); 
    305         $arrOrderSummary =  $objQuery->getRow("SUM( payment_total ) as buy_total, COUNT(order_id) as buy_times,MAX( create_date) as last_buy_date, MIN(create_date) as first_buy_date","dtb_order","customer_id = ? AND del_flg = 0 AND status <> ?",array($customer_id,ORDER_CANCEL)); 
     305        $arrOrderSummary =  $objQuery->getRow("SUM( payment_total) as buy_total, COUNT(order_id) as buy_times,MAX( create_date) as last_buy_date, MIN(create_date) as first_buy_date","dtb_order","customer_id = ? AND del_flg = 0 AND status <> ?",array($customer_id,ORDER_CANCEL)); 
    306306        $objQuery->update("dtb_customer",$arrOrderSummary,"customer_id = ?",array($customer_id)); 
    307307    } 
  • branches/version-2_12-dev/data/class/SC_CustomerList.php

    r21444 r21445  
    211211        if (!isset($this->arrSql['search_buy_total_from'])) $this->arrSql['search_buy_total_from'] = ""; 
    212212        if (!isset($this->arrSql['search_buy_total_to'])) $this->arrSql['search_buy_total_to'] = ""; 
    213         if (is_numeric( $this->arrSql["search_buy_total_from"] ) || is_numeric( $this->arrSql["search_buy_total_to"])) { 
     213        if (is_numeric( $this->arrSql["search_buy_total_from"]) || is_numeric( $this->arrSql["search_buy_total_to"])) { 
    214214            $arrBuyTotal = $this->selectRange($this->arrSql["search_buy_total_from"], $this->arrSql["search_buy_total_to"], "buy_total"); 
    215215            foreach ($arrBuyTotal as $data) { 
     
    221221        if (!isset($this->arrSql['search_buy_times_from'])) $this->arrSql['search_buy_times_from'] = ""; 
    222222        if (!isset($this->arrSql['search_buy_times_to'])) $this->arrSql['search_buy_times_to'] = ""; 
    223         if (is_numeric( $this->arrSql["search_buy_times_from"] ) || is_numeric( $this->arrSql["search_buy_times_to"])) { 
     223        if (is_numeric( $this->arrSql["search_buy_times_from"]) || is_numeric( $this->arrSql["search_buy_times_to"])) { 
    224224            $arrBuyTimes = $this->selectRange($this->arrSql["search_buy_times_from"], $this->arrSql["search_buy_times_to"], "buy_times"); 
    225225            foreach ($arrBuyTimes as $data) { 
  • branches/version-2_12-dev/data/class/SC_SelectSql.php

    r21444 r21445  
    102102 
    103103        // 開始期間だけ指定の場合 
    104         if (( $from_year != "" ) && ( $from_month != "" ) && ( $from_day != "" ) && ( $to_year == "" ) && ( $to_month == "" ) && ( $to_day == "")) { 
     104        if (( $from_year != "") && ( $from_month != "") && ( $from_day != "") && ( $to_year == "") && ( $to_month == "") && ( $to_day == "")) { 
    105105            $this->setWhere( $column .' >= ?'); 
    106106            $return[] = $date1; 
     
    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 != "")) { 
    112112            $this->setWhere( $column . ' >= ? AND ' . $column . ' < date(?)'); 
    113113            $return[] = $date1; 
     
    116116 
    117117        // 終了期間だけ指定の場合 
    118         if (( $from_year == "" ) && ( $from_month == "" ) && ( $from_day == "" ) && ( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "")) { 
     118        if (( $from_year == "") && ( $from_month == "") && ( $from_day == "") && ( $to_year != "") && ( $to_month != "") && ( $to_day != "")) { 
    119119            $this->setWhere( $column . ' < date(?)'); 
    120120            $return[] = $date2; 
     
    130130 
    131131            if (count( $arr) > 1) { 
    132                 if( ! is_null( $data )) $item .= $ItemStr . " = ? OR "; 
     132                if( ! is_null( $data)) $item .= $ItemStr . " = ? OR "; 
    133133            } else { 
    134                 if( ! is_null( $data )) $item = $ItemStr . " = ?"; 
     134                if( ! is_null( $data)) $item = $ItemStr . " = ?"; 
    135135            } 
    136136            $return[] = $data; 
    137137        } 
    138138 
    139         if( count( $arr ) > 1 )  $item = "( " . rtrim( $item, " OR " ) . ")"; 
     139        if( count( $arr) > 1)  $item = "( " . rtrim( $item, " OR ") . ")"; 
    140140        $this->setWhere( $item); 
    141141        return $return; 
     
    191191        for ($i = 0; $i < $count; $i++) { 
    192192 
    193             if( isset( $arrWhere[$i]['value'] )) $statement .= $arrWhere[$i]['column'] ." = " . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) ." OR "  ; 
    194         } 
    195  
    196         $statement = "( " . rtrim( $statement, " OR " ) . ")"; 
     193            if( isset( $arrWhere[$i]['value'])) $statement .= $arrWhere[$i]['column'] ." = " . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) ." OR "  ; 
     194        } 
     195 
     196        $statement = "( " . rtrim( $statement, " OR ") . ")"; 
    197197 
    198198        if ($this->where) { 
  • branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php

    r21444 r21445  
    10871087        } 
    10881088 
    1089         if( $position > $rank ) $objQuery->exec( $sql, array( $rank + 1, $position)); 
    1090         if( $position < $rank ) $objQuery->exec( $sql, array( $position, $rank - 1)); 
     1089        if( $position > $rank) $objQuery->exec( $sql, array( $rank + 1, $position)); 
     1090        if( $position < $rank) $objQuery->exec( $sql, array( $position, $rank - 1)); 
    10911091 
    10921092        // 指定した順位へrankを書き換える。 
     
    10961096        } 
    10971097 
    1098         $objQuery->exec( $sql, array( $position, $keyId )); 
     1098        $objQuery->exec( $sql, array( $position, $keyId)); 
    10991099        $objQuery->commit(); 
    11001100    } 
  • branches/version-2_12-dev/data/class/util/SC_Utils.php

    r21444 r21445  
    10381038        $vals = array_values($arrValues); 
    10391039 
    1040         $max = max( count( $keys ), count( $vals )); 
     1040        $max = max( count( $keys), count( $vals)); 
    10411041        $combine_ary = array(); 
    10421042        for ($i=0; $i<$max; $i++) { 
  • branches/version-2_12-dev/html/install/index.php

    r21444 r21445  
    733733 
    734734    // パスワードのチェック 
    735     $objErr->doFunc( array("管理者:パスワード",'login_pass',ID_MIN_LEN , ID_MAX_LEN ) ,array("SPTAB_CHECK" ,"NUM_RANGE_CHECK")); 
     735    $objErr->doFunc( array("管理者:パスワード",'login_pass',ID_MIN_LEN , ID_MAX_LEN) ,array("SPTAB_CHECK" ,"NUM_RANGE_CHECK")); 
    736736 
    737737    // 管理機能ディレクトリのチェック 
Note: See TracChangeset for help on using the changeset viewer.