Changeset 17958
- Timestamp:
- 10/06/08 12:33:06 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.helper.datamanager2/type/mnrelation.php
r16539 r17958 147 147 */ 148 148 var $member_limit_like = null; 149 150 /** 151 * Set this to false to use with universalchooser, this skips making sure the key exists in option list 152 * Mainly used to avoid unnecessary seeks to load all a ton of objects to the options list. This is false 153 * by default for mn relations, since by its nature this is intended for dynamic searches. 154 * 155 * @var boolean 156 * @access public 157 */ 158 var $require_corresponding_option = false; 149 159 150 160 /** … … 296 306 { 297 307 $this->selection = Array(); 298 299 if (! $this->storage->object) 308 309 // Check for the defaults section first 310 if ( isset($this->storage->_defaults) 311 && isset($this->storage->_defaults[$this->name])) 312 { 313 foreach ($this->storage->_defaults[$this->name] as $id) 314 { 315 if (is_object($id)) 316 { 317 if ($this->master_is_id) 318 { 319 $this->selection[] = $id->id; 320 } 321 else 322 { 323 $this->selection[] = $id->guid; 324 } 325 } 326 else 327 { 328 $this->selection[] = $guid; 329 } 330 } 331 } 332 333 if (!$this->storage->object) 300 334 { 301 335 // That's all folks, no storage object, thus we cannot continue. 302 336 return; 303 337 } 304 338 305 339 $this->_load_membership_objects(); 340 306 341 foreach ($this->_membership_objects as $member) 307 342 { … … 323 358 } 324 359 } 325 360 326 361 /** 327 362 * Updates the mapping table to match the current selection. branches/MidCOM_2_8/midcom.helper.datamanager2/type/select.php
r16539 r17958 125 125 * @access public 126 126 */ 127 var $options = null;127 var $options = array(); 128 128 129 129 /** … … 355 355 { 356 356 $key = (string) $key; 357 357 358 358 if ($this->option_callback === null) 359 359 {
