Core  3.2
PHP API documentation
 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 
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";
if($dbaccess=="") $usage
Definition: migrEnum.php:26
global $action
Definition: migrEnum.php:18
static recordEnum($famid, $attrid, $phpfunc, $reset=false)
$dbaccess
Definition: migrEnum.php:21
$oe
Definition: migrEnum.php:37
print
Definition: checklist.php:49
switch($command) exit
Definition: checkVault.php:46
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
Definition: Lib.Common.php:484
if($file) if($subject==""&&$file) if($subject=="") $err
Verify arguments for wsh programs.
← centre documentaire © anakeen