Changeset 20755


Ignore:
Timestamp:
2011/03/22 10:34:33 (11 years ago)
Author:
nanasess
bzr:base-revision:
nanasess@fsm.ne.jp-20110321161640-8uzg4wrotb2u19d6
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php 15559@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fproducts%2FLC_Page_Admin_Products_ProductClass.php
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110322013349-0dbyicevy536qlk8
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110322013419-6fw6are2c4n7oz2l
bzr:revno:
3469
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php ohkouchi@loop-az.jp-20110322013349-0dbyicevy536qlk8
bzr:timestamp:
2011-03-22 10:34:19.418999910 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-03-22T01:34:19.419000Z
Message:

#1188 (規格の変更を重ねるとデータがおかしくなる)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php

    r20754 r20755  
    506506 
    507507        $objQuery->begin(); 
     508        $arrClassCombi = $objQuery->getCol('class_combination_id', 
     509                                           'dtb_products_class', 
     510                                           'product_id = ?', array($product_id)); 
     511 
     512        foreach ($arrClassCombi as $class_combination_id) { 
     513            if (SC_Utils_Ex::isBlank($class_combination_id)) { 
     514                continue; 
     515            } 
     516            $existsCombi = $objQuery->getRow('*', 'dtb_class_combination', 
     517                                             'class_combination_id = ?', 
     518                                             array($class_combination_id)); 
     519 
     520            $objQuery->delete('dtb_class_combination', 
     521                              'class_combination_id IN (?, ?)', 
     522                              array($existsCombi['class_combination_id'], 
     523                                    $existsCombi['parent_class_combination_id'])); 
     524        } 
    508525        $objQuery->update("dtb_products_class", array('del_flg' => 0), 
    509                           "product_id = ? AND class_combination_id IS NULL", array($product_id)); 
    510         $objQuery->update("dtb_products_class", array('del_flg' => 1), 
    511                           "product_id = ? AND class_combination_id IS NOT NULL", array($product_id)); 
     526                          "product_id = ? AND class_combination_id IS NULL", 
     527                          array($product_id)); 
     528        $objQuery->delete("dtb_products_class", 
     529                          "product_id = ? AND class_combination_id IS NOT NULL", 
     530                          array($product_id)); 
    512531        $objQuery->commit(); 
    513532 
Note: See TracChangeset for help on using the changeset viewer.