| 1 | <?php |
||
| 18 | trait PathManipulation { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns a shortened path for the gallery view |
||
| 22 | * |
||
| 23 | * We only want to keep one folder between the current folder and the found media file |
||
| 24 | * /root/folder/sub1/sub2/file.ext |
||
| 25 | * becomes |
||
| 26 | * /root/folder/file.ext |
||
| 27 | * |
||
| 28 | * @param string $path the full path to a file, which never starts with a slash |
||
| 29 | * @param string $currFolderPath the current folder, which never starts with a slash |
||
| 30 | * |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | 16 | private function getReducedPath($path, $currFolderPath) { |
|
| 52 | |||
| 53 | } |
||
| 54 |