Changeset 20873


Ignore:
Timestamp:
2011/04/20 20:54:05 (10 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20110420111207-w6x2qgagrkxzpicd
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-20110420115111-2pxxufrnx3xf2iph
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110420115401-9kx4lvbpu3vop7fm
bzr:revno:
3584
bzr:revprop:branch-nick:
branches/version-2_11-dev
bzr:root:
branches/version-2_11-dev
bzr:text-revisions:

data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php ohkouchi@loop-az.jp-20110420115111-2pxxufrnx3xf2iph
bzr:timestamp:
2011-04-20 20:54:01.167999983 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-04-20T11:54:01.168000Z
Message:

#1231 (在庫数の「無制限」チェックBOXを全てOFFにすると、全て無制限になってしまう)

  • checkbox がすべて空の場合は, 空白で埋めるように修正
File:
1 edited

Legend:

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

    r20764 r20873  
    9090                $this->tpl_mainpage = 'products/product_class_confirm.tpl'; 
    9191                $this->doDisp($objFormParam); 
     92                $this->fillCheckboxesValue('stock_unlimited', $_POST['total']); 
    9293                $objFormParam->setParam($_POST); 
    9394                $objFormParam->convParam(); 
     
    776777        return $objQuery->getRow($col, "dtb_products_class", "product_id = ? AND class_combination_id IS NULL", array($product_id)); 
    777778    } 
     779 
     780    /** 
     781     * チェックボックスの値を埋める. 
     782     * 
     783     * チェックボックスが, すべて空で submit されると, $_POST の値が全く渡らない 
     784     * ため, SC_FormParam::getValue() で取得できない. 
     785     * これを防ぐため, $_POST[$key] を直接操作し, 指定の長さで空白の配列を作成する 
     786     * 
     787     * @param string $key $_POST のキー 
     788     * @param integer $size 作成する配列のサイズ 
     789     * @return void 
     790     */ 
     791    function fillCheckboxesValue($key, $size) { 
     792        if (empty($_POST[$key])) { 
     793            $_POST[$key] = array_pad(array(), $size, ''); 
     794        } 
     795    } 
    778796} 
Note: See TracChangeset for help on using the changeset viewer.