18 include_once (
"FDL/Lib.Attr.php");
19 include_once (
"FDL/Class.DocFam.php");
26 print "Database not found : appl->dbaccess";
30 $usage->setDefinitionText(
"Delete parameter values which are not real parameters");
37 print "\t === Deleting parasite parameters ===\n";
40 $s->setObjectReturn(
true);
46 while ($fam =
$s->getNextDoc()) {
47 print (
"\n" . $fam->getTitle() .
" : #" . $fam->id);
48 $pa = $fam->getOwnParams();
50 $before = $fam->param;
51 foreach ($pa as $aid => $val) {
52 $oa = $fam->getAttribute($aid);
55 $fam->setParam($aid,
'',
false);
57 if ($oa->usefor !=
'Q') {
59 $fam->setParam($aid,
'',
false);
62 $sql = sprintf(
"select id from docattr where (id='%s' or id=':%s') and docid=%d", $oa->id, $oa->id, $oa->docid);
66 $fam->setParam($aid,
'',
false);
72 if ($before != $after) {
73 printf(
"Change from \n\t%s to \n\t%s", $before, $after);
75 $err = $fam->modify();
80 }
else print ": clean - nothing to do";
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
if($file) if($subject==""&&$file) if($subject=="") $err
Verify arguments for wsh programs.