vendor/assets/elfinder_OLD/js/elfinder.full.js
function(dir, update) {
		var self = this,
			prev = update? dir : (self.file(dir.hash) || dir),
			prevTs = prev.ts,
			change = false;
		// backup original stats
		if (update || !dir._realStats) {
			dir._realStats = {
				locked: dir.locked || 0,
				dirs: dir.dirs || 0,
				ts: dir.ts
			};
		}
		// set lock
		dir.locked = 1;
		if (!prev.locked) {
			change = true;
		}
		// has leaf root to `dirs: 1`
		dir.dirs = 1;
		if (!prev.dirs) {
			change = true;
		}
		// set ts
		$.each(self.leafRoots[dir.hash], function() {
			var f = self.file(this);
			if (f && f.ts && (dir.ts || 0) < f.ts) {
				dir.ts = f.ts;
			}
		});
		if (prevTs !== dir.ts) {
			change = true;
		}

		return change;
	}
function(dir, update) {
		var self = this,
			prev = update? dir : (self.file(dir.hash) || dir),
			prevTs = prev.ts,
			change = false;
		// backup original stats
		if (update || !dir._realStats) {
			dir._realStats = {
				locked: dir.locked || 0,
				dirs: dir.dirs || 0,
				ts: dir.ts
			};
		}
		// set lock
		dir.locked = 1;
		if (!prev.locked) {
			change = true;
		}
		// has leaf root to `dirs: 1`
		dir.dirs = 1;
		if (!prev.dirs) {
			change = true;
		}
		// set ts
		$.each(self.leafRoots[dir.hash], function() {
			var f = self.file(this);
			if (f && f.ts && (dir.ts || 0) < f.ts) {
				dir.ts = f.ts;
			}
		});
		if (prevTs !== dir.ts) {
			change = true;
		}

		return change;
	}
function ( dir , update ) { var self = this , prev = update ? dir : ( self . file ( dir . hash ) || dir ) , prevTs = prev . ts , change = false ; // backup original stats if ( update || ! dir . _realStats ) { dir . _realStats = { locked : dir . locked || 0 , dirs : dir . dirs || 0 , ts : dir . ts } ; } // set lock dir . locked = 1 ; if ( ! prev . locked ) { change = true ; } // has leaf root to `dirs: 1` dir . dirs = 1 ; if ( ! prev . dirs ) { change = true ; } // set ts $ . each ( self . leafRoots [ dir . hash ] , function ( ) { var f = self . file ( this ) ; if ( f && f . ts && ( dir . ts || 0 ) < f . ts ) { dir . ts = f . ts ; } } ) ; if ( prevTs !== dir . ts ) { change = true ; } return change ; }
Apply leaf root stats to target directory

@param      object     dir     object of target directory
@param      boolean    update  is force update

@return     boolean    dir object was chenged
Apply leaf root stats to target directory