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
migrEnum.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @package FDL
5
*/
6
/**
7
* Generate Php Document Classes
8
*
9
* @author Anakeen
10
* @version $Id: fdl_adoc.php,v 1.20 2008/10/30 17:34:31 eric Exp $
11
* @package FDL
12
* @subpackage
13
*/
14
/**
15
*/
16
// refreah for a classname
17
// use this only if you have changed title attributes
18
include_once (
"FDL/Class.DocEnum.php"
);
19
20
global
$action
;
21
$dbaccess
=
$action
->dbaccess;
22
if
(
$dbaccess
==
""
) {
23
print
"Database not found : param FREEDOM_DB"
;
24
exit
;
25
}
26
$usage
=
new
ApiUsage
();
27
$usage
->setDefinitionText(
"Migrate enum defined in docattr(phpfunc) to docenum"
);
28
$usage
->verify();
29
/*
30
* @var Action $action
31
*/
32
// First Part: Workflow
33
print
"\t === migrate Enum ===\n"
;
34
$sql
= sprintf(
"select id, docid, phpfunc from docattr where type ~ '^enum' and (phpfile is null or phpfile != '-')"
);
35
simpleQuery
(
$dbaccess
,
$sql
, $result);
36
37
$oe
=
new
DocEnum
(
$dbaccess
);
38
foreach
($result as $enumDef) {
39
printf(
"Doing %s [%s]\n"
, $enumDef[
"id"
], $enumDef[
"phpfunc"
]);
40
$err
=
importDocumentDescription::recordEnum
($enumDef[
"docid"
], $enumDef[
"id"
], $enumDef[
"phpfunc"
]);
41
42
if
(
$err
)
$action
->exitError(
$err
);
43
44
print
"\n"
;
45
}
46
print
"\n"
;
DocEnum
Definition:
Class.DocEnum.php:11
$usage
if($dbaccess=="") $usage
Definition:
migrEnum.php:26
$sql
$sql
Definition:
fixMultipleAliveRevision.php:21
$action
global $action
Definition:
migrEnum.php:18
importDocumentDescription\recordEnum
static recordEnum($famid, $attrid, $phpfunc, $reset=false)
Definition:
Class.ImportDescription.php:1875
$dbaccess
$dbaccess
Definition:
migrEnum.php:21
$oe
$oe
Definition:
migrEnum.php:37
print
print
Definition:
checklist.php:49
exit
switch($command) exit
Definition:
checkVault.php:46
simpleQuery
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
Definition:
Lib.Common.php:484
$err
if($file) if($subject==""&&$file) if($subject=="") $err
Definition:
fdl_sendmail.php:78
ApiUsage
Verify arguments for wsh programs.
Definition:
Class.ApiUsage.php:28
← centre documentaire
© anakeen