mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
adds comments for phpDoc
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10767 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1245bcc648
commit
48d6dca2f9
7 changed files with 328 additions and 75 deletions
|
|
@ -1,20 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileAdminController
|
||||
* admin controller class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief admin controller class of the file module
|
||||
**/
|
||||
|
||||
class fileAdminController extends file {
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete the attachment of a particular module
|
||||
* Delete the attachment of a particular module
|
||||
*
|
||||
* @param int $module_srl Sequence of module to delete files
|
||||
* @return Object
|
||||
**/
|
||||
function deleteModuleFiles($module_srl) {
|
||||
// Get a full list of attachments
|
||||
|
|
@ -47,7 +49,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete selected files from the administrator page
|
||||
* Delete selected files from the administrator page
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileAdminDeleteChecked() {
|
||||
// An error appears if no document is selected
|
||||
|
|
@ -76,7 +80,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Add file information
|
||||
* Add file information
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileAdminInsertConfig() {
|
||||
// Get configurations (using module model object)
|
||||
|
|
@ -98,7 +104,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Add file information for each module
|
||||
* Add file information for each module
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function procFileAdminInsertModuleConfig() {
|
||||
// Get variables
|
||||
|
|
@ -146,7 +154,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Add to SESSION file srl
|
||||
* Add to SESSION file srl
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileAdminAddCart()
|
||||
{
|
||||
|
|
@ -165,7 +175,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief php.ini에서 가져온 값의 형식이 M과 같을경우 byte로 바꿔주기
|
||||
* Change value from human readable to byte unit
|
||||
*
|
||||
* @param string $size_str Size string
|
||||
* @return int The byte value for input
|
||||
**/
|
||||
function _changeBytes($size_str)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,20 +1,64 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileAdminModel
|
||||
* Admin model class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief admin model class of the file module
|
||||
**/
|
||||
|
||||
class fileAdminModel extends file {
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get all the attachments in order by time descending (for administrators)
|
||||
* Get all the attachments in order by time descending (for administrators)
|
||||
*
|
||||
* <pre>
|
||||
* Search options:
|
||||
* - s_module_srl: int[] or int, search module_srl
|
||||
* - exclude_module_srl: int[] or int, exclude module_srl
|
||||
* - isvalid: Y or N
|
||||
* - direct_download: Y or N
|
||||
* - s_filename: string, like operation
|
||||
* - s_filesize_more: int, more operation, byte unit
|
||||
* - s_filesize_mega_more: int, more operation, mega unit
|
||||
* - s_filesize_less: int, less operation, byte unit
|
||||
* - s_filesize_mega_less: int, less operation, mega unit
|
||||
* - s_download_count: int, more operation
|
||||
* - s_regdate: string(YYYYMMDDHHMMSS), like prefix operation(STRING%)
|
||||
* - s_ipaddress: string, like prefix operation
|
||||
* - s_user_id: string
|
||||
* - s_user_name: string
|
||||
* - s_nick_name: string
|
||||
* - sort_index: string. default: files.file_srl
|
||||
* - page : int
|
||||
* - list_count: int. default: 20
|
||||
* - page_count: int. default: 10
|
||||
*
|
||||
* Result data:
|
||||
* - file_srl
|
||||
* - upload_target_srl
|
||||
* - upload_target_type
|
||||
* - sid
|
||||
* - module_srl
|
||||
* - member_srl
|
||||
* - download_count
|
||||
* - direct_download
|
||||
* - source_filename
|
||||
* - uploaded_filename
|
||||
* - file_size
|
||||
* - comment
|
||||
* - isvaild
|
||||
* - regdate
|
||||
* - ipaddress
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param object $obj Search options
|
||||
* @param array $columnList Column list to get from DB
|
||||
* @return Object Object contains query result
|
||||
**/
|
||||
function getFileList($obj, $columnList = array()) {
|
||||
$this->_makeSearchParam($obj, $args);
|
||||
|
|
@ -51,7 +95,21 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return number of attachments which belongs to a specific document
|
||||
* Return number of attachments which belongs to a specific document
|
||||
*
|
||||
* <pre>
|
||||
* Result data:
|
||||
* +---------+-------+
|
||||
* | isvalid | count |
|
||||
* +---------+-------+
|
||||
* | Y | 00 |
|
||||
* +---------+-------+
|
||||
* | N | 00 |
|
||||
* +---------+-------+
|
||||
* </pre>
|
||||
*
|
||||
* @param object $obj Search options (not used...)
|
||||
* @return array
|
||||
**/
|
||||
function getFilesCountByGroupValid($obj = '') {
|
||||
//$this->_makeSearchParam($obj, $args);
|
||||
|
|
@ -61,7 +119,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return number of attachments which belongs to a specific document
|
||||
* Return number of attachments which belongs to a specific date
|
||||
*
|
||||
* @param string $date Date string
|
||||
* @return int
|
||||
**/
|
||||
function getFilesCountByDate($date = '') {
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
|
|
@ -72,6 +133,13 @@
|
|||
return $output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make search parameters from object(private)
|
||||
*
|
||||
* @param object $obj Original searach options
|
||||
* @param object $args Result searach options
|
||||
* @return void
|
||||
*/
|
||||
function _makeSearchParam(&$obj, &$args)
|
||||
{
|
||||
// Search options
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileAdminView
|
||||
* Admin view of the module class file
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief admin view of the module class file
|
||||
**/
|
||||
|
||||
class fileAdminView extends file {
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display output list (for administrator)
|
||||
* Display output list (for administrator)
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispFileAdminList() {
|
||||
// Options to get a list
|
||||
|
|
@ -174,7 +175,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Set attachment information (for administrator)
|
||||
* Set attachment information (for administrator)
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispFileAdminConfig() {
|
||||
$oFileModel = &getModel('file');
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<?php
|
||||
/**
|
||||
* @class file
|
||||
* High class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief high class of the file module
|
||||
**/
|
||||
|
||||
class file extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// Register action forward (to use in administrator mode)
|
||||
|
|
@ -43,7 +43,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief a method to check if successfully installed
|
||||
* A method to check if successfully installed
|
||||
*
|
||||
* @return bool
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -72,7 +74,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Execute update
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -124,7 +128,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Re-generate the cache file
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,26 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileController
|
||||
* Controller class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief controller class of the file module
|
||||
**/
|
||||
|
||||
class fileController extends file {
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Upload attachments in the editor
|
||||
* Upload attachments in the editor
|
||||
*
|
||||
* Determine the upload target srl from editor_sequence and uploadTargetSrl variables.
|
||||
* Create and return the UploadTargetSrl if not exists so that UI can use the value
|
||||
* for sync.
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function procFileUpload() {
|
||||
$file_info = Context::get('Filedata');
|
||||
|
|
@ -45,7 +47,9 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief iframe upload attachments
|
||||
* Iframe upload attachments
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileIframeUpload() {
|
||||
// Basic variables setting
|
||||
|
|
@ -80,7 +84,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief image resize
|
||||
* Image resize
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileImageResize() {
|
||||
$source_src = Context::get('source_src');
|
||||
|
|
@ -109,10 +115,35 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief Download Attachment
|
||||
* Download Attachment
|
||||
*
|
||||
* <pre>
|
||||
* Receive a request directly
|
||||
* file_srl: File sequence
|
||||
* sid : value in DB for comparison, No download if not matched
|
||||
*
|
||||
* This method call trigger 'file.downloadFile'.
|
||||
* before, after.
|
||||
* Trigger object contains:
|
||||
* - download_url
|
||||
* - file_srl
|
||||
* - upload_target_srl
|
||||
* - upload_target_type
|
||||
* - sid
|
||||
* - module_srl
|
||||
* - member_srl
|
||||
* - download_count
|
||||
* - direct_download
|
||||
* - source_filename
|
||||
* - uploaded_filename
|
||||
* - file_size
|
||||
* - comment
|
||||
* - isvalid
|
||||
* - regdate
|
||||
* - ipaddress
|
||||
* </pre>
|
||||
*
|
||||
* return void
|
||||
**/
|
||||
function procFileDownload() {
|
||||
$oFileModel = &getModel('file');
|
||||
|
|
@ -247,7 +278,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete an attachment from the editor
|
||||
* Delete an attachment from the editor
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileDelete() {
|
||||
// Basic variable setting(upload_target_srl and module_srl set)
|
||||
|
|
@ -288,7 +321,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief get file list
|
||||
* get file list
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileGetList()
|
||||
{
|
||||
|
|
@ -321,7 +356,10 @@
|
|||
$this->add('file_list', $fileList);
|
||||
}
|
||||
/**
|
||||
* @brief A trigger to return numbers of attachments in the upload_target_srl (document_srl)
|
||||
* A trigger to return numbers of attachments in the upload_target_srl (document_srl)
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerCheckAttached(&$obj) {
|
||||
$document_srl = $obj->document_srl;
|
||||
|
|
@ -334,7 +372,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to link the attachment with the upload_target_srl (document_srl)
|
||||
* A trigger to link the attachment with the upload_target_srl (document_srl)
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerAttachFiles(&$obj) {
|
||||
$document_srl = $obj->document_srl;
|
||||
|
|
@ -347,7 +388,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to delete the attachment in the upload_target_srl (document_srl)
|
||||
* A trigger to delete the attachment in the upload_target_srl (document_srl)
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerDeleteAttached(&$obj) {
|
||||
$document_srl = $obj->document_srl;
|
||||
|
|
@ -358,7 +402,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to return numbers of attachments in the upload_target_srl (comment_srl)
|
||||
* A trigger to return numbers of attachments in the upload_target_srl (comment_srl)
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerCommentCheckAttached(&$obj) {
|
||||
$comment_srl = $obj->comment_srl;
|
||||
|
|
@ -371,7 +418,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to link the attachment with the upload_target_srl (comment_srl)
|
||||
* A trigger to link the attachment with the upload_target_srl (comment_srl)
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerCommentAttachFiles(&$obj) {
|
||||
$comment_srl = $obj->comment_srl;
|
||||
|
|
@ -385,7 +435,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to delete the attachment in the upload_target_srl (comment_srl)
|
||||
* A trigger to delete the attachment in the upload_target_srl (comment_srl)
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerCommentDeleteAttached(&$obj) {
|
||||
$comment_srl = $obj->comment_srl;
|
||||
|
|
@ -396,7 +449,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to delete all the attachements when deleting the module
|
||||
* A trigger to delete all the attachements when deleting the module
|
||||
*
|
||||
* @param object $obj Trigger object
|
||||
* @return Object
|
||||
**/
|
||||
function triggerDeleteModuleFiles(&$obj) {
|
||||
$module_srl = $obj->module_srl;
|
||||
|
|
@ -407,7 +463,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Upload enabled
|
||||
* Upload enabled
|
||||
*
|
||||
* @param int $editor_sequence
|
||||
* @param int $upload_target_srl
|
||||
* @return void
|
||||
**/
|
||||
function setUploadInfo($editor_sequence, $upload_target_srl=0) {
|
||||
$_SESSION['upload_info'][$editor_sequence]->enabled = true;
|
||||
|
|
@ -415,8 +475,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Set the attachements of the upload_target_srl to be valid
|
||||
* Set the attachements of the upload_target_srl to be valid
|
||||
* By changing its state to valid when a document is inserted, it prevents from being considered as a unnecessary file
|
||||
*
|
||||
* @param int $upload_target_srl
|
||||
* @return Object
|
||||
**/
|
||||
function setFilesValid($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
|
|
@ -424,7 +487,35 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Add an attachement
|
||||
* Add an attachement
|
||||
*
|
||||
* <pre>
|
||||
* This method call trigger 'file.insertFile'.
|
||||
*
|
||||
* Before trigger object contains:
|
||||
* - module_srl
|
||||
* - upload_target_srl
|
||||
*
|
||||
* After trigger object contains:
|
||||
* - file_srl
|
||||
* - upload_target_srl
|
||||
* - module_srl
|
||||
* - direct_download
|
||||
* - source_filename
|
||||
* - uploaded_filename
|
||||
* - donwload_count
|
||||
* - file_size
|
||||
* - comment
|
||||
* - member_srl
|
||||
* - sid
|
||||
* </pre>
|
||||
*
|
||||
* @param object $file_info PHP file information array
|
||||
* @param int $module_srl Sequence of module to upload file
|
||||
* @param int $upload_target_srl Sequence of target to upload file
|
||||
* @param int $download_count Initial download count
|
||||
* @param bool $manual_insert If set true, pass validation check
|
||||
* @return Object
|
||||
**/
|
||||
function insertFile($file_info, $module_srl, $upload_target_srl, $download_count = 0, $manual_insert = false) {
|
||||
// Call a trigger (before)
|
||||
|
|
@ -532,7 +623,31 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete the attachment
|
||||
* Delete the attachment
|
||||
*
|
||||
* <pre>
|
||||
* This method call trigger 'file.deleteFile'.
|
||||
* Before, after trigger object contains:
|
||||
* - download_url
|
||||
* - file_srl
|
||||
* - upload_target_srl
|
||||
* - upload_target_type
|
||||
* - sid
|
||||
* - module_srl
|
||||
* - member_srl
|
||||
* - download_count
|
||||
* - direct_download
|
||||
* - source_filename
|
||||
* - uploaded_filename
|
||||
* - file_size
|
||||
* - comment
|
||||
* - isvalid
|
||||
* - regdate
|
||||
* - ipaddress
|
||||
* </pre>
|
||||
*
|
||||
* @param int $file_srl Sequence of file to delete
|
||||
* @return Object
|
||||
**/
|
||||
function deleteFile($file_srl) {
|
||||
if(!$file_srl) return;
|
||||
|
|
@ -572,7 +687,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete all attachments of a particular document
|
||||
* Delete all attachments of a particular document
|
||||
*
|
||||
* @param int $upload_target_srl Upload target srl to delete files
|
||||
* @return Object
|
||||
**/
|
||||
function deleteFiles($upload_target_srl) {
|
||||
// Get a list of attachements
|
||||
|
|
@ -603,7 +721,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Move an attachement to the other document
|
||||
* Move an attachement to the other document
|
||||
*
|
||||
* @param int $source_srl Sequence of target to move
|
||||
* @param int $target_module_srl New squence of module
|
||||
* @param int $target_srl New sequence of target
|
||||
* @return void
|
||||
**/
|
||||
function moveFile($source_srl, $target_module_srl, $target_srl) {
|
||||
if($source_srl == $target_srl) return;
|
||||
|
|
@ -644,7 +767,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Find the attachment where a key is upload_target_srl and then return java script code
|
||||
* Find the attachment where a key is upload_target_srl and then return java script code
|
||||
*
|
||||
* @deprecated
|
||||
* @param int $editor_sequence
|
||||
* @param int $upload_target_srl
|
||||
* @return void
|
||||
**/
|
||||
function printUploadedFileList($editor_sequence, $upload_target_srl) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileModel
|
||||
* Model class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief model class of the file module
|
||||
**/
|
||||
|
||||
class fileModel extends file {
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return a file list attached in the document
|
||||
* Return a file list attached in the document
|
||||
*
|
||||
* It is used when a file list of the upload_target_srl is requested for creating/updating a document.
|
||||
* Attempt to replace with sever-side session if upload_target_srl is not yet determined
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function getFileList() {
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -66,7 +68,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return number of attachments which belongs to a specific document
|
||||
* Return number of attachments which belongs to a specific document
|
||||
*
|
||||
* @param int $upload_target_srl The sequence to get a number of files
|
||||
* @return int Returns a number of files
|
||||
**/
|
||||
function getFilesCount($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
|
|
@ -75,14 +80,21 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Get a download path
|
||||
* Get a download path
|
||||
*
|
||||
* @param int $file_srl The sequence of file to get url
|
||||
* @param string $sid
|
||||
* @return string Returns a url
|
||||
**/
|
||||
function getDownloadUrl($file_srl, $sid) {
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s', 'file', 'procFileDownload', $file_srl, $sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get file cinfigurations
|
||||
* Get file configurations
|
||||
*
|
||||
* @param int $module_srl If set this, returns specific module's configuration. Otherwise returns global configuration.
|
||||
* @return object Returns configuration.
|
||||
**/
|
||||
function getFileConfig($module_srl = null) {
|
||||
// Get configurations (using module model object)
|
||||
|
|
@ -121,7 +133,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Get file information
|
||||
* Get file information
|
||||
*
|
||||
* @param int $file_srl The sequence of file to get information
|
||||
* @param array $columnList The list of columns to get from DB
|
||||
* @return Object|object|array If error returns an instance of Object. If result set is one returns a object that contins file information. If result set is more than one returns array of object.
|
||||
**/
|
||||
function getFile($file_srl, $columnList = array()) {
|
||||
$args->file_srl = $file_srl;
|
||||
|
|
@ -154,7 +170,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return all files which belong to a specific document
|
||||
* Return all files which belong to a specific document
|
||||
*
|
||||
* @param int $upload_target_srl The sequence of target to get file list
|
||||
* @param array $columnList The list of columns to get from DB
|
||||
* @param string $sortIndex The column that used as sort index
|
||||
* @return array Returns array of object that contains file information. If no result returns null.
|
||||
**/
|
||||
function getFiles($upload_target_srl, $columnList = array(), $sortIndex = 'file_srl') {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
|
|
@ -178,7 +199,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return configurations of the attachement (it automatically checks if an administrator is)
|
||||
* Return configurations of the attachement (it automatically checks if an administrator is)
|
||||
*
|
||||
* @return object Returns a file configuration of current module. If user is admin, returns PHP's max file size and allow all file types.
|
||||
**/
|
||||
function getUploadConfig() {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
@ -199,7 +222,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return messages for file upload and it depends whether an admin is or not
|
||||
* Return messages for file upload and it depends whether an admin is or not
|
||||
*
|
||||
* @param int $attached_size
|
||||
* @return string
|
||||
**/
|
||||
function getUploadStatus($attached_size = 0) {
|
||||
$file_config = $this->getUploadConfig();
|
||||
|
|
@ -218,12 +244,22 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return file configuration of the module
|
||||
* Return file configuration of the module
|
||||
*
|
||||
* @param int $module_srl The sequence of module to get configuration
|
||||
* @return object
|
||||
**/
|
||||
function getFileModuleConfig($module_srl) {
|
||||
return $this->getFileConfig($module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a grant of file
|
||||
*
|
||||
* @param object $file_info The file information to get grant
|
||||
* @param object $member_info The member information to get grant
|
||||
* @return object Returns a grant of file
|
||||
*/
|
||||
function getFileGrant($file_info, $member_info){
|
||||
if (!$file_info) return null;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileView
|
||||
* The view class file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief The view class file module
|
||||
*
|
||||
*
|
||||
*
|
||||
**/
|
||||
|
||||
class fileView extends file {
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This is for additional configuration for service module
|
||||
* This is for additional configuration for service module
|
||||
* It only receives file configurations
|
||||
*
|
||||
* @param string $obj The html string of page of addition setup of module
|
||||
* @return Object
|
||||
**/
|
||||
function triggerDispFileAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue