mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-d7fe38b
This commit is contained in:
@@ -51,14 +51,13 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
* @var string
|
||||
**/
|
||||
protected $dbError = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Extend options with required fields
|
||||
*
|
||||
* @return void
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Extend options with required fields
|
||||
*
|
||||
* @author Dmitry (dio) Levashov
|
||||
*/
|
||||
public function __construct() {
|
||||
$opts = array(
|
||||
'host' => 'localhost',
|
||||
@@ -221,7 +220,7 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
* Cache dir contents
|
||||
*
|
||||
* @param string $path dir path
|
||||
* @return void
|
||||
* @return string
|
||||
* @author Dmitry Levashov
|
||||
**/
|
||||
protected function cacheDir($path) {
|
||||
@@ -617,14 +616,15 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close opened file
|
||||
*
|
||||
* @param resource $fp file pointer
|
||||
* @return bool
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
|
||||
/**
|
||||
* Close opened file
|
||||
*
|
||||
* @param resource $fp file pointer
|
||||
* @param string $path
|
||||
* @return bool
|
||||
* @author Dmitry (dio) Levashov
|
||||
*/
|
||||
protected function _fclose($fp, $path='') {
|
||||
@fclose($fp);
|
||||
if ($path) {
|
||||
@@ -657,15 +657,16 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
protected function _mkfile($path, $name) {
|
||||
return $this->make($path, $name, 'text/plain') ? $this->_joinPath($path, $name) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create symlink. FTP driver does not support symlinks.
|
||||
*
|
||||
* @param string $target link target
|
||||
* @param string $path symlink path
|
||||
* @return bool
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
|
||||
/**
|
||||
* Create symlink. FTP driver does not support symlinks.
|
||||
*
|
||||
* @param string $target link target
|
||||
* @param string $path symlink path
|
||||
* @param string $name
|
||||
* @return bool
|
||||
* @author Dmitry (dio) Levashov
|
||||
*/
|
||||
protected function _symlink($target, $path, $name) {
|
||||
return false;
|
||||
}
|
||||
@@ -689,17 +690,18 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
|
||||
return $this->query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move file into another parent dir.
|
||||
* Return new file path or false.
|
||||
*
|
||||
* @param string $source source file path
|
||||
* @param string $target target dir path
|
||||
* @param string $name file name
|
||||
* @return string|bool
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
|
||||
/**
|
||||
* Move file into another parent dir.
|
||||
* Return new file path or false.
|
||||
*
|
||||
* @param string $source source file path
|
||||
* @param $targetDir
|
||||
* @param string $name file name
|
||||
* @return bool|string
|
||||
* @internal param string $target target dir path
|
||||
* @author Dmitry (dio) Levashov
|
||||
*/
|
||||
protected function _move($source, $targetDir, $name) {
|
||||
$sql = 'UPDATE %s SET parent_id=%d, name=\'%s\' WHERE id=%d LIMIT 1';
|
||||
$sql = sprintf($sql, $this->tbf, $targetDir, $this->db->real_escape_string($name), $source);
|
||||
@@ -727,13 +729,14 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
protected function _rmdir($path) {
|
||||
return $this->query(sprintf('DELETE FROM %s WHERE id=%d AND mime=\'directory\' LIMIT 1', $this->tbf, $path)) && $this->db->affected_rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* undocumented function
|
||||
*
|
||||
* @return void
|
||||
* @author Dmitry Levashov
|
||||
**/
|
||||
|
||||
/**
|
||||
* undocumented function
|
||||
*
|
||||
* @param $path
|
||||
* @param $fp
|
||||
* @author Dmitry Levashov
|
||||
*/
|
||||
protected function _setContent($path, $fp) {
|
||||
rewind($fp);
|
||||
$fstat = fstat($fp);
|
||||
@@ -842,11 +845,13 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* chmod implementation
|
||||
*
|
||||
* @return bool
|
||||
**/
|
||||
/**
|
||||
* chmod implementation
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $mode
|
||||
* @return bool
|
||||
*/
|
||||
protected function _chmod($path, $mode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user