mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
issue 2119. supporting php 5.4. modules and widgets.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12706 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ff75082eee
commit
8a7c28babc
90 changed files with 572 additions and 83 deletions
|
|
@ -22,6 +22,7 @@ class fileAdminController extends file
|
|||
function deleteModuleFiles($module_srl)
|
||||
{
|
||||
// Get a full list of attachments
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$columnList = array('file_srl', 'uploaded_filename');
|
||||
$output = executeQueryArray('file.getModuleFiles',$args, $columnList);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ class fileAdminModel extends file
|
|||
*/
|
||||
function getFileList($obj, $columnList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
$this->_makeSearchParam($obj, $args);
|
||||
|
||||
// Set valid/invalid state
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class fileAdminView extends file
|
|||
function dispFileAdminList()
|
||||
{
|
||||
// Options to get a list
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< Number of documents that appear on a single page
|
||||
$args->page_count = 10; // /< Number of pages that appear in the page navigation
|
||||
|
|
@ -53,7 +54,7 @@ class fileAdminView extends file
|
|||
{
|
||||
$file_srl = $file->file_srl;
|
||||
$target_srl = $file->upload_target_srl;
|
||||
$file_update_args = null;
|
||||
$file_update_args = new stdClass();
|
||||
$file_update_args->file_srl = $file_srl;
|
||||
// Find and update if upload_target_type doesn't exist
|
||||
if(!$file->upload_target_type)
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ class fileController extends file
|
|||
|
||||
// 다운로드 후 (가상)
|
||||
// Increase download_count
|
||||
$args = new stdClass();
|
||||
$args->file_srl = $file_srl;
|
||||
executeQuery('file.updateFileDownloadCount', $args);
|
||||
// Call a trigger (after)
|
||||
|
|
@ -536,6 +537,10 @@ class fileController extends file
|
|||
*/
|
||||
function setUploadInfo($editor_sequence, $upload_target_srl=0)
|
||||
{
|
||||
if(!isset($_SESSION['upload_info'][$editor_sequence]))
|
||||
{
|
||||
$_SESSION['upload_info'][$editor_sequence] = new stdClass();
|
||||
}
|
||||
$_SESSION['upload_info'][$editor_sequence]->enabled = true;
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl;
|
||||
}
|
||||
|
|
@ -549,6 +554,7 @@ class fileController extends file
|
|||
*/
|
||||
function setFilesValid($upload_target_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
return executeQuery('file.updateFileValid', $args);
|
||||
}
|
||||
|
|
@ -792,6 +798,7 @@ class fileController extends file
|
|||
// Success returned if no attachement exists
|
||||
if(!is_array($file_list)||!count($file_list)) return new Object();
|
||||
// Remove from the DB
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.deleteFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ class fileModel extends file
|
|||
*/
|
||||
function getFilesCount($upload_target_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
return (int)$output->data->count;
|
||||
|
|
@ -114,6 +115,8 @@ class fileModel extends file
|
|||
if($module_srl) $file_config = $oModuleModel->getModulePartConfig('file',$module_srl);
|
||||
if(!$file_config) $file_config = $file_module_config;
|
||||
|
||||
$config = new stdClass();
|
||||
|
||||
if($file_config)
|
||||
{
|
||||
$config->allowed_filesize = $file_config->allowed_filesize;
|
||||
|
|
@ -151,6 +154,7 @@ class fileModel extends file
|
|||
*/
|
||||
function getFile($file_srl, $columnList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->file_srl = $file_srl;
|
||||
$output = executeQueryArray('file.getFile', $args, $columnList);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -190,6 +194,7 @@ class fileModel extends file
|
|||
*/
|
||||
function getFiles($upload_target_srl, $columnList = array(), $sortIndex = 'file_srl', $ckValid = false)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->sort_index = $sortIndex;
|
||||
if($ckValid) $args->isvalid = 'Y';
|
||||
|
|
@ -220,6 +225,7 @@ class fileModel extends file
|
|||
function getUploadConfig()
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
$file_config = new stdClass();
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
$file_config->allowed_filesize = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue