35 include_once (
"FDL/Class.SearchDoc.php");
40 $s->setObjectReturn();
42 if (ini_get(
"max_execution_time") < 3600) ini_set(
"max_execution_time", 3600);
43 while (
$doc =
$s->nextDoc()) {
44 $doc->disableEditControl();
46 $doc->enableEditControl();
50 $err = $this->setValue(
"arc_status",
"C");
51 $err = $this->setValue(
"arc_clotdate", $this->
getDate());
53 $this->addComment(sprintf(_(
"Close archive")));
62 $err = $this->setValue(
"arc_status",
"O");
63 $err = $this->deleteValue(
"arc_clotdate");
66 include_once (
"FDL/Class.SearchDoc.php");
69 $s->addFilter(
"archiveid=%d", $this->
id);
71 $s->setObjectReturn();
73 if (ini_get(
"max_execution_time") < 3600) ini_set(
"max_execution_time", 3600);
74 while (
$doc =
$s->nextDoc()) {
75 $doc->disableEditControl();
77 $doc->enableEditControl();
80 $this->addComment(sprintf(_(
"Reopen archive")));
89 $err = $this->setValue(
"arc_status",
"P");
90 $err = $this->setValue(
"arc_purgedate", $this->
getDate());
93 include_once (
"FDL/Class.SearchDoc.php");
96 $s->addFilter(
"archiveid=%d", $this->
id);
98 $s->setObjectReturn();
100 if (ini_get(
"max_execution_time") < 3600) ini_set(
"max_execution_time", 3600);
102 while (
$doc =
$s->nextDoc()) {
103 if (
$doc->doctype !=
'C') {
104 $t.= sprintf(
'<li><a href="?app=FDL&action=VIEWDESTROYDOC&id=%d">%s</a></li> ',
$doc->id,
$doc->title);
105 $doc->disableEditControl();
106 $doc->addComment(sprintf(_(
"destroyed by archive purge from %s") , $this->
getTitle()));
108 $doc->enableEditControl();
112 $err = $this->setValue(
"arc_purgemanif",
$t);
115 $this->addComment(sprintf(_(
"Purge archive")));
121 $err = parent::postModify();
128 if ($this->
getValue(
"arc_status") !=
"O") {
129 return _(
"archieve status must be open to modify content");
134 if ($this->
getValue(
"arc_status") !=
"O") {
135 return _(
"archieve status must be open to modify content");
144 if ($this->
getValue(
"arc_status") ==
"C") {
146 sprintf(
"archiveid=%d", $this->
id)
156 $prfid = $this->
getValue(
"arc_profil");
158 $prf = new_doc($this->dbaccess, $prfid);
159 if (!$prf->isAlive()) $prfid = 0;
161 $prf->setValue(
"ba_title", sprintf(_(
"Profil for document's archive %s") , $this->
getTitle()));
167 $prf =
createDoc($this->dbaccess,
"PDIR",
false);
168 $prf->setValue(
"ba_title", sprintf(_(
"Profil for document's archive %s") , $this->
getTitle()));
171 $err = $this->setValue(
"arc_profil", $prf->id);