Changeset 6307


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

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

Location:
sandbox/webservice/api
Files:
1 added
3 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'); 
  • sandbox/webservice/api/config/Tonic.srv

    r6155 r6307  
    2929SendSupportFeedbackResource = /mail/SendSupportFeedbackResource.php 
    3030 
     31[/Mail/Attachment] 
     32AttachmentResource = /mail/AttachmentResource.php 
     33 
    3134[/Catalog/Contacts] 
    3235ContactsResource = /catalog/ContactsResource.php 
  • sandbox/webservice/api/rest/dispatch.php

    r6165 r6307  
    2020require_once(__DIR__."/mail/RenameFolderResource.php"); 
    2121require_once(__DIR__."/mail/CleanTrashResource.php"); 
     22require_once(__DIR__."/mail/AttachmentResource.php"); 
    2223require_once(__DIR__."/mail/SendSupportFeedbackResource.php"); 
    2324require_once(__DIR__."/catalog/ContactsResource.php"); 
Note: See TracChangeset for help on using the changeset viewer.