[795] | 1 | <?php |
---|
[2372] | 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 | \**************************************************************************/ |
---|
[1468] | 11 | |
---|
[2372] | 12 | /** |
---|
| 13 | * Server base path. This constant is somewhat simililar to |
---|
| 14 | * 'PHPGW_SERVER_ROOT'. Nevertheless, there are cases that we |
---|
| 15 | * access Workflow directly and it must be defined somewhere. |
---|
| 16 | * Recently discovered, when we are runnnig jobs HTTP_SERVER_VARS |
---|
| 17 | * exported by apache are not available. |
---|
| 18 | * Therefore, we are using this workaround here, setting |
---|
| 19 | * EGW_SERVER_ROOT based on the location of this file. This constant |
---|
| 20 | * should be updated properly every time we move this file. |
---|
| 21 | * @name EGW_SERVER_ROOT |
---|
[795] | 22 | */ |
---|
[2372] | 23 | define('EGW_SERVER_ROOT', dirname(dirname(dirname(__FILE__)))); |
---|
| 24 | //define('EGW_SERVER_ROOT', $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']); |
---|
[795] | 25 | |
---|
[2372] | 26 | /** |
---|
| 27 | * Server include base path. We must define our own constants |
---|
| 28 | * because there are several cases in which workflow is called |
---|
| 29 | * directly, thus PHPGW constants are not defined. |
---|
| 30 | * @name EGW_INC_ROOT |
---|
| 31 | */ |
---|
| 32 | define('EGW_INC_ROOT', EGW_SERVER_ROOT . '/phpgwapi/inc/'); |
---|
[795] | 33 | |
---|
[2372] | 34 | /** |
---|
| 35 | * Workflow base path. |
---|
| 36 | * @name WF_SERVER_ROOT |
---|
| 37 | */ |
---|
| 38 | define('WF_SERVER_ROOT', EGW_SERVER_ROOT.'/workflow/'); |
---|
[795] | 39 | |
---|
| 40 | /** |
---|
[2372] | 41 | * Workflow include path. |
---|
| 42 | * @name WF_INC_ROOT |
---|
[795] | 43 | */ |
---|
[2372] | 44 | define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/'); |
---|
[795] | 45 | |
---|
| 46 | /** |
---|
[2372] | 47 | * Workflow lib base dir. |
---|
| 48 | * @name WF_LIB_ROOT |
---|
[795] | 49 | */ |
---|
[2372] | 50 | define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/'); |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | if (file_exists(EGW_SERVER_ROOT . '/header.session.inc.php')) { |
---|
| 54 | require_once EGW_SERVER_ROOT . '/header.session.inc.php'; |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | /* assure that the correct encondig will be used (e.g string functions) */ |
---|
| 59 | setlocale(LC_CTYPE, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8'); |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | /* define o umask para a criação de arquivos por parte do Workflow */ |
---|
| 63 | umask(007); |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | /* including common classes */ |
---|
| 67 | require_once WF_LIB_ROOT . 'security/Security.php'; |
---|
| 68 | require_once WF_LIB_ROOT . 'factory/Factory.php'; |
---|
| 69 | require_once WF_LIB_ROOT . 'factory/BaseFactory.php'; |
---|
| 70 | require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php'; |
---|
| 71 | require_once WF_LIB_ROOT . 'factory/ProcessFactory.php'; |
---|
[3060] | 72 | require_once WF_INC_ROOT . 'common_functions.inc.php'; |
---|
[795] | 73 | ?> |
---|