.tmp
2 years ago
editors
2 years ago
libs
2 years ago
plugins
2 years ago
resources
2 years ago
MySQLStorage.sql
2 years ago
autoload.php
2 years ago
elFinder.class.php
2 years ago
elFinderConnector.class.php
2 years ago
elFinderFlysystemGoogleDriveNetmount.php
2 years ago
elFinderPlugin.php
2 years ago
elFinderSession.php
2 years ago
elFinderSessionInterface.php
2 years ago
elFinderVolumeBox.class.php
2 years ago
elFinderVolumeDriver.class.php
2 years ago
elFinderVolumeDropbox.class.php
2 years ago
elFinderVolumeDropbox2.class.php
2 years ago
elFinderVolumeFTP.class.php
2 years ago
elFinderVolumeGoogleDrive.class.php
2 years ago
elFinderVolumeGroup.class.php
2 years ago
elFinderVolumeLocalFileSystem.class.php
2 years ago
elFinderVolumeMySQL.class.php
2 years ago
elFinderVolumeOneDrive.class.php
2 years ago
elFinderVolumeSFTPphpseclib.class.php
2 years ago
elFinderVolumeTrash.class.php
2 years ago
elFinderVolumeTrashMySQL.class.php
2 years ago
index.php
2 years ago
mime.types
2 years ago
elFinderVolumeTrashMySQL.class.php
52 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * elFinder driver for trash bin at MySQL Database |
| 5 | * |
| 6 | * @author NaokiSawada |
| 7 | **/ |
| 8 | class elFinderVolumeTrashMySQL extends elFinderVolumeMySQL |
| 9 | { |
| 10 | /** |
| 11 | * Driver id |
| 12 | * Must be started from letter and contains [a-z0-9] |
| 13 | * Used as part of volume id. |
| 14 | * |
| 15 | * @var string |
| 16 | **/ |
| 17 | protected $driverId = 'tm'; |
| 18 | |
| 19 | public function __construct() |
| 20 | { |
| 21 | parent::__construct(); |
| 22 | // original option of the Trash |
| 23 | $this->options['lockEverything'] = false; // Lock all items in the trash to disable delete, move, rename. |
| 24 | |
| 25 | // common options as the volume driver |
| 26 | $this->options['alias'] = 'Trash'; |
| 27 | $this->options['quarantine'] = ''; |
| 28 | $this->options['rootCssClass'] = 'elfinder-navbar-root-trash'; |
| 29 | $this->options['copyOverwrite'] = false; |
| 30 | $this->options['uiCmdMap'] = array('paste' => 'hidden', 'mkdir' => 'hidden', 'copy' => 'restore'); |
| 31 | $this->options['disabled'] = array('archive', 'duplicate', 'edit', 'extract', 'mkfile', 'places', 'put', 'rename', 'resize', 'upload'); |
| 32 | } |
| 33 | |
| 34 | public function mount(array $opts) |
| 35 | { |
| 36 | if ($this->options['lockEverything']) { |
| 37 | if (!is_array($opts['attributes'])) { |
| 38 | $opts['attributes'] = array(); |
| 39 | } |
| 40 | $attr = array( |
| 41 | 'pattern' => '/./', |
| 42 | 'locked' => true, |
| 43 | ); |
| 44 | array_unshift($opts['attributes'], $attr); |
| 45 | } |
| 46 | // force set `copyJoin` to true |
| 47 | $opts['copyJoin'] = true; |
| 48 | |
| 49 | return parent::mount($opts); |
| 50 | } |
| 51 | } |
| 52 |