Changeset 9589 for OpenPNE3/trunk/lib/form/CommunityForm.class.php
- Timestamp:
- Dec 18, 2008, 6:47:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/lib/form/CommunityForm.class.php
r7861 r9589 12 12 public function configure() 13 13 { 14 unset($this['created_at'], $this['updated_at']); 15 16 $this->setValidator('config', new sfValidatorPass()); 14 17 } 15 18 … … 17 20 { 18 21 $community = parent::save($con); 22 $tainted_values = $this->getTaintedValues(); 23 $community_config_array = $tainted_values['config']; 19 24 20 25 if ($this->isNew()) { … … 24 29 $communityMember->setCommunityId($community->getId()); 25 30 $communityMember->save(); 31 32 foreach ($community_config_array as $community_config_key => $community_config_value) 33 { 34 $community_config = new CommunityConfig(); 35 $community_config->setCommunityId($community->getId()); 36 $community_config->setName($community_config_key); 37 $community_config->setValue($community_config_value); 38 $community_config->save(); 39 } 40 } 41 else 42 { 43 foreach ($community_config_array as $community_config_key => $community_config_value) 44 { 45 $community_config = CommunityConfigPeer::retrieveByNameAndCommunityId($community_config_key, $community->getId()); 46 $community_config->setValue($community_config_value); 47 $community_config->save(); 48 } 26 49 } 27 50
Note: See TracChangeset
for help on using the changeset viewer.