18 include_once (
"FDL/Lib.Attr.php");
19 include_once (
"FDL/Class.DocFam.php");
26 print "Database not found : appl->dbaccess";
30 $usage->setDefinitionText(
"Migrate old Acls for workflow and CV to extended acls");
36 print "\t === migrate workflows ===\n";
38 $s->setObjectReturn(
true);
43 while ($wdoc =
$s->getNextDoc()) {
44 print (
"\n" . $wdoc->getTitle() .
" : #" . $wdoc->id);
45 $tr = $wdoc->transitions;
50 foreach ($tr as $k => $trans) {
51 $wdoc->dacls[$k] = array(
53 "description" => _($k)
58 $sql = sprintf(
"select * from docperm where docid=%d", $wdoc->id);
60 foreach ($tr as
$tid => $v) {
64 foreach ($acls as $aAcl) {
65 if ($wdoc->controlUp($aAcl[
"upacl"],
$tid) ==
"") {
67 $wdoc->addControl($aAcl[
"userid"],
$tid);
75 print "\n\t === migrate view controller === \n";
77 $s->setObjectReturn(
true);
82 while ($cvdoc =
$s->getNextDoc()) {
83 print (
"\n" . $cvdoc->getTitle() .
" : #" . $cvdoc->id);
86 $ti = $cvdoc->getMultipleRawValues(
"CV_IDVIEW");
87 $tl = $cvdoc->getMultipleRawValues(
"CV_LVIEW");
90 foreach ($ti as $k => $v) {
91 if ($ti[$k] ==
"") $cvk =
"CV$k";
93 $cvdoc->dacls[$cvk] = array(
95 "description" => $tl[$k]
97 $cvdoc->acls[] = $cvk;
101 $sql = sprintf(
"select * from docperm where docid=%d", $cvdoc->id);
103 foreach ($ti as $k =>
$tid) {
107 foreach ($acls as $aAcl) {
108 if ($cvdoc->controlUp($aAcl[
"upacl"],
$tid) ==
"") {
110 $err = $cvdoc->addControl($aAcl[
"userid"],
$tid);
static getDisplayName($uid)
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
if($file) if($subject==""&&$file) if($subject=="") $err
Verify arguments for wsh programs.