Ignore:
Timestamp:
05/25/12 10:51:19 (12 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Implementado AttachmentResource? para permitir download de anexo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/adapters/ExpressoAdapter.php

    r6273 r6307  
    22class ExpressoAdapter extends Resource { 
    33 
     4        private $cannotModifyHeader; 
    45        private $expressoVersion; 
    56        private $request; 
     
    1920                 
    2021                include_once(__DIR__.'/../../header.inc.php'); 
    21                 $this->expressoVersion = substr($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],0,3);                   
     22                $this->expressoVersion = substr($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],0,3); 
     23                $this->setCannotModifyHeader(false); 
    2224        } 
    2325         
     
    7072        } 
    7173         
     74        protected function setCannotModifyHeader($boolean){ 
     75                $this-> cannotModifyHeader = $boolean; 
     76        } 
     77        protected function getCannotModifyHeader(){ 
     78                return $this-> cannotModifyHeader; 
     79        } 
     80 
    7281        public function post($request){ 
    7382                $this->setRequest($request);             
    74                 parse_str($request->data, &$array);              
     83                parse_str(urldecode($request->data), &$array);           
    7584                $data = (object)$array;          
    7685                if($data){ 
     
    93102        public function getResponse(){ 
    94103                $response = new Response($this->getRequest()); 
     104                 
     105                if($this->getCannotModifyHeader()) 
     106                        return $response; 
     107                 
    95108                $response->code = Response::OK; 
    96109                $response->addHeader('content-type', 'application/json'); 
Note: See TracChangeset for help on using the changeset viewer.