示例#1
0
 /**
  * Get remote changes
  *
  * @param	   string	$service		Service name (google or dropbox)
  * @param	   integer	$uid			User ID
  * @param	   string	$startChangeId	Last Change ID
  * @param	   array	$remotes		Collector array for active items
  * @param	   array	$deletes		Collector array for deleted items
  * @param	   array	$connections	Array of local-remote connections
  * @param	   string	$path			Path
  *
  * @return	   integer - change ID
  */
 public function getChangedItems($service = 'google', $uid = 0, $startChangeId = NULL, &$remotes, &$deletes, $connections = array(), $path = '')
 {
     // Get api
     $apiService = $this->getAPI($service, $uid);
     if (!$apiService) {
         if (!$this->getError()) {
             $this->setError(Lang::txt('PLG_PROJECTS_FILES_SYNC_API_UNAVAILABLE'));
         }
         return false;
     }
     $changeID = NULL;
     if ($service == 'google') {
         // Get remote folder ID
         $folderID = $this->getConfigParam($service, 'remote_dir_id');
         $changeID = Google::collectChanges($apiService, $folderID, $remotes, $deletes, $path, $startChangeId, $connections);
     }
     return $changeID;
 }