Esempio n. 1
0
function GetNightVersions($returnarray = 0)
{
    $f = new Fichiers();
    $h = $f->DirListTable('/home/www/445063d0c9bf877fb052052271f883f2/web/nightbuilds', true);
    if (is_array($h)) {
        while (list($num, $val) = each($h)) {
            if (preg_match('#artica-([0-9\\.]+)\\.tgz#i', $val, $r)) {
                if (strpos($r[1], '.') > 0) {
                    $key = $r[1];
                    $key = str_replace('.', '', $key);
                    $arr[$key] = $r[1];
                }
            }
        }
    }
    ksort($arr);
    while (list($num, $val) = each($arr)) {
        $v[] = $val;
    }
    if ($returnarray == 1) {
        return $v;
    }
    return $v[count($v) - 1];
}