- Timestamp:
- 02/05/13 15:03:49 (11 years ago)
- Location:
- sandbox/webservice/api/rest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/rest/availableServers/AvailableServersResource.php
r7463 r7855 14 14 parse_str($request->data, &$data); 15 15 16 if( file_exists( __DIR__ .'/../../config/REST.ini') )16 if( file_exists(API_DIRECTORY.'/../../config/REST.ini') ) 17 17 { 18 $restServers = parse_ini_file( __DIR__ .'/../../config/REST.ini', true );18 $restServers = parse_ini_file(API_DIRECTORY.'/../../config/REST.ini', true ); 19 19 20 20 foreach( $restServers as $key => $value) -
sandbox/webservice/api/rest/catalog/ContactPictureResource.php
r6274 r7855 10 10 $contact = array(); 11 11 $contactID = $this->getParam('contactID'); 12 12 13 // User Contact 13 if($this->getParam('contactType') == 1 && $contactID != null){ 14 $query = 'select A.id_contact, A.photo from phpgw_cc_contact A where A.id_contact='.$contactID.' and A.id_owner='.$this -> getUserId(); 15 if (!$this->getDb()->query($query)) 16 return false; 17 if($this->getDb()->next_record()) { 18 $row = $this->getDb()->row(); 19 if($row['photo'] != null) { 20 $contact[] = array( 21 'contactID' => $row['id_contact'], 22 'contactImagePicture' => ($row['photo'] != null ? base64_encode($row['photo']) : "") 23 ); 24 } 25 } 26 } 14 if($this->getParam('contactType') == 1 && $contactID != null){ 15 16 $query = "select A.id_contact, A.photo from phpgw_cc_contact A where A.id_contact= ? and A.id_owner = ? "; 17 18 $result = $this->getDb()->Link_ID->query($query, array($contactID,$this->getUserId())); 19 20 if ($result) { 21 22 while($row = $result->fetchRow()) { 23 if($row['photo'] != null) { 24 $contact[] = array( 25 'contactID' => $row['id_contact'], 26 'contactImagePicture' => ($row['photo'] != null ? base64_encode($row['photo']) : "") 27 ); 28 } 29 } 30 31 } 32 } 33 27 34 // Global Catalog 28 35 elseif($this->getParam('contactType') == 2){ -
sandbox/webservice/api/rest/dispatch.php
r7811 r7855 1 1 <?php 2 2 3 $dir = $_SERVER['DOCUMENT_ROOT']; 4 5 if (substr($dir,strlen($dir)-1,strlen($dir)) != "/") { 6 $dir = $dir . "/"; 7 } 8 9 define( API_DIRECTORY , $dir . "expresso_22/api/rest" ); 3 define('API_DIRECTORY','/var/www/expresso/api/rest', True); 10 4 11 5 // load libraries
Note: See TracChangeset
for help on using the changeset viewer.