Core
3.2
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
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
27
$appl
=
new
Application
();
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
$table1
Definition:
updatetitles.php:42
$appl
$appl
Definition:
updatetitles.php:27
$dbaccess
$dbaccess
Definition:
updatetitles.php:30
$usage
$usage
Definition:
updatetitles.php:20
$famId
$famId
Definition:
updatetitles.php:24
print
print
Definition:
checklist.php:49
QueryDb
Definition:
Class.QueryDb.php:19
$className
$className
Definition:
updatetitles.php:23
exit
switch($command) exit
Definition:
checkVault.php:46
Application
Definition:
Class.Application.php:30
$query
if($dbaccess=="") $query
Definition:
updatetitles.php:36
ApiUsage
Verify arguments for wsh programs.
Definition:
Class.ApiUsage.php:28
$core
$core
Definition:
chgpasswd.php:33
← centre documentaire
© anakeen