/** * Put file stat in cache and return it * * @param string $path file path * @param array $stat file stat * @return array * @author Dmitry (dio) Levashov **/ protected function updateCache($path, $stat) { $stat = parent::updateCache($path, $stat); if ($stat && $stat['mime'] !== 'directory') $stat['_localpath'] = str_replace(XOOPS_ROOT_PATH, 'R', realpath($this->options['filePath']) . DIRECTORY_SEPARATOR . str_replace($this->options['URL'], '', $stat['url']) ); return $this->cache[$path] = $stat; }
/** * Put file stat in cache and return it * * @param string $path file path * @param array $stat file stat * @return array * @author Dmitry (dio) Levashov **/ protected function updateCache($path, $stat) { $path = (int) $path; $stat = parent::updateCache($path, $stat); if ($stat && !isset($stat['locked'])) { $stat['locked'] = 0; } return $this->cache[$path] = $stat; }