Server IP : 104.21.38.3 / Your IP : 172.71.124.157 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/lapma.in/wp-content/plugins/wp-file-manager/lib/js/commands/ |
Upload File : |
/** * @class elFinder command "duplicate" * Create file/folder copy with suffix "copy Number" * * @type elFinder.command * @author Dmitry (dio) Levashov */ elFinder.prototype.commands.duplicate = function() { "use strict"; var fm = this.fm; this.getstate = function(select) { var sel = this.files(select), cnt = sel.length, filter = function(files) { var fres = true; return jQuery.grep(files, function(f) { fres = fres && f.read && f.phash === fm.cwd().hash && ! fm.isRoot(f)? true : false; return fres; }); }; return cnt && fm.cwd().write && filter(sel).length == cnt ? 0 : -1; }; this.exec = function(hashes) { var fm = this.fm, files = this.files(hashes), cnt = files.length, dfrd = jQuery.Deferred() .fail(function(error) { error && fm.error(error); }), args = []; if (! cnt) { return dfrd.reject(); } jQuery.each(files, function(i, file) { if (!file.read || !fm.file(file.phash).write) { return !dfrd.reject(['errCopy', file.name, 'errPerm']); } }); if (dfrd.state() == 'rejected') { return dfrd; } return fm.request({ data : {cmd : 'duplicate', targets : this.hashes(hashes)}, notify : {type : 'copy', cnt : cnt}, navigate : { toast : { inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmdduplicate')])} } } }); }; };