Code Duplication    Length = 12-12 lines in 2 locations

php/elFinderVolumeFTP.class.php 1 location

@@ 587-598 (lines=12) @@
584
	 * @return string
585
	 * @author Dmitry (dio) Levashov
586
	 **/
587
	protected function _relpath($path) {
588
		if ($path === $this->root) {
589
			return '';
590
		} else {
591
			if (strpos($path, $this->root) === 0) {
592
				return ltrim(substr($path, strlen($this->root)), $this->separator);
593
			} else {
594
				// for link
595
				return $path;
596
			}
597
		}
598
	}
599
	
600
	/**
601
	 * Convert path related to root dir into real path

php/elFinderVolumeLocalFileSystem.class.php 1 location

@@ 338-349 (lines=12) @@
335
	 * @return string
336
	 * @author Dmitry (dio) Levashov
337
	 **/
338
	protected function _relpath($path) {
339
		if ($path === $this->root) {
340
			return '';
341
		} else {
342
			if (strpos($path, $this->root) === 0) {
343
				return ltrim(substr($path, strlen($this->root)), DIRECTORY_SEPARATOR);
344
			} else {
345
				// for link
346
				return $path;
347
			}
348
		}
349
	}
350
	
351
	/**
352
	 * Convert path related to root dir into real path