function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $target_community_id = $request->getParameter('community_id'); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $target_community_folder_id = $request->getParameter('folder_id'); // form $form = $request->ACSGetParameters(); /* ファイルアップロード処理 */ $ret = 0; if ($_FILES['new_file']['tmp_name'] != '') { // ファイル情報取得 $file_obj = ACSFile::get_upload_file_info_instance($_FILES['new_file'], $target_community_id, $acs_user_info_row['user_community_id']); // フォルダにファイル追加処理 $user_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); $folder_obj = $user_folder_obj->get_folder_obj(); $ret = $folder_obj->add_file($file_obj); } if (!$ret) { print "ERROR: Upload file failed."; } if ($ret) { // 新規登録したファイルID $file_id = $file_obj->get_file_id(); // 2007.12 追加 // ML通知チェックがあればMLにメール送信する $send_announce_mail = $request->getParameter('send_announce_mail'); if ($send_announce_mail == "t") { ACSCommunityMail::send_fileupload_mail($target_community_id, $acs_user_info_row, $folder_obj, $file_obj); } } // ファイル履歴情報登録 if ($ret) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $ret = ACSFileHistory::set_file_history($file_info_row, $acs_user_info_row['user_community_id'], $form['comment'], ACSMsg::get_mst('file_history_operation_master', 'D0101')); } // ファイル詳細情報登録 if ($form['file_category_code'] != '' && $ret) { $file_contents_type_list_row_array = ACSFileDetailInfo::get_file_contents_type_list_row_array($form['file_category_code']); $file_contents_form_array = array(); foreach ($file_contents_type_list_row_array as $file_contents_type_list_row) { $file_contents_form = array('file_id' => $file_id, 'file_contents_type_code' => $file_contents_type_list_row['file_contents_type_code'], 'file_contents_value' => $form['file_contents_array'][$file_contents_type_list_row['file_contents_type_code']]); array_push($file_contents_form_array, $file_contents_form); } $ret = ACSFileDetailInfo::set_file_detail_info($file_id, $form['file_category_code'], $file_contents_form_array); } // フォルダ表示アクション呼び出し $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $folder_action = $this->getControllerPath('Community', 'Folder'); $folder_action .= '&community_id=' . $target_community_id; $folder_action .= '&folder_id=' . $target_community_folder_id; header("Location: {$folder_action}"); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $community_row = $request->getAttribute('community_row'); $bbs_row_array = $request->getAttribute('bbs_row_array'); $term = $request->getAttribute('term'); // ユーザ情報 $community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']; $community_row['image_url'] = ACSCommunity::get_image_url($community_row['community_id']); if ($community_row['file_id'] != '') { $community_file_info_row = ACSFileInfoModel::select_file_info_row($community_row['file_id']); $community_row['image_title'] = $community_file_info_row['display_file_name']; } else { // コミュニティ写真はありません $community_row['image_title'] = ACSMsg::get_msg('Community', ' BBSRSSSuccessView.class.php', 'M001'); } // 加工 foreach ($bbs_row_array as $index => $bbs_row) { // 親記事の投稿者 トップページURL $bbs_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $bbs_row['community_id']; // 返信画面URL $bbs_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id']; // ファイルの画像URL if ($bbs_row['file_id'] != "") { $bbs_row_array[$index]['file_url'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'rss'); } } //---- アクセス制御 ----// $role_array = ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row); $bbs_row_array = ACSAccessControl::get_valid_row_array_for_community($acs_user_info_row, $role_array, $bbs_row_array); //----------------------// // ACSBBS::print_bbs_rss()で使用するパラメータをセットする $params = array(); // ベースURL if ($acs_user_info_row['is_acs_user']) { $params['base_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_LOGIN_URL'); } else { $params['base_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); } // 自身のURL $params['rss_syndication_url'] = $params['base_url'] . $this->getControllerPath('Community', 'BBSRSS') . '&id=' . $community_row['community_id'] . '&term=' . $term; // RSS出力部 ACSBBS::print_bbs_rss($community_row, $bbs_row_array, $params); // 終了 exit; }
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'); $target_community_id = $request->getParameter('community_id'); $target_community_folder_id = $request->getParameter('folder_id'); $file_id = $request->getParameter('file_id'); $file_history_id = $request->getParameter('file_history_id'); // アクセス制御 // プットフォルダ、ファイルはNG $file_obj = ACSFile::get_file_info_instance($file_id); if ($file_obj->get_owner_community_id() != $target_community_id) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; //return VIEW_NONE; } $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $file_history_row = ACSFileHistory::get_file_history_row($file_history_id); // form $form = $request->ACSGetParameters(); // ファイル復活処理 // フォルダobj $community_folder_obj = new ACSUserFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); $folder_obj = $community_folder_obj->get_folder_obj(); // file_info更新 $ret = $folder_obj->restore_history_file($file_info_row, $file_history_row); if (!$ret) { print "ERROR: Restore file failed."; } // ファイル履歴情報登録 if ($ret) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $ret = ACSFileHistory::set_file_history($file_info_row, $acs_user_info_row['user_community_id'], $form['comment'], ACSMsg::get_msg('Community', '', 'M001')); } // ファイル詳細情報へ遷移 $file_detail_url = $this->getControllerPath('Community', 'FileDetail'); $file_detail_url .= '&community_id=' . $target_community_id; $file_detail_url .= '&file_id=' . $file_id; $file_detail_url .= '&folder_id=' . $target_community_folder_id; header("Location: {$file_detail_url}"); //return VIEW_NONE; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $target_user_community_id = $request->getParameter('id'); $target_user_community_folder_id = $request->getParameter('folder_id'); $file_id = $request->getParameter('file_id'); if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // form $form = $request->ACSGetParameters(); // ファイル更新処理 if ($_FILES['new_file']['tmp_name'] != '') { // ファイルobj $file_obj = ACSFile::get_upload_file_info_instance_for_update($_FILES['new_file'], $target_user_community_id, $acs_user_info_row['user_community_id'], $file_id); // フォルダobj $user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $target_user_community_folder_id); $folder_obj = $user_folder_obj->get_folder_obj(); // ファイル履歴が1件も登録されていない場合は"作成"を登録する $file_history_row_array = ACSFileHistory::get_file_history_row_array($file_id); if (count($file_history_row_array) == 0) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $file_history_id = ACSFileHistory::set_file_history($file_info_row, $file_info_row['entry_user_community_id'], '', ACSMsg::get_mst('file_history_operation_master', 'D0101')); } // file_info更新, ファイル保存 $ret = $folder_obj->update_file($file_obj); } if (!$ret) { print "ERROR: Upload file failed."; } // ファイル履歴情報登録 if ($ret) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $ret = ACSFileHistory::set_file_history($file_info_row, $acs_user_info_row['user_community_id'], $form['comment'], ACSMsg::get_mst('file_history_operation_master', 'D0201')); } // ファイル詳細情報へ遷移 $file_detail_url = $this->getControllerPath('User', 'FileDetail'); $file_detail_url .= '&id=' . $target_user_community_id; $file_detail_url .= '&file_id=' . $file_id; $file_detail_url .= '&folder_id=' . $target_user_community_folder_id; header("Location: {$file_detail_url}"); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $target_community_id = $request->getParameter('community_id'); // 対象となるフォルダIDを取得 $target_community_folder_id = $request->getParameter('folder_id'); // 詳細情報を表示するファイルIDを取得 $file_id = $request->getParameter('file_id'); // ファイル履歴ID $file_history_id = $request->getParameter('file_history_id'); // form $form = $request->ACSGetParameters(); // 表示するページの所有者情報取得 $target_community_row = ACSCommunity::get_community_row($target_community_id); // フォルダ情報取得 $community_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); $folder_obj = $community_folder_obj->get_folder_obj(); // ファイル情報取得 $file_obj = ACSFile::get_file_info_instance($file_id); // フォルダの公開範囲でアクセス制御 if (!$community_folder_obj->has_privilege($target_community_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ファイル履歴コメントを登録する if ($form['comment'] != '') { // ファイル履歴が1件も登録されていない場合は"作成"を登録する $file_history_row_array = ACSFileHistory::get_file_history_row_array($file_id); if (count($file_history_row_array) == 0) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $file_history_id = ACSFileHistory::set_file_history($file_info_row, $file_info_row['entry_user_community_id'], '', ACSMsg::get_mst('file_history_operation_master', 'D0101')); } $ret = ACSFileHistoryComment::set_file_history_comment($file_history_id, $acs_user_info_row['user_community_id'], $form['comment']); } // ファイル詳細情報へ遷移 $file_detail_url = $this->getControllerPath('Community', 'FileDetail'); $file_detail_url .= '&community_id=' . $target_community_id; $file_detail_url .= '&file_id=' . $file_id; $file_detail_url .= '&folder_id=' . $target_community_folder_id; header("Location: {$file_detail_url}"); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); // RSS対象のアドレス開始値 $system_top_address = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); $rss_syndicationURL = $system_top_address; $rss_syndicationURL .= $this->getControllerPath('Community', 'PressReleaseRSS'); $rss_syndicationURL .= '&community_id=' . $request->getParameter('community_id'); // コミュニティ情報 $community_id = $request->getParameter('community_id'); $community_row = ACSCommunity::get_community_row($community_id); $community_row['community_profile'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D07')); //コミュニティトップページ $community_top_page_url = $this->getControllerPath('Community', 'Index') . '&community_id=' . $community_id; $community_row['community_profile']['top_page_url'] = $community_top_page_url; //コミュニティ写真表示 if ($community_row['file_id']) { $community_file_info_row = ACSFileInfoModel::select_file_info_row($community_row['file_id']); $community_row['image_title'] = $community_file_info_row['display_file_name']; } else { $community_row['image_title'] = ACSMsg::get_msg('Community', 'PressReleaseRSSAction.class.php', 'M001'); } $community_row['image_url'] = ACSCommunity::get_image_url($community_id, 'rss'); // BBS記事一覧 一つだけ出力するものを選択できる $bbs_row_array = ACSBBS::get_bbs_rss_row_array($community_id, 1); if (count($bbs_row_array) > 0) { // 掲載終了日が本日を越えていないもののみにする // 本日を取得 $today = date("Y/m/d"); $bbs_rss_array = array(); foreach ($bbs_row_array as $index => $bbs_row) { //対象となる記事のみを抽出 $bbs_date = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], false, false, false); if ($bbs_date >= $today || $bbs_date == null) { //記事配列を作り変え $bbs_rss_array[$index] = $bbs_row; //記事のリンク先を作る $bbs_rss_array[$index]['bbs_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id']; //画像のリンク先を作る $bbs_rss_array[$index]['file_link'] = ""; if ($bbs_row['file_id'] != "") { $bbs_rss_array[$index]['file_url'] = $system_top_address . ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'rss'); //RSS表示用 } } } $detail = true; //存在する } else { $detail = false; //存在しない } // RSS対象のBBS記事一覧 $user->setAttribute('bbs_rss_array', $bbs_rss_array); // RSS対象のCommunity情報 $user->setAttribute('community_row', $community_row); $community_name = htmlspecialchars($community_row['community_name']); // set $request->setAttribute('rss_syndicationURL', $rss_syndicationURL); $request->setAttribute('bbs_rss_array', $bbs_rss_array); $request->setAttribute('community_row', $community_row); $request->setAttribute('community_name', $community_name); $request->setAttribute('system_top_address', $system_top_address); //記事の存在フラグ $request->setAttribute('detail', $detail); require "PressReleaseRSS.php"; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $target_user_community_id = $request->getParameter('community_id'); $image_new_mode = $request->getParameter('image_new_mode'); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $file_id = $request->getParameter('file_id'); if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } //追加と更新の分岐 ver1.1 // $image_new_modeフラグ // file_infoテーブルへの追加trueまたは更新false if ($image_new_mode) { // ファイル情報取得(新規の場合) $file_obj = ACSFile::get_upload_file_info_instance($_FILES['new_file'], $target_user_community_id, $acs_user_info_row['user_community_id']); } else { // ファイル情報取得(更新の場合) $file_obj = ACSFile::get_upload_file_info_instance($_FILES['new_file'], $target_user_community_id, $acs_user_info_row['user_community_id'], $file_id); } //ファイルの種類チェック $image_check = $file_obj->is_image_file(); if (!$image_check) { print "ERROR: This file is not image-format."; } /* ファイルアップロード処理 */ // ファイルの保存 $ret = $file_obj->save_upload_file('PROFILE'); ACSDB::_do_query("BEGIN"); if ($image_new_mode) { $ret = $file_obj->add_file(); } else { $ret = ACSFileInfoModel::update_all_file_info($file_obj); } if (!$ret) { ACSDB::_do_query("ROLLBACK"); print "ERROR: Upload image-file failed.:file_info"; } else { if ($image_new_mode) { //community_image_fileテーブルへの追加 $ret = ACSCommunityImageFileModel::insert_community_image($file_obj); if (!$ret) { ACSDB::_do_query("ROLLBACK"); print "ERROR: Upload image-file failed.:image_file"; } else { ACSDB::_do_query("COMMIT"); //追加モードのコミット } } else { ACSDB::_do_query("COMMIT"); //更新モードのコミット } } /* 表示アクション呼び出し */ $image_change_url = $this->getControllerPath('Community', 'EditProfileImage'); $image_change_url .= '&community_id=' . $target_user_community_id; header("Location: {$image_change_url}"); }
/** * ファイル削除 * * @return $ret */ function delete_file() { $ret = ACSFileInfoModel::delete_file_info($this); return $ret; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $target_user_info_row = $request->getAttribute('target_user_info_row'); $diary_row_array = $request->getAttribute('diary_row_array'); $term = $request->getAttribute('term'); // ユーザ情報 $target_user_info_row['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $target_user_info_row['user_community_id']; $target_user_info_row['image_url'] = ACSUser::get_image_url($target_user_info_row['user_community_id']); if ($target_user_info_row['file_id'] != '') { $user_file_info_row = ACSFileInfoModel::select_file_info_row($target_user_info_row['file_id']); $target_user_info_row['image_title'] = $user_file_info_row['display_file_name']; } else { // 写真はありません $target_user_info_row['image_title'] = ACSMsg::get_msg('User', 'DiaryRSSSuccessView.class.php', 'M001'); } // 信頼済みコミュニティ情報 foreach ($diary_row_array as $index => $diary_row) { // 友人に公開 if ($diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) { $diary_row_array[$index]['trusted_community_row_array'] = ACSDiary::get_diary_trusted_community_row_array($diary_row['diary_id']); } // ダイアリーコメントURL $diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath('User', 'DiaryComment') . '&id=' . $target_user_info_row['community_id'] . '&diary_id=' . $diary_row['diary_id']; // ファイルの画像URL if ($diary_row['file_id'] != '') { $diary_row_array[$index]['file_url'] = ACSDiaryFile::get_image_url($diary_row['file_id']); } } // ACSDiary::print_diary_rss()で使用するパラメータをセットする $params = array(); // ベースURL if ($acs_user_info_row['is_acs_user']) { $params['base_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_LOGIN_URL'); } else { $params['base_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); } // 自身のURL $params['rss_syndication_url'] = $params['base_url'] . $this->getControllerPath('User', 'DiaryRSS') . '&id=' . $target_user_info_row['user_community_id'] . '&term=' . $term; // <description> if ($acs_user_info_row['is_acs_user']) { if (ACSUser::is_friends($acs_user_info_row['user_community_id'], $target_user_info_row['user_community_id'])) { // 友人向け $params['description'] = $target_user_info_row['contents_row_array']['community_profile_friend']['contents_value']; } else { // ログインユーザ向け $params['description'] = $target_user_info_row['contents_row_array']['community_profile_login']['contents_value']; } } else { // 一般向け $params['description'] = $target_user_info_row['contents_row_array']['community_profile']['contents_value']; } //---- アクセス制御 ----// $role_array = ACSAccessControl::get_user_community_role_array($acs_user_info_row, $target_user_info_row); $diary_row_array = ACSAccessControl::get_valid_row_array_for_user_community($acs_user_info_row, $role_array, $diary_row_array); //----------------------// // RSS出力部 ACSDiary::print_diary_rss($target_user_info_row, $diary_row_array, $params); // 終了 exit; }
/** * ファイル情報取得 * * @param $folder_id_array */ static function select_folder_file_info_row_array($folder_id_array) { /* フォルダファイルを取得 */ $target_folder_id = implode(", ", $folder_id_array); $folder_id_sql = "SELECT *"; $folder_id_sql .= " FROM folder_file"; $folder_id_sql .= " WHERE folder_id IN (" . $target_folder_id . ")"; $folder_file_row_array = ACSDB::_get_row_array($folder_id_sql); /* フォルダIDを配列に格納 */ $file_id_array = array(); foreach ($folder_file_row_array as $folder_file_row) { array_push($file_id_array, $folder_file_row['file_id']); } /* ファイル情報を取得 */ if (count($file_id_array) > 0) { $row_array = ACSFileInfoModel::select_file_info_row_array($file_id_array); } return $row_array; }
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'); $target_community_id = $request->getParameter('community_id'); $target_community_folder_id = $request->getParameter('folder_id'); $file_id = $request->getParameter('file_id'); // アクセス制御 // プットフォルダ、ファイルはNG $file_obj = ACSFile::get_file_info_instance($file_id); if ($file_obj->get_owner_community_id() != $target_community_id) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // form $form = $request->ACSGetParameters(); $ret = false; // ファイル更新処理 if ($_FILES['new_file']['tmp_name'] != '') { // ファイルobj $file_obj = ACSFile::get_upload_file_info_instance_for_update($_FILES['new_file'], $target_community_id, $acs_user_info_row['user_community_id'], $file_id); // フォルダobj $community_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); $folder_obj = $community_folder_obj->get_folder_obj(); // ファイル履歴が1件も登録されていない場合は"作成"を登録する $file_history_row_array = ACSFileHistory::get_file_history_row_array($file_id); if (count($file_history_row_array) == 0) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $file_history_id = ACSFileHistory::set_file_history($file_info_row, $file_info_row['entry_user_community_id'], '', ACSMsg::get_mst('file_history_operation_master', 'D0101')); } // file_info更新, ファイル保存 $ret = $folder_obj->update_file($file_obj); } if (!$ret) { print "ERROR: ファイルアップロードに失敗しました"; } // ファイル履歴情報登録 if ($ret) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $ret = ACSFileHistory::set_file_history($file_info_row, $acs_user_info_row['user_community_id'], $form['comment'], ACSMsg::get_mst('file_history_operation_master', 'D0201')); // 2007.12 追加 // ML通知チェックがあればMLにメール送信する // コミュニティ情報の取得 $send_announce_mail = $request->getParameter('send_announce_mail'); if ($send_announce_mail == "t") { ACSCommunityMail::send_fileupload_mail($target_community_id, $acs_user_info_row, $folder_obj, $file_obj); } } // ファイル詳細情報へ遷移 $file_detail_url = $this->getControllerPath('Community', 'FileDetail'); $file_detail_url .= '&community_id=' . $target_community_id; $file_detail_url .= '&file_id=' . $file_id; $file_detail_url .= '&folder_id=' . $target_community_folder_id; header("Location: {$file_detail_url}"); }
/** * 表示用ファイル名を更新 * エラー処理 (ROLLBACK) は呼び元で行うこと * * @param $target_file_id * @param $new_display_file_name * @return $ret 更新結果 (true/false) */ static function update_display_file_name($target_file_id, $new_display_file_name) { $row = array(); /* 更新データセット */ $row['display_file_name'] = $new_display_file_name; /* 更新処理 */ $ret = ACSFileInfoModel::update_file_info($target_file_id, $row); return $ret; }
/** * ファイル復活 (履歴管理) * * @param $file_obj * * @return $ret */ function restore_history_file($file_info_row, $file_history_row) { $acs_user_info_row = $this->get_acs_user_info_row(); $acs_user_community_id = $acs_user_info_row['user_community_id']; ACSDB::_do_query("BEGIN"); // file_info_row更新 $row = array(); $row['display_file_name'] = $file_history_row['display_file_name']; $row['server_file_name'] = $file_history_row['server_file_name']; $row['thumbnail_server_file_name'] = $file_history_row['thumbnail_server_file_name']; $row['mime_type'] = $file_history_row['mime_type']; $row['file_size'] = $file_history_row['file_size']; $row['update_user_community_id'] = $acs_user_community_id; $row['update_date'] = 'now'; $ret = ACSFileInfoModel::update_file_info($file_info_row['file_id'], $row); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } /* フォルダの更新日を更新 */ $file_obj = ACSFile::get_file_info_instance($file_info_row['file_id']); $ret = ACSFolderModel::update_folder_update_date($this->get_folder_id(), $acs_user_community_id, $file_obj->get_update_date()); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } ACSDB::_do_query("COMMIT"); return $ret; }