File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,17 @@ public function setHeaders($params)
9999
100100class FileManager extends Ftp
101101{
102- public function download ($ path )
102+ public function downloadTemp ($ path )
103103 {
104104 $ localPath = tempnam (sys_get_temp_dir (), 'fmanager_ ' );
105- if (parent :: download ($ path , $ localPath )) {
105+ if ($ this -> download ($ path , $ localPath )) {
106106 return $ localPath ;
107107 }
108108 }
109109
110110 public function getContent ($ path )
111111 {
112- $ localPath = $ this ->download ($ path );
112+ $ localPath = $ this ->downloadTemp ($ path );
113113 if ($ localPath ) {
114114 return @file_get_contents ($ localPath );
115115 }
@@ -154,7 +154,7 @@ public function getContent($path)
154154 $ filePath = Request::getQuery ('path ' );
155155 $ fileName = explode ('/ ' , $ filePath );
156156 $ fileName = end ($ fileName );
157- $ tmpFilePath = $ oFtp ->download ($ filePath );
157+ $ tmpFilePath = $ oFtp ->downloadTemp ($ filePath );
158158 if ($ fileContent = @file_get_contents ($ tmpFilePath )) {
159159 $ oResponse ->setData ($ fileContent );
160160 $ oResponse ->setHeaders (array (
You can’t perform that action at this time.
0 commit comments