remove FilelistTable class using.
This commit is contained in:
parent
ef5c2e8ed0
commit
ad814af92a
|
@ -1,11 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
class FilelistController extends Zend_Controller_Action {
|
class FilelistController extends Zend_Controller_Action {
|
||||||
|
function preDispatch()
|
||||||
|
{
|
||||||
|
$this->db=Zend_Registry::get('db');
|
||||||
|
}
|
||||||
|
|
||||||
function indexAction() {
|
function indexAction() {
|
||||||
$uuid=$this->_request->getParam('uuid');
|
$uuid=$this->_request->getParam('uuid');
|
||||||
$filelist=new FilelistTable();
|
$sql="select f.filename,f.id,s.uuid,f.depth from datafile f,dataset s where s.id=f.dsid and s.uuid=? and f.depth=1 and f.filename<>'/uuid.txt' order by f.isdir desc,f.filename";
|
||||||
$adapter=$filelist->getAdapter();
|
$files=$this->db->fetchAll($this->db->quoteInto($sql,$uuid));
|
||||||
$db=$adapter->query("select f.filename,f.id,s.uuid,f.depth from datafile f,dataset s where s.id=f.dsid and s.uuid='$uuid' and f.depth=1 and f.filename<>'/uuid.txt' order by f.isdir desc,f.filename");
|
|
||||||
$files=$db->fetchAll();
|
|
||||||
/* $documents=array();
|
/* $documents=array();
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach($files as $file) {
|
foreach($files as $file) {
|
||||||
|
@ -30,10 +33,8 @@ class FilelistController extends Zend_Controller_Action {
|
||||||
//$depth=substr_count($subPath,'/');
|
//$depth=substr_count($subPath,'/');
|
||||||
$depth=$this->_request->getParam('depth');
|
$depth=$this->_request->getParam('depth');
|
||||||
$depth++;
|
$depth++;
|
||||||
$filelist=new FilelistTable();
|
$sql="select f.filename,f.id,s.uuid,f.depth from datafile f,dataset s where s.id=f.dsid and s.uuid='".$uuid."' and f.depth=".$depth." and f.filename<>'/uuid.txt' and f.filename ilike (select filename from datafile where id=?)||'%' order by f.isdir desc,f.filename";
|
||||||
$adapter=$filelist->getAdapter();
|
$files=$db->fetchAll($this->db->quoteInto($sql,$subpath));
|
||||||
$db=$adapter->query("select f.filename,f.id,s.uuid,f.depth from datafile f,dataset s where s.id=f.dsid and s.uuid='".$uuid."' and f.depth=".$depth." and f.filename<>'/uuid.txt' and f.filename ilike (select filename from datafile where id=".$subpath.")||'%' order by f.isdir desc,f.filename");
|
|
||||||
$files=$db->fetchAll();
|
|
||||||
/*
|
/*
|
||||||
$documents=array();
|
$documents=array();
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
Loading…
Reference in New Issue