| @@ 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 |
|
| @@ 315-326 (lines=12) @@ | ||
| 312 | * @return string |
|
| 313 | * @author Dmitry (dio) Levashov |
|
| 314 | **/ |
|
| 315 | protected function _relpath($path) { |
|
| 316 | if ($path === $this->root) { |
|
| 317 | return ''; |
|
| 318 | } else { |
|
| 319 | if (strpos($path, $this->root) === 0) { |
|
| 320 | return ltrim(substr($path, strlen($this->root)), DIRECTORY_SEPARATOR); |
|
| 321 | } else { |
|
| 322 | // for link |
|
| 323 | return $path; |
|
| 324 | } |
|
| 325 | } |
|
| 326 | } |
|
| 327 | ||
| 328 | /** |
|
| 329 | * Convert path related to root dir into real path |
|