Ignore:
Timestamp:
2012/01/17 16:15:39 (15 years ago)
Author:
Seasoft
Message:

2.12系へマイルストーン変更となったチケット分を差し戻し
r21376 #1582,#1526,#1449 作業を簡単にするため、本来対象外のチケット(#1526,#1449)も含めた
r21375 #1581
r21374 #797
r21373 #1583,#1526 作業を簡単にするため、本来対象外のチケット(#1526)も含めた
r21372 #1576
r21371 #1581

Location:
branches/version-2_11-dev/data/class/helper
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/helper/SC_Helper_Customer.php

    r21376 r21402  
    276276     */ 
    277277    function sfGetUniqSecretKey() { 
    278         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    279  
    280         do { 
     278        $objQuery   =& SC_Query_Ex::getSingletonInstance(); 
     279        $count      = 1; 
     280        while ($count != 0) { 
    281281            $uniqid = SC_Utils_Ex::sfGetUniqRandomId('r'); 
    282             $exists = $objQuery->exists("dtb_customer", "secret_key = ?", array($uniqid)); 
    283         } while ($exists); 
     282            $count  = $objQuery->count("dtb_customer", "secret_key = ?", array($uniqid)); 
     283        } 
    284284        return $uniqid; 
    285285    } 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php

    r21376 r21402  
    9999     * @param string $where データを検索する WHERE 句 
    100100     * @param string $dsn データソース名 
    101      * @param string $sql @deprecated データの追加を行う場合の SQL文 
    102      * @param bool $add @deprecated データの追加も行う場合 true 
     101     * @param string $sql データの追加を行う場合の SQL文 
     102     * @param bool $add データの追加も行う場合 true 
    103103     * @return bool データが存在する場合 true, データの追加に成功した場合 true, 
    104104     *               $add == false で, データが存在しない場合 false 
     
    109109 
    110110        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    111         $exists = $objQuery->exists($table_name, $where, $arrval); 
    112  
     111        $count = $objQuery->count($table_name, $where, $arrval); 
     112 
     113        if($count > 0) { 
     114            $ret = true; 
     115        } else { 
     116            $ret = false; 
     117        } 
    113118        // データを追加する 
    114         if(!$exists && $add) { 
     119        if(!$ret && $add) { 
    115120            $objQuery->exec($sql); 
    116121        } 
     
    153158     * 
    154159     * @return int 
    155      * @deprecated 
    156160     */ 
    157161    function sfGetBasisCount() { 
     
    159163 
    160164        return $objQuery->count("dtb_baseinfo"); 
    161     } 
    162  
    163     /** 
    164      * 基本情報の登録有無を取得する 
    165      * 
    166      * @return boolean 有無 
    167      */ 
    168     function sfGetBasisExists() { 
    169         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    170  
    171         return $objQuery->exists('dtb_baseinfo'); 
    172165    } 
    173166 
     
    14381431        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    14391432        $where = 'product_id = ? AND del_flg = 0 AND class_combination_id IS NOT NULL'; 
    1440         $exists = $objQuery->exists('dtb_products_class', $where, array($product_id)); 
    1441  
    1442         return $exists; 
     1433        $count = $objQuery->count('dtb_products_class', $where, array($product_id)); 
     1434 
     1435        return $count >= 1; 
    14431436    } 
    14441437} 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_Mobile.php

    r21376 r21402  
    384384            $arrValues['kara_mail_id'] = $objQuery->nextVal('dtb_mobile_kara_mail_kara_mail_id'); 
    385385            $objQuery->insert('dtb_mobile_kara_mail', $arrValues); 
    386             $exists = $objQuery->exists('dtb_mobile_kara_mail', 'token = ?', array($token)); 
    387  
    388             if ($exists) { 
     386            $count = $objQuery->count('dtb_mobile_kara_mail', 'token = ?', array($token)); 
     387 
     388            if ($count == 1) { 
    389389                break; 
    390390            } 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_PageLayout.php

    r21376 r21402  
    210210         * PHP ファイルは, 複数のデバイスで共有するため, device_type_id を条件に入れない 
    211211         */ 
    212         $exists = $objQuery->exists('dtb_pagelayout', 'filename = ?', array($filename)); 
    213  
    214         if (!$exists) { 
     212        $count = $objQuery->count('dtb_pagelayout', 'filename = ?', array($filename)); 
     213 
     214        if ($count == 0) { 
    215215            // phpファイルの削除 
    216216            $del_php = HTML_REALDIR . $filename . '.php'; 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_Purchase.php

    r21376 r21402  
    833833        $arrValues = $objQuery->extractOnlyColsOf($table, $arrParams); 
    834834 
    835         $exists = $objQuery->exists($table, $where, array($order_id)); 
    836         if ($exists) { 
     835        $exists = $objQuery->count($table, $where, array($order_id)); 
     836        if ($exists > 0) { 
    837837 
    838838            $this->sfUpdateOrderStatus($order_id, $arrValues['status'], 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_Session.php

    r21401 r21402  
    8484     { 
    8585         $objQuery = new SC_Query_Ex(); 
    86          $exists = $objQuery->exists("dtb_session", "sess_id = ?", array($id)); 
    87 var_dump($id, $exists);exit; 
     86         $count = $objQuery->count("dtb_session", "sess_id = ?", array($id)); 
    8887         $sqlval = array(); 
    89          if ($exists) { 
     88         if($count > 0) { 
    9089             // レコード更新 
    9190             $sqlval['sess_data'] = $sess_data; 
Note: See TracChangeset for help on using the changeset viewer.