source: branches/2.4/prototype/rest/mail/CleanTrashResource.php @ 7442

Revision 7442, 461 bytes checked in by eduardow, 11 years ago (diff)

Ticket #3093 - Integrando API Rest (CELEPAR) - commit para o branches.

Line 
1<?php
2
3class CleanTrashResource extends MailAdapter {
4        public function post($request){
5                // to Receive POST Params (use $this->params)
6                parent::post($request);
7
8                if($this-> isLoggedIn())
9                {
10                        $params['clean_folder'] = 'imapDefaultTrashFolder';
11                        if(!$this -> getImap() -> empty_folder($params))
12                                Errors::runException("MAIL_TRASH_NOT_CLEANED");
13                }
14
15                $this->setResult(true);
16
17                //to Send Response (JSON RPC format)
18                return $this->getResponse();
19        }
20
21}
Note: See TracBrowser for help on using the repository browser.