Changeset 20777 for branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
- Timestamp:
- 2011/03/24 12:26:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
r20764 r20777 90 90 91 91 // ブロック一覧を取得 92 $this->arrBlocList = $this->lf getBlocData("device_type_id = ?", array($device_type_id));92 $this->arrBlocList = $this->lfGetBlocData($device_type_id); 93 93 94 94 // bloc_id が指定されている場合にはブロックデータの取得 95 95 if ($bloc_id != '') { 96 $arrBlocData = $this->lfGetBlocData( "bloc_id = ? AND device_type_id = ?",97 array($bloc_id , $device_type_id));96 $arrBlocData = $this->lfGetBlocData($device_type_id, "bloc_id = ?", 97 array($bloc_id)); 98 98 99 99 $tplPath = $package_path . $arrBlocData[0]['filename'] . '.tpl'; … … 136 136 fclose($fp); 137 137 138 $arrBlocData = $this->lfGetBlocData( "filename = ? AND device_type_id= ?",139 array($_POST['filename'] , $device_type_id));138 $arrBlocData = $this->lfGetBlocData($device_type_id, "filename = ?", 139 array($_POST['filename'])); 140 140 141 141 $bloc_id = $arrBlocData[0]['bloc_id']; … … 206 206 * ブロック情報を取得する. 207 207 * 208 * @param integer $device_type_id 端末種別ID 208 209 * @param string $where Where句文 209 210 * @param array $arrVal Where句の絞込条件値 210 211 * @return array ブロック情報 211 212 */ 212 function lf getBlocData($where = '', $arrVal = array()){213 function lfGetBlocData($device_type_id, $where = '', $arrVal = array()){ 213 214 $objQuery =& SC_Query_Ex::getSingletonInstance(); 214 215 $objQuery->setOrder("bloc_id"); 215 return $objQuery->select("*", "dtb_bloc", $where, $arrVal); 216 $sql_where = 'device_type_id = ?'; 217 $arrSql = array($device_type_id); 218 if (!empty($where)) { 219 $sql_where .= ' AND ' . $where; 220 $arrSql = array_merge($arrSql, $arrVal); 221 } 222 return $objQuery->select("*", "dtb_bloc", $sql_where, $arrSql); 216 223 } 217 224 … … 237 244 // データが存在しているかチェックを行う 238 245 if($arrData['bloc_id'] !== ''){ 239 $arrChk = $this->lf getBlocData("bloc_id = ? AND device_type_id = ?",240 array($arrData['bloc_id'] , $device_type_id));246 $arrChk = $this->lfGetBlocData($device_type_id, "bloc_id = ?", 247 array($arrData['bloc_id'])); 241 248 } 242 249 … … 270 277 // 同一のファイル名が存在している場合にはエラー 271 278 if(!isset($objErr->arrErr['filename']) && $array['filename'] !== ''){ 272 $arrChk = $this->lf getBlocData("filename = ?", array($array['filename']));279 $arrChk = $this->lfGetBlocData($array['device_type_id'], "filename = ?", array($array['filename'])); 273 280 274 281 if (count($arrChk[0]) >= 1 && $arrChk[0]['bloc_id'] != $array['bloc_id']) {
Note: See TracChangeset
for help on using the changeset viewer.