Ejemplo n.º 1
0
function getPackages($session_ser, $group_id)
{
    continue_session($session_ser);
    $grp =& group_get_object($group_id);
    if (!$grp || !is_object($grp)) {
        return new soap_fault('', 'getPackages', 'Could Not Get Group', 'Could Not Get Group');
    } elseif ($grp->isError()) {
        return new soap_fault('', 'getPackages', $grp->getErrorMessage(), $grp->getErrorMessage());
    }
    $pkg_arr = get_frs_packages($grp);
    return packages_to_soap($pkg_arr);
}
Ejemplo n.º 2
0
    //echo "SUCCESS\n";
    exit(0);
}
$id = db_result($res, 0, 0);
session_set_new($id);
$res = db_query("SELECT group_id FROM groups WHERE status != 'P'");
$groups =& group_get_objects(util_result_column_to_array($res));
for ($g = 0; $g < count($groups); $g++) {
    //make group dirs
    $newdirlocation = $GLOBALS['sys_upload_dir'] . '/' . $groups[$g]->getUnixName();
    $cmd = "/bin/mkdir {$newdirlocation}";
    //echo "\n$cmd";
    if (!is_dir($newdirlocation)) {
        exec($cmd, $out);
    }
    $frsps =& get_frs_packages($groups[$g]);
    //echo count($frsps);
    for ($p = 0; $p < count($frsps); $p++) {
        if (!is_object($frsps[$p])) {
            continue;
        }
        //make package dirs
        $newdirlocation = $GLOBALS['sys_upload_dir'] . '/' . $frsps[$p]->Group->getUnixName() . '/' . $frsps[$p]->getFileName();
        $cmd = "/bin/mkdir {$newdirlocation}";
        //echo "\n$cmd";
        if (!is_dir($newdirlocation)) {
            exec($cmd, $out);
        }
        $frsrs =& $frsps[$p]->getReleases();
        for ($r = 0; $r < count($frsrs); $r++) {
            if (!is_object($frsrs[$r])) {