source: sandbox/workflow/trunk/inc/common.inc.php @ 3060

Revision 3060, 2.6 KB checked in by viani, 14 years ago (diff)

Ticket #950 - Merged 2838:3056 /trunk/workflow em /sandbox/workflow/trunk

Line 
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 * 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
22 */
23define('EGW_SERVER_ROOT', dirname(dirname(dirname(__FILE__))));
24//define('EGW_SERVER_ROOT', $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']);
25
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 */
32define('EGW_INC_ROOT', EGW_SERVER_ROOT . '/phpgwapi/inc/');
33
34/**
35 * Workflow base path.
36 * @name WF_SERVER_ROOT
37 */
38define('WF_SERVER_ROOT', EGW_SERVER_ROOT.'/workflow/');
39
40/**
41 * Workflow include path.
42 * @name WF_INC_ROOT
43 */
44define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/');
45
46/**
47 * Workflow lib base dir.
48 * @name WF_LIB_ROOT
49 */
50define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/');
51
52
53if (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) */
59setlocale(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 */
63umask(007);
64
65
66/* including common classes */
67require_once WF_LIB_ROOT . 'security/Security.php';
68require_once WF_LIB_ROOT . 'factory/Factory.php';
69require_once WF_LIB_ROOT . 'factory/BaseFactory.php';
70require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php';
71require_once WF_LIB_ROOT . 'factory/ProcessFactory.php';
72require_once WF_INC_ROOT . 'common_functions.inc.php';
73?>
Note: See TracBrowser for help on using the repository browser.