Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
updatetitles.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Generated Header (not documented yet)
8  *
9  * @author Anakeen
10  * @version $Id: updatetitles.php,v 1.4 2003/08/18 15:47:04 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 // update title for a classname
17 // use this only if you have changed title attributes
18 include_once ("FDL/Class.Doc.php");
19 
20 $usage = new ApiUsage();
21 
22 $usage->setDefinitionText("Update titles");
23 $className = $usage->addRequiredParameter("class", "classname filter"); // classname filter
24 $famId = $usage->addRequiredParameter("famid", "family filter"); // familly filter
25 $usage->verify();
26 
28 $appl->Set("FDL", $core);
29 
30 $dbaccess = $appl->dbaccess;
31 if ($dbaccess == "") {
32  print "Database not found : appl->dbaccess";
33  exit;
34 }
35 
36 $query = new QueryDb($dbaccess, "Doc");
37 $query->AddQuery("locked != -1");
38 
39 if ($className != "-") $query->AddQuery("classname ~* '$className'");
40 if ($famId > 0) $query->AddQuery("fromid = $famId");
41 
42 $table1 = $query->Query();
43 
44 if ($query->nb > 0) {
45  foreach ($table1 as $k => $v) {
46  /*
47  * @var Doc $v
48  */
49  print $v->title . "-";
50  $v->refreshTitle();
51  $v->Modify();
52  print $v->title . "\n";
53  }
54 }
$table1
$appl
$dbaccess
$usage
$famId
print
Definition: checklist.php:49
$className
switch($command) exit
Definition: checkVault.php:46
if($dbaccess=="") $query
Verify arguments for wsh programs.
$core
Definition: chgpasswd.php:33
← centre documentaire © anakeen