- Timestamp:
- 2014/05/29 15:16:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_Detail.php
r23458 r23460 183 183 // ファイル情報の初期化 184 184 $this->objUpFile = $this->lfInitFile($this->objUpFile); 185 $this->mode = $this->getMode(); 186 187 $objProduct = new SC_Product_Ex(); 185 188 186 189 // プロダクトIDの正当性チェック 187 $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'), $this->objFormParam->getValue('product_id')); 188 $this->mode = $this->getMode(); 189 190 $objProduct = new SC_Product_Ex(); 190 $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'), $this->objFormParam->getValue('product_id'), $objProduct); 191 191 192 $objProduct->setProductsClassByProductIds(array($product_id)); 192 193 … … 322 323 * @param string $admin_mode 323 324 * @param int $product_id 325 * @param SC_Product $objProduct 324 326 * @return int|void 325 327 */ 326 public function lfCheckProductId($admin_mode, $product_id )328 public function lfCheckProductId($admin_mode, $product_id, SC_Product $objProduct) 327 329 { 328 330 // 管理機能からの確認の場合は、非公開の商品も表示する。 329 331 if (isset($admin_mode) && $admin_mode == 'on' && SC_Utils_Ex::sfIsSuccess(new SC_Session_Ex(), false)) { 330 $ where = 'del_flg = 0';332 $include_hidden = true; 331 333 } else { 332 $where = 'del_flg = 0 AND status = 1'; 333 } 334 335 if (!SC_Utils_Ex::sfIsInt($product_id) 336 || SC_Utils_Ex::sfIsZeroFilling($product_id) 337 || !SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', (array) $product_id, $where) 338 ) { 334 $include_hidden = false; 335 } 336 337 if (!$objProduct->isValidProductId($product_id, $include_hidden)) { 339 338 SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND); 340 339 }
Note: See TracChangeset
for help on using the changeset viewer.