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

Revision 2222, 2.4 KB checked in by pedroerp, 14 years ago (diff)

Ticket #609 - Atualizando comentários para seguir o padrão phpdoc.

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 must be defined by expresso itself.
15 * Anyway, there are cases that we access Workflow directly; therefore
16 * it must be defined somewhere...
17 * @name PHPGW_SERVER_ROOT
18 */
19if (!defined('PHPGW_SERVER_ROOT'))
20        define('PHPGW_SERVER_ROOT', $HTTP_SERVER_VARS['DOCUMENT_ROOT']);
21
22/**
23 * Workflow base path.
24 * @name WF_SERVER_ROOT
25 */
26define('WF_SERVER_ROOT', PHPGW_SERVER_ROOT.'/workflow/');
27
28/**
29 * Workflow include path.
30 * @name WF_INC_ROOT
31 */
32define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/');
33
34/**
35 * Workflow lib base dir.
36 * @name WF_LIB_ROOT
37 */
38define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/');
39
40
41if (file_exists(PHPGW_SERVER_ROOT . '/header.session.inc.php')) {
42        require_once PHPGW_SERVER_ROOT . '/header.session.inc.php';
43}
44
45
46/* assure that the correct encondig will be used (e.g string functions) */
47setlocale(LC_CTYPE, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8');
48
49
50/* define o umask para a criação de arquivos por parte do Workflow */
51umask(007);
52
53
54/* including common classes */
55require_once WF_LIB_ROOT . 'security/Security.php';
56//require_once WF_LIB_ROOT . 'factory/Factory.php';
57require_once WF_LIB_ROOT . 'factory/BaseFactory.php';
58require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php';
59require_once WF_LIB_ROOT . 'factory/ProcessFactory.php';
60
61
62/* TODO - here we will still using that old and ugly factory */
63/* in a near future we should do things right.. */
64require_once WF_INC_ROOT . 'class.factory.inc.php';
65$GLOBALS['workflow']['factory'] = new Factory();
66$GLOBALS['workflow']['workflowObjects'] = $GLOBALS['workflow']['factory']->newInstance('WorkflowObjects');
67
68//$GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects', 'asd', 123);
69?>
Note: See TracBrowser for help on using the repository browser.