mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Autogenerate editor_sequence if not provided
에디터를 통하지 않고 파일을 첨부할 수 있도록 하기 위한 준비작업
This commit is contained in:
parent
9d7f220417
commit
4d6335c660
1 changed files with 12 additions and 2 deletions
|
|
@ -784,10 +784,18 @@ class fileController extends file
|
|||
*
|
||||
* @param int $editor_sequence
|
||||
* @param int $upload_target_srl
|
||||
* @return void
|
||||
* @return int
|
||||
*/
|
||||
function setUploadInfo($editor_sequence, $upload_target_srl=0)
|
||||
function setUploadInfo($editor_sequence = 0, $upload_target_srl = 0)
|
||||
{
|
||||
if(!$editor_sequence)
|
||||
{
|
||||
if(!isset($_SESSION['_editor_sequence_']))
|
||||
{
|
||||
$_SESSION['_editor_sequence_'] = 1;
|
||||
}
|
||||
$editor_sequence = ++$_SESSION['_editor_sequence_'];
|
||||
}
|
||||
if(!isset($_SESSION['upload_info']) || !is_array($_SESSION['upload_info']))
|
||||
{
|
||||
$_SESSION['upload_info'] = array();
|
||||
|
|
@ -798,6 +806,8 @@ class fileController extends file
|
|||
}
|
||||
$_SESSION['upload_info'][$editor_sequence]->enabled = true;
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl;
|
||||
|
||||
return $editor_sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue