function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 旧コミュニティ情報 $community_id = $request->ACSGetParameter('community_id'); $old_community_row = ACSCommunity::get_community_profile_row($community_id); // 新情報 $form = $request->ACSGetParameters(); $form['user_community_id'] = $acs_user_info_row['user_community_id']; // コミュニティML設定は変更不可(サニタイズ) if ($old_community_row['contents_row_array']['ml_addr']['contents_value']) { $form['community_ml_address'] = ''; } else { if ($form['community_ml_address'] != '') { // コミュニティMLにプレフィックス・サフィックスを追加 $form['community_ml_address'] = ACS_COMMUNITY_ML_ADDR_PREFIX . $form['community_ml_address'] . ACS_COMMUNITY_ML_ADDR_SUFFIX; } } /***************************** //旧情報に信頼Communityが登録されている場合は退避しておく 初期データのform表示がされたため、退避は不要となった 2006/3/22 if(count($old_community_row['contents_row_array']['bbs']['trusted_community_row_array']) > 0){ if($form['bbs_open_level_code'] == '04'){ $form['bbs_trusted_community_id_array'] = array(); foreach($old_community_row['contents_row_array']['bbs']['trusted_community_row_array'] as $index => $set_data){ array_push($form['bbs_trusted_community_id_array'],$set_data['community_id']); } } } if($old_community_row['contents_row_array']['community_folder']['trusted_community_row_array']){ if(!$form['community_folder_trusted_community_id_array'] && $form['community_folder_open_level_code'] == '04'){ $form['community_folder_trusted_community_id_array'] = array(); foreach($old_community_row['contents_row_array']['community_folder']['trusted_community_row_array'] as $index => $set_data){ array_push($form['community_folder_trusted_community_id_array'],$set_data['community_id']); } } } /* if($old_community_row['join_trusted_community_row_array'] && !$form['join_trusted_community_row_array']){ $form['join_trusted_community_row_array'] = $old_community_row['join_trusted_community_row_array']; } ******************************/ // DB更新 $community_id = ACSCommunity::update_community($form); // コミュニティトップページ表示 $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_id; header("Location: {$community_top_page_url}"); }