source: sandbox/workflow/branches/609/inc/common.inc.php @ 2233

Revision 2233, 2.3 KB checked in by pedroerp, 14 years ago (diff)

Ticket #609 - Migração das classes do módulo workflow para a nova factory.

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/**
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
18 */
19define('EGW_SERVER_ROOT', $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']);
20
21/**
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 */
27define('EGW_INC_ROOT', EGW_SERVER_ROOT . '/phpgwapi/inc/');
28
29/**
30 * Workflow base path.
31 * @name WF_SERVER_ROOT
32 */
33define('WF_SERVER_ROOT', EGW_SERVER_ROOT.'/workflow/');
34
35/**
36 * Workflow include path.
37 * @name WF_INC_ROOT
38 */
39define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/');
40
41/**
42 * Workflow lib base dir.
43 * @name WF_LIB_ROOT
44 */
45define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/');
46
47
48if (file_exists(EGW_SERVER_ROOT . '/header.session.inc.php')) {
49        require_once EGW_SERVER_ROOT . '/header.session.inc.php';
50}
51
52
53/* assure that the correct encondig will be used (e.g string functions) */
54setlocale(LC_CTYPE, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8');
55
56
57/* define o umask para a criação de arquivos por parte do Workflow */
58umask(007);
59
60
61/* including common classes */
62require_once WF_LIB_ROOT . 'security/Security.php';
63require_once WF_LIB_ROOT . 'factory/Factory.php';
64require_once WF_LIB_ROOT . 'factory/BaseFactory.php';
65require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php';
66require_once WF_LIB_ROOT . 'factory/ProcessFactory.php';
67
68$GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects');
69?>
Note: See TracBrowser for help on using the repository browser.