11 include_once (
'FDL/Class.Doc.php');
12 include_once (
'FDL/Class.DocFam.php');
13 include_once (
'FDL/Class.DocVaultIndex.php');
14 include_once (
'VAULT/Class.VaultFile.php');
19 $usage->setDefinitionText(
"Re-initialize docvaultindex table");
21 $check = (
$usage->addEmptyParameter(
"dryrun",
"Check consistency only (non-destructive mode)") !==
false);
22 $csv =
$usage->addOptionalParameter(
"csv",
"Output details to CSV file (with comma delimiter [,], double-quote enclosure [\"], and backslash escape char [\\])", null,
false);
47 printf(
"[+] Summary:\n");
48 printf(
"New entries: %d\n",
$report[
'new'][
'count']);
49 printf(
"Missing entries: %d\n",
$report[
'missing'][
'count']);
55 if (($fh = fopen(
$outfile,
'w')) ===
false) {
56 throw new \Dcp\Exception(sprintf(
"Error opening CSV output file '%s' for writing!",
$outfile));
64 foreach (
$report[
'new'][
'iterator'] as $row) {
71 foreach (
$report[
'missing'][
'iterator'] as $row) {
79 catch(\Dcp\Exception $e) {
87 if ((
$ret = fputcsv($fh, $fields)) ===
false) {
88 throw new \Dcp\Exception(sprintf(
""));
Verify arguments for wsh programs.
report2csv($report, $outfile)