function globallink_download_target_resource in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 gl_ws/gl_ws_receive_translations.inc \globallink_download_target_resource()
- 7.6 gl_ws/gl_ws_receive_translations.inc \globallink_download_target_resource()
2 calls to globallink_download_target_resource()
- globallink_background_import in ./
globallink_background_jobs.inc - Imports the documents
- globallink_content_preview_content in ./
globallink_workbench_all_active_submissions.inc - Helper function
File
- gl_ws/
gl_ws_receive_translations.inc, line 227
Code
function globallink_download_target_resource($pd_obj, $target_ticket) {
if (globallink_debug_enabled()) {
watchdog(GLOBALLINK_MODULE, 'Connecting to PD - %pd', array(
'%pd' => print_r($pd_obj, TRUE),
), WATCHDOG_DEBUG);
watchdog(GLOBALLINK_MODULE, 'Downloading Target File for Target Ticket - %ticket', array(
'%ticket' => $target_ticket,
), WATCHDOG_DEBUG);
}
$connectorConfig = new PDConfig();
$connectorConfig->url = $pd_obj->url;
$connectorConfig->username = $pd_obj->username;
$connectorConfig->password = $pd_obj->password;
$connectorConfig->userAgent = $pd_obj->userAgent;
$glExchange = new GLExchange($connectorConfig);
return $glExchange
->downloadTarget($target_ticket);
}