Changeset 18171 for branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
- Timestamp:
- 2009/07/07 16:41:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
r18062 r18171 145 145 } 146 146 break; 147 147 // 商品登録・編集 148 148 case 'edit': 149 149 if($_POST['product_id'] == "" and SC_Utils_Ex::sfIsInt($_POST['copy_product_id'])){ … … 164 164 } 165 165 break; 166 166 // 確認ページから完了ページへ 167 167 case 'complete': 168 168 $this->tpl_mainpage = 'products/complete.tpl'; … … 177 177 178 178 break; 179 179 // 画像のアップロード 180 180 case 'upload_image': 181 181 // ファイル存在チェック 182 182 $this->arrErr = array_merge((array)$this->arrErr, (array)$this->objUpFile->checkEXISTS($_POST['image_key'])); 183 183 // 画像保存処理 184 $this->arrErr[$_POST['image_key']] = $this->objUpFile->makeTempFile($_POST['image_key'] );184 $this->arrErr[$_POST['image_key']] = $this->objUpFile->makeTempFile($_POST['image_key'],IMAGE_RENAME); 185 185 186 186 // 中、小画像生成 … … 189 189 $this->lfProductPage(); // 商品登録ページ 190 190 break; 191 191 // 画像の削除 192 192 case 'delete_image': 193 193 $this->objUpFile->deleteFile($_POST['image_key']); 194 194 $this->lfProductPage(); // 商品登録ページ 195 195 break; 196 196 // 確認ページからの戻り 197 197 case 'confirm_return': 198 198 $this->lfProductPage(); // 商品登録ページ 199 199 break; 200 200 // 関連商品選択 201 201 case 'recommend_select' : 202 202 $this->lfProductPage(); // 商品登録ページ … … 707 707 empty($this->objUpFile->save_file[$arrImageKey[$to_key]])) { 708 708 709 $path = $this->objUpFile->makeThumb($from_path, $to_w, $to_h); 709 // リネームする際は、自動生成される画像名に一意となるように、Suffixを付ける 710 $dst_file = $this->objUpFile->lfGetTmpImageName(IMAGE_RENAME, "", $this->objUpFile->temp_file[$arrImageKey[$from_key]]) . $this->lfGetAddSuffix($to_key); 711 $path = $this->objUpFile->makeThumb($from_path, $to_w, $to_h, $dst_file); 710 712 $this->objUpFile->temp_file[$arrImageKey[$to_key]] = basename($path); 711 713 } … … 713 715 return ""; 714 716 } 717 } 718 719 /** 720 * リネームする際は、自動生成される画像名に一意となるように、Suffixを付ける 721 */ 722 function lfGetAddSuffix($to_key){ 723 if( IMAGE_RENAME === true ){ return ; } 724 725 // 自動生成される画像名 726 $dist_name = ""; 727 switch($to_key){ 728 case "main_list_image": 729 $dist_name = '_s'; 730 break; 731 case "main_image": 732 $dist_name = '_m'; 733 break; 734 default; 735 $arrRet = explode('sub_image', $to_key); 736 $dist_name = '_sub' .$arrRet[1]; 737 break; 738 } 739 return $dist_name; 715 740 } 716 741 /**
Note: See TracChangeset
for help on using the changeset viewer.