PluginProbe ʕ •ᴥ•ʔ
File Manager Pro – Filester / 2.0
File Manager Pro – Filester v2.0
2.1.1 trunk 1.6.1 1.7.6 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 2.0 2.0.1 2.0.2 2.1.0
filester / includes / File_manager / lib / php / elFinderVolumeTrashMySQL.class.php
filester / includes / File_manager / lib / php Last commit date
editors 9 months ago libs 9 months ago plugins 9 months ago resources 9 months ago MySQLStorage.sql 9 months ago autoload.php 9 months ago elFinder.class.php 9 months ago elFinderConnector.class.php 9 months ago elFinderFlysystemGoogleDriveNetmount.php 9 months ago elFinderPlugin.php 9 months ago elFinderSession.php 9 months ago elFinderSessionInterface.php 9 months ago elFinderVolumeBox.class.php 9 months ago elFinderVolumeDriver.class.php 9 months ago elFinderVolumeDropbox.class.php 9 months ago elFinderVolumeDropbox2.class.php 9 months ago elFinderVolumeFTP.class.php 9 months ago elFinderVolumeGoogleDrive.class.php 9 months ago elFinderVolumeGroup.class.php 9 months ago elFinderVolumeLocalFileSystem.class.php 9 months ago elFinderVolumeMySQL.class.php 9 months ago elFinderVolumeOneDrive.class.php 9 months ago elFinderVolumeSFTPphpseclib.class.php 9 months ago elFinderVolumeTrash.class.php 9 months ago elFinderVolumeTrashMySQL.class.php 9 months ago mime.types 9 months 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