private function importDump(Project $project, $folder_id)
 {
     $xml_import = new XMLDocmanImport('import:', $project->getUnixNameLowerCase(), $project->getID(), $this->wsdl_url, $this->user_login, $this->user_password, false, false, '', true, false);
     $xml_import->importPath($this->temporary_directory, $folder_id, '/' . DocmanV1_XMLExportData::ROOT_FOLDER_NAME);
 }
Exemple #2
0
        shell_exec('stty echo');
    } else {
        $password = fgets(STDIN);
    }
    $password = substr($password, 0, strlen($password) - 1);
    echo PHP_EOL;
}
$start = microtime(true);
// WSDL URL
$wsdl = "{$url}/soap/codendi.wsdl.php?wsdl";
// Command line (for printing in log file)
$command = implode(' ', $argv);
if ($update || $continue) {
    // Connect
    $xmlUpdate = new XMLDocmanUpdate($command, $project, $projectId, $wsdl, $login, $password, $force, $reorder, $importMessageMetadata, $autoRetry, $log);
    // Update
    if ($update) {
        $xmlUpdate->updatePath($archive, $folderId, $path);
    } else {
        if ($continue) {
            $xmlUpdate->continuePath($archive, $folderId, $path);
        }
    }
} else {
    // Connect
    $xmlImport = new XMLDocmanImport($command, $project, $projectId, $wsdl, $login, $password, $force, $reorder, $importMessageMetadata, $autoRetry, $log);
    // Import
    $xmlImport->importPath($archive, $folderId, $path);
}
$end = microtime(true);
echo "Time elapsed: " . round($end - $start, 1) . "s" . PHP_EOL;