Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
fulltextReinit.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Reinit vault files
8  *
9  * @author Anakeen
10  * @version $Id: VaultIndexInit.php,v 1.4 2008/11/28 16:14:34 jerome Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ('FDL/Class.Doc.php');
18 include_once ('FDL/Class.DocFam.php');
19 include_once ('FDL/Class.DocVaultIndex.php');
20 include_once ('VAULT/Class.VaultFile.php');
21 
22 $usage = new ApiUsage();
23 
24 $usage->setDefinitionText("Reinit vault files");
25 
26 $usage->verify();
27 
28 global $action;
29 $dbaccess = $action->dbaccess;
30 if ($dbaccess == "") {
31  print "Database not found : action->dbaccess";
32  exit;
33 }
35 $q = new QueryDb($dbaccess, "DocAttr");
36 $q->AddQuery("type = 'file'");
37 $q->AddQuery("usefor != 'Q'");
38 $la = $q->Query(0, 0, "TABLE");
39 
40 foreach ($la as $k => $v) {
41  $docid = $v["docid"];
42  $aid = $v["id"];
43 
44  $sql = "update doc$docid set {$aid}_vec=null;";
45  print "$sql\n";
46  $o->exec_query($sql);
47  //print "$sql2\n";
48 
49 }
50 
51 $sql = "update doc set fulltext=null;";
52 print "$sql\n";
53 $o->exec_query($sql);
$docid
Definition: cleanFamily.php:13
$usage
foreach($la as $k=> $v) $sql
global $action
print
Definition: checklist.php:49
if($dbaccess=="") $o
switch($command) exit
Definition: checkVault.php:46
$dbaccess
Verify arguments for wsh programs.
← centre documentaire © anakeen