[795] | 1 | <?php |
---|
[2222] | 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 | /** |
---|
[2223] | 14 | * Server base path. This constant is somewhat simililar to |
---|
| 15 | * 'PHPGW_SERVER_ROOT'. Nevertheless, there are cases that we |
---|
| 16 | * access Workflow directly and it must be defined somewhere. |
---|
| 17 | * @name EGW_SERVER_ROOT |
---|
[2222] | 18 | */ |
---|
[2233] | 19 | define('EGW_SERVER_ROOT', $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']); |
---|
[2222] | 20 | |
---|
| 21 | /** |
---|
[2233] | 22 | * Server include base path. We must define our own constants |
---|
| 23 | * because there are several cases in which workflow is called |
---|
| 24 | * directly, thus PHPGW constants are not defined. |
---|
| 25 | * @name EGW_INC_ROOT |
---|
| 26 | */ |
---|
| 27 | define('EGW_INC_ROOT', EGW_SERVER_ROOT . '/phpgwapi/inc/'); |
---|
| 28 | |
---|
| 29 | /** |
---|
[2222] | 30 | * Workflow base path. |
---|
| 31 | * @name WF_SERVER_ROOT |
---|
| 32 | */ |
---|
[2223] | 33 | define('WF_SERVER_ROOT', EGW_SERVER_ROOT.'/workflow/'); |
---|
[2222] | 34 | |
---|
| 35 | /** |
---|
| 36 | * Workflow include path. |
---|
| 37 | * @name WF_INC_ROOT |
---|
| 38 | */ |
---|
| 39 | define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/'); |
---|
| 40 | |
---|
| 41 | /** |
---|
| 42 | * Workflow lib base dir. |
---|
| 43 | * @name WF_LIB_ROOT |
---|
| 44 | */ |
---|
| 45 | define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/'); |
---|
| 46 | |
---|
| 47 | |
---|
[2223] | 48 | if (file_exists(EGW_SERVER_ROOT . '/header.session.inc.php')) { |
---|
| 49 | require_once EGW_SERVER_ROOT . '/header.session.inc.php'; |
---|
[1484] | 50 | } |
---|
[1468] | 51 | |
---|
[2222] | 52 | |
---|
| 53 | /* assure that the correct encondig will be used (e.g string functions) */ |
---|
[795] | 54 | setlocale(LC_CTYPE, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8'); |
---|
| 55 | |
---|
[2206] | 56 | |
---|
[795] | 57 | /* define o umask para a criação de arquivos por parte do Workflow */ |
---|
| 58 | umask(007); |
---|
| 59 | |
---|
| 60 | |
---|
[2222] | 61 | /* including common classes */ |
---|
| 62 | require_once WF_LIB_ROOT . 'security/Security.php'; |
---|
[2223] | 63 | require_once WF_LIB_ROOT . 'factory/Factory.php'; |
---|
[2222] | 64 | require_once WF_LIB_ROOT . 'factory/BaseFactory.php'; |
---|
| 65 | require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php'; |
---|
| 66 | require_once WF_LIB_ROOT . 'factory/ProcessFactory.php'; |
---|
[795] | 67 | |
---|
[2223] | 68 | $GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects'); |
---|
[795] | 69 | ?> |
---|