Change file path

This commit is contained in:
nemunaire 2014-01-20 16:52:44 +01:00
commit ebb0cabf9a
3 changed files with 8 additions and 7 deletions

View file

@ -37,8 +37,9 @@ class Exercice
foreach($this->files as &$f)
{
$f["path_orig"] = $f["path"];
$f["path_hash"] = hash("sha384", $f["path"])."/".basename($f["path"]);
if (isset($VAR["files_dir"]))
$f["path"] = $VAR["files_dir"].$f["path"];
$f["path"] = $VAR["files_dir"].$f["path_hash"];
$f["basename"] = basename($f["path"]);
$f["sha1"] = strhex($f["sha1"]);
}