Example #1
0
 }
 $pos = array_search("-parallel", $_SERVER['argv']);
 if ($pos) {
     if ($source_param) {
         throw new ADEIException(translate("The source can't be specified in the parallel mode"));
     }
     unset($_SERVER['argv'][$pos]);
     $partype = "sources";
     if ($pos + 1 < $params && substr($_SERVER['argv'][$pos + 1], 0, 1) != "-") {
         $partype = $_SERVER['argv'][$pos + 1];
         unset($_SERVER['argv'][$pos + 1]);
     }
     $req = new REQUEST();
     switch ($partype) {
         case "servers":
             $list = $req->GetServerList();
             break;
         case "sources":
             $list = $req->GetSourceList($list_flags);
             break;
         case "groups":
             $list = $req->GetGroupList($list_flags);
             break;
         default:
             throw new ADEIException(translate("Unsupported type of parallelization (%s)", $partype));
     }
     $params = implode(" ", $_SERVER['argv']);
     chdir($curdir);
     $procs = array();
     foreach ($list as $item) {
         $source = "db_server={$item['db_server']}";
Example #2
0
    $flags |= REQUEST::LIST_COMPLEX;
}
if ($_GET['list_custom']) {
    $flags |= REQUEST::LIST_CUSTOM;
}
if ($_GET['skip_uncached']) {
    $flags |= REQUEST::SKIP_UNCACHED;
}
if ($_GET['info']) {
    $flags |= REQUEST::NEED_INFO | REQUEST::NEED_AXISINFO;
}
try {
    switch ($_GET['target']) {
        case 'servers':
            $req = new REQUEST($_GET);
            $list = $req->GetServerList($flags);
            if (!count($list)) {
                $error = translate("No server is configured");
            }
            /*
            	    if ($menu) {
            		$list["-1"] = array(
            		    "id" => "-1",
            		    "name" => translate("Custom")
            		);
            	    }
            */
            $mode = SOURCE_MODE;
            break;
        case 'databases':
            $req = new SERVERRequest($_GET);