Changeset 2206


Ignore:
Timestamp:
03/10/10 15:49:45 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Versão inicial das classes de segurança e fábricas.

Location:
sandbox/workflow/branches/609
Files:
6 added
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/common.inc.php

    r1484 r2206  
    11<?php 
    2 if (file_exists(dirname(__FILE__) . '/../../header.session.inc.php')) { 
    3         require_once dirname(__FILE__) . '/../../header.session.inc.php'; 
     2if (file_exists(PHPGW_SERVER_ROOT . '/header.session.inc.php')) { 
     3        require_once PHPGW_SERVER_ROOT . '/header.session.inc.php'; 
    44} 
    55 
     
    99setlocale(LC_CTYPE, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8'); 
    1010 
     11 
    1112/* define o umask para a criação de arquivos por parte do Workflow */ 
    1213umask(007); 
    1314 
    14 require_once dirname(__FILE__) . '/class.factory.inc.php'; 
    1515 
    16 /** 
    17  * Objeto que implementa uma Factory 
    18  * @global object $GLOBALS['workflow']['factory'] 
    19  * @name $factory 
    20  */ 
    21 $GLOBALS['workflow']['factory'] = new Factory(); 
     16/* defining constants */ 
     17define('WF_SERVER_ROOT', PHPGW_SERVER_ROOT.'/workflow/'); 
     18define('WF_INC_ROOT', WF_SERVER_ROOT.'/inc/'); 
     19define('WF_LIB_ROOT', WF_SERVER_ROOT.'/lib/'); 
    2220 
    23 /** 
    24  * Objeto que cria objetos voltados exclusivamente para o módulo Workflow 
    25  * @global object $GLOBALS['workflow']['workflowObjects'] 
    26  * @name $workflowObjects 
    27  */ 
    28 $GLOBALS['workflow']['workflowObjects'] = $GLOBALS['workflow']['factory']->newInstance('WorkflowObjects'); 
     21 
     22/* including common classes */ 
     23require_once WF_LIB_ROOT . 'Security.php'; 
     24require_once WF_LIB_ROOT . 'Factory.php'; 
     25require_once WF_LIB_ROOT . 'BaseFactory.php'; 
     26require_once WF_LIB_ROOT . 'WorkflowFactory.php'; 
     27require_once WF_LIB_ROOT . 'ProcessFactory.php'; 
     28 
     29 
     30/* FIXME!! */ 
     31$GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects', 'asd', 123); 
    2932?> 
Note: See TracChangeset for help on using the changeset viewer.