mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
issue 2687. problem of checking isvalid
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@12253 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
156d7655e9
commit
40a4a89de1
4 changed files with 6 additions and 4 deletions
|
|
@ -314,7 +314,7 @@
|
||||||
if(!$this->get('uploaded_count')) return;
|
if(!$this->get('uploaded_count')) return;
|
||||||
|
|
||||||
$oFileModel = &getModel('file');
|
$oFileModel = &getModel('file');
|
||||||
$file_list = $oFileModel->getFiles($this->comment_srl, $is_admin);
|
$file_list = $oFileModel->getFiles($this->comment_srl, array(), 'file_srl', true);
|
||||||
return $file_list;
|
return $file_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -675,7 +675,7 @@
|
||||||
// Find an iamge file among attached files if exists
|
// Find an iamge file among attached files if exists
|
||||||
if($this->get('uploaded_count')) {
|
if($this->get('uploaded_count')) {
|
||||||
$oFileModel = &getModel('file');
|
$oFileModel = &getModel('file');
|
||||||
$file_list = $oFileModel->getFiles($this->document_srl);
|
$file_list = $oFileModel->getFiles($this->document_srl, array(), 'file_srl', true);
|
||||||
if(count($file_list)) {
|
if(count($file_list)) {
|
||||||
foreach($file_list as $file) {
|
foreach($file_list as $file) {
|
||||||
if($file->direct_download!='Y') continue;
|
if($file->direct_download!='Y') continue;
|
||||||
|
|
@ -819,7 +819,7 @@
|
||||||
if(!$this->uploadedFiles[$sortIndex])
|
if(!$this->uploadedFiles[$sortIndex])
|
||||||
{
|
{
|
||||||
$oFileModel = &getModel('file');
|
$oFileModel = &getModel('file');
|
||||||
$this->uploadedFiles[$sortIndex] = $oFileModel->getFiles($this->document_srl, array(), $sortIndex);
|
$this->uploadedFiles[$sortIndex] = $oFileModel->getFiles($this->document_srl, array(), $sortIndex, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->uploadedFiles[$sortIndex];
|
return $this->uploadedFiles[$sortIndex];
|
||||||
|
|
|
||||||
|
|
@ -177,9 +177,10 @@
|
||||||
* @param string $sortIndex The column that used as sort index
|
* @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.
|
* @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') {
|
function getFiles($upload_target_srl, $columnList = array(), $sortIndex = 'file_srl', $ckValid = false) {
|
||||||
$args->upload_target_srl = $upload_target_srl;
|
$args->upload_target_srl = $upload_target_srl;
|
||||||
$args->sort_index = $sortIndex;
|
$args->sort_index = $sortIndex;
|
||||||
|
if($ckValid) $args->isvalid = 'Y';
|
||||||
$output = executeQuery('file.getFiles', $args, $columnList);
|
$output = executeQuery('file.getFiles', $args, $columnList);
|
||||||
if(!$output->data) return;
|
if(!$output->data) return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
</tables>
|
</tables>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="equal" column="upload_target_srl" var="upload_target_srl" filter="number" notnull="notnull" />
|
<condition operation="equal" column="upload_target_srl" var="upload_target_srl" filter="number" notnull="notnull" />
|
||||||
|
<condition operation="equal" column="isvalid" var="isvalid" pipe="and" />
|
||||||
</conditions>
|
</conditions>
|
||||||
<navigation>
|
<navigation>
|
||||||
<index var="sort_index" defualt="source_filename" order="asc" />
|
<index var="sort_index" defualt="source_filename" order="asc" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue