Changeset 22823
- Timestamp:
- 2013/05/19 20:34:20 (11 years ago)
- Location:
- branches/version-2_13-dev/data/class/helper
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/helper/SC_Helper_PageLayout.php
r22786 r22823 162 162 { 163 163 $objQuery =& SC_Query_Ex::getSingletonInstance(); 164 164 165 $table = <<< __EOF__ 165 166 dtb_blocposition AS pos … … 174 175 $this->setBlocPathTo($device_type_id, $arrBlocs); 175 176 } 176 177 177 178 //全ページ設定と各ページのブロックの重複を削除 179 $arrUniqBlocIds = array(); 178 180 foreach ($arrBlocs as $index => $arrBloc) { 179 if ($arrBloc['anywhere'] == 1){181 if ($arrBloc['anywhere'] == 1){ 180 182 $arrUniqBlocIds[] = $arrBloc['bloc_id']; 181 183 } 182 184 } 183 185 foreach ($arrBlocs as $bloc_index => $arrBlocData) { 184 if (in_array($arrBlocData['bloc_id'], $arrUniqBlocIds) && $arrBlocData['anywhere'] == 0){186 if (in_array($arrBlocData['bloc_id'], $arrUniqBlocIds) && $arrBlocData['anywhere'] == 0){ 185 187 unset($arrBlocs[$bloc_index]); 186 188 } 187 189 } 190 188 191 return $arrBlocs; 189 192 } -
branches/version-2_13-dev/data/class/helper/SC_Helper_Transform.php
r22567 r22823 236 236 public function insertBefore($html_snip) 237 237 { 238 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 239 $this->lfSetTransform('insertBefore', $objElement[0], $html_snip); 238 if (isset($this->arrSelectElements[$this->search_depth])) { 239 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 240 $this->lfSetTransform('insertBefore', $objElement[0], $html_snip); 241 } 240 242 } 241 243 return $this; … … 251 253 public function insertAfter($html_snip) 252 254 { 253 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 254 $this->lfSetTransform('insertAfter', $objElement[0], $html_snip); 255 if (isset($this->arrSelectElements[$this->search_depth])) { 256 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 257 $this->lfSetTransform('insertAfter', $objElement[0], $html_snip); 258 } 255 259 } 256 260 return $this; … … 266 270 public function appendFirst($html_snip) 267 271 { 268 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 269 $this->lfSetTransform('appendFirst', $objElement[0], $html_snip); 272 if (isset($this->arrSelectElements[$this->search_depth])) { 273 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 274 $this->lfSetTransform('appendFirst', $objElement[0], $html_snip); 275 } 270 276 } 271 277 return $this; … … 281 287 public function appendChild($html_snip) 282 288 { 283 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 284 $this->lfSetTransform('appendChild', $objElement[0], $html_snip); 289 if (isset($this->arrSelectElements[$this->search_depth])) { 290 foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 291 $this->lfSetTransform('appendChild', $objElement[0], $html_snip); 292 } 285 293 } 286 294 return $this; … … 296 304 public function replaceElement($html_snip) 297 305 { 298 foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 299 $this->lfSetTransform('replaceElement', $objElement[0], $html_snip); 306 if (isset($this->arrSelectElements[$this->search_depth])) { 307 foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 308 $this->lfSetTransform('replaceElement', $objElement[0], $html_snip); 309 } 300 310 } 301 311 return $this; … … 310 320 public function removeElement() 311 321 { 312 foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 313 $this->lfSetTransform('replaceElement', $objElement[0], ''); 322 if (isset($this->arrSelectElements[$this->search_depth])) { 323 foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 324 $this->lfSetTransform('replaceElement', $objElement[0], ''); 325 } 314 326 } 315 327 return $this; … … 579 591 $this->arrSelectElements[$this->search_depth][$arrElement[0]] = array($elementNo, &$arrElement[1]); 580 592 } 581 582 593 } 583 594
Note: See TracChangeset
for help on using the changeset viewer.