/** * Check path to be inside the files catalog repository. {lc_catalog}/files * Return full path that inside the repository. * If path is out the one then returns the catalog repository path. * * @return string */ public static function getNormalizedPath($path) { $filesCatalog = \XLite\View\BrowseServer::getFilesCatalog(); $path = \Includes\Utils\FileManager::getRealPath($filesCatalog . LC_DS . $path); return $filesCatalog !== substr($path, 0, strlen($filesCatalog)) ? $filesCatalog : $path; }