Platform  3.1
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  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Reinit vault files
9  *
10  * @author Anakeen 2004
11  * @version $Id: VaultIndexInit.php,v 1.4 2008/11/28 16:14:34 jerome Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage
15  */
16 /**
17  */
18 ini_set("max_execution_time", "36000");
19 
20 include_once ('FDL/Class.Doc.php');
21 include_once ('FDL/Class.DocFam.php');
22 include_once ('FDL/Class.DocVaultIndex.php');
23 include_once ('VAULT/Class.VaultFile.php');
24 
25 $dbaccess = GetParam("FREEDOM_DB");
26 if ($dbaccess == "") {
27  print "Database not found : param FREEDOM_DB";
28  exit;
29 }
31 $q = new QueryDb($dbaccess, "DocAttr");
32 $q->AddQuery("type = 'file'");
33 $q->AddQuery("usefor != 'Q'");
34 $la = $q->Query(0, 0, "TABLE");
35 
36 foreach ($la as $k => $v) {
37  $docid = $v["docid"];
38  $aid = $v["id"];
39 
40  $sql = "update doc$docid set {$aid}_vec=null;";
41  print "$sql\n";
42  $o->exec_query($sql);
43  //print "$sql2\n";
44 
45 }
46 
47 $sql = "update doc set fulltext=null;";
48 print "$sql\n";
49 $o->exec_query($sql);
50 ?>
← centre documentaire © anakeen - published under CC License - Dynacase