SILENT KILLERPanel

Current Path: > home > > > > transcarter > www > wp-content > > > plugins > wp-file-manager > > lib > js > commands


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home////transcarter/www/wp-content///plugins/wp-file-manager//lib/js/commands

NameTypeSizeLast ModifiedActions
archive.js File 2530 bytes June 30 2025 14:02:54.
back.js File 512 bytes June 30 2025 14:02:54.
chmod.js File 9591 bytes June 30 2025 14:02:54.
colwidth.js File 480 bytes June 30 2025 14:02:54.
copy.js File 986 bytes June 30 2025 14:02:54.
cut.js File 1146 bytes June 30 2025 14:02:54.
download.js File 17005 bytes June 30 2025 14:02:54.
duplicate.js File 1392 bytes June 30 2025 14:02:54.
edit.js File 35310 bytes June 30 2025 14:02:54.
empty.js File 3395 bytes June 30 2025 14:02:54.
extract.js File 5301 bytes June 30 2025 14:02:54.
forward.js File 509 bytes June 30 2025 14:02:54.
fullscreen.js File 1074 bytes June 30 2025 14:02:54.
getfile.js File 4163 bytes June 30 2025 14:02:54.
help.js File 14547 bytes June 30 2025 14:02:54.
hidden.js File 276 bytes June 30 2025 14:02:54.
hide.js File 4365 bytes June 30 2025 14:02:54.
home.js File 528 bytes June 30 2025 14:02:54.
info.js File 13447 bytes June 30 2025 14:02:54.
mkdir.js File 2574 bytes June 30 2025 14:02:54.
mkfile.js File 1675 bytes June 30 2025 14:02:54.
netmount.js File 10681 bytes June 30 2025 14:02:54.
open.js File 6947 bytes June 30 2025 14:02:54.
opendir.js File 886 bytes June 30 2025 14:02:54.
opennew.js File 1242 bytes June 30 2025 14:02:54.
paste.js File 10411 bytes June 30 2025 14:02:54.
places.js File 773 bytes June 30 2025 14:02:54.
preference.js File 21880 bytes June 30 2025 14:02:54.
quicklook.js File 24445 bytes June 30 2025 14:02:54.
quicklook.plugins.js File 59912 bytes June 30 2025 14:02:54.
reload.js File 1904 bytes June 30 2025 14:02:54.
rename.js File 16299 bytes June 30 2025 14:02:54.
resize.js File 53421 bytes June 30 2025 14:02:54.
restore.js File 7625 bytes June 30 2025 14:02:54.
rm.js File 14762 bytes June 30 2025 14:02:54.
search.js File 4110 bytes June 30 2025 14:02:54.
selectall.js File 606 bytes June 30 2025 14:02:54.
selectinvert.js File 471 bytes June 30 2025 14:02:54.
selectnone.js File 530 bytes June 30 2025 14:02:54.
sort.js File 4421 bytes June 30 2025 14:02:54.
undo.js File 3703 bytes June 30 2025 14:02:54.
up.js File 710 bytes June 30 2025 14:02:54.
upload.js File 12696 bytes June 30 2025 14:02:54.
view.js File 2868 bytes June 30 2025 14:02:54.

Reading File: /home////transcarter/www/wp-content///plugins/wp-file-manager//lib/js/commands/getfile.js

/**
 * @class elFinder command "getfile". 
 * Return selected files info into outer callback.
 * For use elFinder with wysiwyg editors etc.
 *
 * @author Dmitry (dio) Levashov, dio@std42.ru
 **/
 (elFinder.prototype.commands.getfile = function() {
	"use strict";
	var self   = this,
		fm     = this.fm,
		filter = function(files) {
			var o = self.options,
				fres = true;

			files = jQuery.grep(files, function(file) {
				fres = fres && (file.mime != 'directory' || o.folders) && file.read ? true : false;
				return fres;
			});

			return o.multiple || files.length == 1 ? files : [];
		};
	
	this.alwaysEnabled = true;
	this.callback      = fm.options.getFileCallback;
	this._disabled     = typeof(this.callback) == 'function';
	
	this.getstate = function(select) {
		var sel = this.files(select),
			cnt = sel.length;
			
		return this.callback && cnt && filter(sel).length == cnt ? 0 : -1;
	};
	
	this.exec = function(hashes) {
		var fm    = this.fm,
			opts  = this.options,
			files = this.files(hashes),
			cnt   = files.length,
			url   = fm.option('url'),
			tmb   = fm.option('tmbUrl'),
			dfrd  = jQuery.Deferred()
				.done(function(data) {
					var res,
						done = function() {
							if (opts.oncomplete == 'close') {
								fm.hide();
							} else if (opts.oncomplete == 'destroy') {
								fm.destroy();
							}
						},
						fail = function(error) {
							if (opts.onerror == 'close') {
								fm.hide();
							} else if (opts.onerror == 'destroy') {
								fm.destroy();
							} else {
								error && fm.error(error);
							}
						};
					
					fm.trigger('getfile', {files : data});
					
					try {
						res = self.callback(data, fm);
					} catch(e) {
						fail(['Error in `getFileCallback`.', e.message]);
						return;
					}
					
					if (typeof res === 'object' && typeof res.done === 'function') {
						res.done(done).fail(fail);
					} else {
						done();
					}
				}),
			result = function(file) {
				return opts.onlyURL
					? opts.multiple ? jQuery.map(files, function(f) { return f.url; }) : files[0].url
					: opts.multiple ? files : files[0];
			},
			req = [], 
			i, file, dim;

		for (i = 0; i < cnt; i++) {
			file = files[i];
			if (file.mime == 'directory' && !opts.folders) {
				return dfrd.reject();
			}
			file.baseUrl = url;
			if (file.url == '1') {
				req.push(fm.request({
					data : {cmd : 'url', target : file.hash},
					notify : {type : 'url', cnt : 1, hideCnt : true},
					preventDefault : true
				})
				.done(function(data) {
					if (data.url) {
						var rfile = fm.file(this.hash);
						rfile.url = this.url = data.url;
					}
				}.bind(file)));
			} else {
				file.url = fm.url(file.hash);
			}
			if (! opts.onlyURL) {
				if (opts.getPath) {
					file.path = fm.path(file.hash);
					if (file.path === '' && file.phash) {
						// get parents
						(function() {
							var dfd  = jQuery.Deferred();
							req.push(dfd);
							fm.path(file.hash, false, {})
								.done(function(path) {
									file.path = path;
								})
								.fail(function() {
									file.path = '';
								})
								.always(function() {
									dfd.resolve();
								});
						})();
					}
				}
				if (file.tmb && file.tmb != 1) {
					file.tmb = tmb + file.tmb;
				}
				if (!file.width && !file.height) {
					if (file.dim) {
						dim = file.dim.split('x');
						file.width = dim[0];
						file.height = dim[1];
					} else if (opts.getImgSize && file.mime.indexOf('image') !== -1) {
						req.push(fm.request({
							data : {cmd : 'dim', target : file.hash},
							notify : {type : 'dim', cnt : 1, hideCnt : true},
							preventDefault : true
						})
						.done(function(data) {
							if (data.dim) {
								var dim = data.dim.split('x');
								var rfile = fm.file(this.hash);
								rfile.width = this.width = dim[0];
								rfile.height = this.height = dim[1];
							}
						}.bind(file)));
					}
				}
			}
		}
		
		if (req.length) {
			jQuery.when.apply(null, req).always(function() {
				dfrd.resolve(result(files));
			});
			return dfrd;
		}
		
		return dfrd.resolve(result(files));
	};

}).prototype = { forceLoad : true }; // this is required command

SILENT KILLER Tool