Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
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
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Generated Header (not documented yet)
9
*
10
* @author Anakeen 2000
11
* @version $Id: updatetitles.php,v 1.4 2003/08/18 15:47:04 eric 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
// update title for a classname
19
// use this only if you have changed title attributes
20
include_once (
"FDL/Class.Doc.php"
);
21
22
$className
=
GetHttpVars
(
"class"
,
"-"
);
// classname filter
23
$famId
=
GetHttpVars
(
"famid"
, 0);
// familly filter
24
if
((
$className
==
"-"
) && (
$famId
== 0)) {
25
print
"arg class needed :usage --class=<class name> --famid=<familly id>"
;
26
return
;
27
}
28
29
$famId
=
GetHttpVars
(
"famid"
, 0);
// output file
30
$appl
=
new
Application
();
31
$appl
->Set(
"FDL"
,
$core
);
32
33
$dbaccess
=
$appl
->GetParam(
"FREEDOM_DB"
);
34
if
(
$dbaccess
==
""
) {
35
print
"Database not found : param FREEDOM_DB"
;
36
exit
;
37
}
38
39
$query
=
new
QueryDb
(
$dbaccess
,
"Doc"
);
40
$query
->AddQuery(
"locked != -1"
);
41
42
if
(
$className
!=
"-"
)
$query
->AddQuery(
"classname ~* '$className'"
);
43
if
(
$famId
> 0)
$query
->AddQuery(
"fromid = $famId"
);
44
45
$table1
=
$query
->Query();
46
47
if
(
$query
->nb > 0) {
48
while
(list($k, $v) = each(
$table1
)) {
49
print $v->title .
"-"
;
50
$v->refreshTitle();
51
$v->Modify();
52
print $v->title .
"\n"
;
53
}
54
}
55
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase