: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @class elFinder command "copy".
* Put files in filemanager clipboard.
* @author Dmitry (dio) Levashov
elFinder.prototype.commands.copy = function() {
pattern : 'ctrl+c ctrl+insert'
this.getstate = function(select) {
var sel = this.files(select),
filter = function(files) {
return jQuery.grep(files, function(f) {
fres = fres && f.read ? true : false;
return cnt && filter(sel).length == cnt ? 0 : -1;
this.exec = function(hashes) {
jQuery.each(this.files(hashes), function(i, file) {
return !dfrd.reject(['errCopy', file.name, 'errPerm']);
return dfrd.state() == 'rejected' ? dfrd : dfrd.resolve(fm.clipboard(this.hashes(hashes)));