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

Revision 2223, 2.0 KB checked in by pedroerp, 14 years ago (diff)

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