Changeset 3185


Ignore:
Timestamp:
08/26/10 18:32:29 (14 years ago)
Author:
asaikawa
Message:

Ticket #1172 - Inserido parametro para identificar se esta preparando o ambiente para um WS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/workflow/inc/class.WorkflowMacro.inc.php

    r3167 r3185  
    2828 
    2929        /** 
    30          * Prepara o ambiente disponibilizado pelo ExpressoLivre/Workflow 
     30         * Prepare the ExpressoLivre/Workflow's environment 
     31         * @param bool $preparingToWS True if it's preparing the environment to a webservice call, otherwise False 
    3132         * @return void 
    3233         * @access public 
    3334         */ 
    34         public function prepareEnvironment() 
     35        public function prepareEnvironment($preparingToWS = false) 
    3536        { 
    3637                define('SEP', '/'); 
    37                 $currentApplication = (php_sapi_name() == 'cli') ? 'login' : 'home'; 
     38                /* if it's a command line or webservice call, set $currentApplication to 'login' */ 
     39                $currentApplication = ((php_sapi_name() == 'cli') || $preparingToWS) ? 'login' : 'home'; 
    3840                $GLOBALS['phpgw_info']['flags'] = array('noheader' => true, 'nonavbar' => true, 'currentapp' => $currentApplication, 'enable_network_class' => true, 'enable_contacts_class' => true, 'enable_nextmatchs_class' => true); 
    3941                require_once dirname(__FILE__) . '/../../header.inc.php'; 
Note: See TracChangeset for help on using the changeset viewer.