file_exists($path)){ $fileNum += 1; $path = preg_replace('/(\.|' . $prepend . '\(\d+\)\.)([^.]*)$/', $prepend . '(' . $fileNum . ').$2', $path); }; return $path; } public static function getArrayValueByKey($array, $key, $default=''){ if (array_key_exists($key, $array)){ return $array[$key]; } return $default; } public static function isVersionsEnabled(){ return \OCP\App::isEnabled('files_versions'); } }