Changeset 7846 for sandbox/webservice
- Timestamp:
- 02/04/13 16:48:20 (11 years ago)
- Location:
- sandbox/webservice/api/adapters
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/adapters/ExpressoAdapter.php
r7577 r7846 13 13 $GLOBALS['phpgw_info'] = array( 14 14 'flags' => array( 15 'currentapp' => 'login',16 'noheader' => True,17 'disable_Template_class' => True15 'currentapp' => 'login', 16 'noheader' => True, 17 'disable_Template_class' => True 18 18 ) 19 19 ); 20 20 21 include_once( apiDirectory.'/../../header.inc.php');21 include_once(API_DIRECTORY.'/../../header.inc.php'); 22 22 $this->expressoVersion = substr($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],0,3); 23 23 $this->setCannotModifyHeader(false); … … 147 147 Errors::runException("LOGIN_NOT_LOGGED_IN"); 148 148 } 149 } 150 149 } 150 151 protected function getUserApps(){ 152 // Load Granted Apps for Web Service 153 $config = parse_ini_file( __DIR__ . '/../config/user.ini',true); 154 $apps = $config['Applications.mapping']; 155 156 // Load Granted Apps for User 157 $contactApps = array(); 158 $acl = CreateObject('phpgwapi.acl'); 159 $user_id = $GLOBALS['phpgw_info']['user']['account_id']['acl']; 160 foreach($acl->get_user_applications($user_id) as $app => $value){ 161 $enabledApp = array_search($app, $apps); 162 if($enabledApp !== FALSE) 163 $contactApps[] = $enabledApp; 164 } 165 166 return $contactApps; 167 } 168 151 169 } -
sandbox/webservice/api/adapters/MailAdapter.php
r6666 r7846 156 156 $msg['msgSubject'] = ($info_msg['subject'] ? mb_convert_encoding($info_msg['subject'],"UTF8", "ISO_8859-1") : ""); 157 157 $msg['msgHasAttachments'] = "0"; 158 158 159 if(count($info_msg['attachments']) > 0) { 159 160 $msg['msgAttachments'] = array(); … … 162 163 'attachmentID' => "".$attachment['pid'], 163 164 'attachmentIndex' => "".$i, 164 'attachmentName' => $attachment['name'],165 'attachmentName' => "".mb_convert_encoding($attachment['name'],"UTF8", "ISO_8859-1"), 165 166 'attachmentSize' => "".$attachment['fsize'], 166 167 'attachmentEncoding' => $attachment['encoding']
Note: See TracChangeset
for help on using the changeset viewer.