1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * eGroupWare * |
---|
4 | * http://www.egroupware.org * |
---|
5 | * -------------------------------------------- * |
---|
6 | * This program is free software; you can redistribute it and/or modify it * |
---|
7 | * under the terms of the GNU General Public License as published by the * |
---|
8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
9 | * option) any later version. * |
---|
10 | \**************************************************************************/ |
---|
11 | |
---|
12 | |
---|
13 | /** |
---|
14 | * Server base path. This constant must be defined by expresso itself. |
---|
15 | * Anyway, there are cases that we access Workflow directly; therefore |
---|
16 | * it must be defined somewhere... |
---|
17 | * @name PHPGW_SERVER_ROOT |
---|
18 | */ |
---|
19 | if (!defined('PHPGW_SERVER_ROOT')) |
---|
20 | define('PHPGW_SERVER_ROOT', $HTTP_SERVER_VARS['DOCUMENT_ROOT']); |
---|
21 | |
---|
22 | /** |
---|
23 | * Workflow base path. |
---|
24 | * @name WF_SERVER_ROOT |
---|
25 | */ |
---|
26 | define('WF_SERVER_ROOT', PHPGW_SERVER_ROOT.'/workflow/'); |
---|
27 | |
---|
28 | /** |
---|
29 | * Workflow include path. |
---|
30 | * @name WF_INC_ROOT |
---|
31 | */ |
---|
32 | define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/'); |
---|
33 | |
---|
34 | /** |
---|
35 | * Workflow lib base dir. |
---|
36 | * @name WF_LIB_ROOT |
---|
37 | */ |
---|
38 | define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/'); |
---|
39 | |
---|
40 | |
---|
41 | if (file_exists(PHPGW_SERVER_ROOT . '/header.session.inc.php')) { |
---|
42 | require_once PHPGW_SERVER_ROOT . '/header.session.inc.php'; |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | /* assure that the correct encondig will be used (e.g string functions) */ |
---|
47 | setlocale(LC_CTYPE, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8'); |
---|
48 | |
---|
49 | |
---|
50 | /* define o umask para a criação de arquivos por parte do Workflow */ |
---|
51 | umask(007); |
---|
52 | |
---|
53 | |
---|
54 | /* including common classes */ |
---|
55 | require_once WF_LIB_ROOT . 'security/Security.php'; |
---|
56 | //require_once WF_LIB_ROOT . 'factory/Factory.php'; |
---|
57 | require_once WF_LIB_ROOT . 'factory/BaseFactory.php'; |
---|
58 | require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php'; |
---|
59 | require_once WF_LIB_ROOT . 'factory/ProcessFactory.php'; |
---|
60 | |
---|
61 | |
---|
62 | /* TODO - here we will still using that old and ugly factory */ |
---|
63 | /* in a near future we should do things right.. */ |
---|
64 | require_once WF_INC_ROOT . 'class.factory.inc.php'; |
---|
65 | $GLOBALS['workflow']['factory'] = new Factory(); |
---|
66 | $GLOBALS['workflow']['workflowObjects'] = $GLOBALS['workflow']['factory']->newInstance('WorkflowObjects'); |
---|
67 | |
---|
68 | //$GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects', 'asd', 123); |
---|
69 | ?> |
---|