|
|
@ -231,6 +231,8 @@ function lister_paquets($src) { |
|
|
|
// 1 : logo cree (fichier)
|
|
|
|
// 2 : xml recopie (fichier)
|
|
|
|
function creer_paquet($paquet, $dir_repo, $dir_paq, $dir_tmp, $nom_vcs, $dtd_prio, $dirs_changed=null) { |
|
|
|
static $cache_version = '1.0'; |
|
|
|
|
|
|
|
// Verifier le repertoire source du paquet a creer
|
|
|
|
$dsource = $dir_repo. $paquet['source']; |
|
|
|
if (!file_exists($dsource)){ |
|
|
@ -255,11 +257,13 @@ function creer_paquet($paquet, $dir_repo, $dir_paq, $dir_tmp, $nom_vcs, $dtd_pri |
|
|
|
} |
|
|
|
|
|
|
|
if (!$changed |
|
|
|
AND file_exists($zippath) |
|
|
|
AND file_exists($cache) |
|
|
|
AND $res = file_get_contents($cache) |
|
|
|
AND $res = unserialize($res) |
|
|
|
AND $res[0][2] == $paquet['source'] |
|
|
|
and file_exists($zippath) |
|
|
|
and file_exists($cache) |
|
|
|
and $c = file_get_contents($cache) |
|
|
|
and $c = unserialize($c) |
|
|
|
and reset($c) === $cache_version |
|
|
|
and $res = end($c) |
|
|
|
and $res[0][2] == $paquet['source'] |
|
|
|
) { |
|
|
|
|
|
|
|
// rien a faire
|
|
|
@ -362,7 +366,7 @@ function creer_paquet($paquet, $dir_repo, $dir_paq, $dir_tmp, $nom_vcs, $dtd_pri |
|
|
|
$logo, |
|
|
|
$xml); |
|
|
|
|
|
|
|
file_put_contents($cache,serialize($res)); |
|
|
|
file_put_contents($cache,serialize([$cache_version, $res])); |
|
|
|
} |
|
|
|
|
|
|
|
return $res; |
|
|
|