Skip to content
Snippets Groups Projects
Commit 89840a7b authored by Liam Morland's avatar Liam Morland
Browse files

Refactor: Get $api_key just before it is used

It was moved out of place in 72efe22b.
parent a429f6b4
No related branches found
No related tags found
No related merge requests found
...@@ -1216,8 +1216,6 @@ function fillpdf_execute_merge($method, $fields, $fillpdf, $mode = 'url', $flatt ...@@ -1216,8 +1216,6 @@ function fillpdf_execute_merge($method, $fields, $fillpdf, $mode = 'url', $flatt
switch ($method) { switch ($method) {
// FillPDF Service. // FillPDF Service.
case 'remote': case 'remote':
$api_key = variable_get('fillpdf_api_key', '0');
// Anonymize image data from the fields array; we should not send the real // Anonymize image data from the fields array; we should not send the real
// filename to FillPDF Service. We do this in the specific fill method // filename to FillPDF Service. We do this in the specific fill method
// because others (e.g. local) may need the filename on the local system. // because others (e.g. local) may need the filename on the local system.
...@@ -1229,6 +1227,7 @@ function fillpdf_execute_merge($method, $fields, $fillpdf, $mode = 'url', $flatt ...@@ -1229,6 +1227,7 @@ function fillpdf_execute_merge($method, $fields, $fillpdf, $mode = 'url', $flatt
} }
unset($field); unset($field);
$api_key = variable_get('fillpdf_api_key', '0');
$result = _fillpdf_xmlrpc_request(FILLPDF_DEFAULT_SERVLET_URL, 'merge_pdf_v3', base64_encode($contents), $fields, $api_key, $flatten, $image_data); $result = _fillpdf_xmlrpc_request(FILLPDF_DEFAULT_SERVLET_URL, 'merge_pdf_v3', base64_encode($contents), $fields, $api_key, $flatten, $image_data);
if ($result->error == TRUE) { if ($result->error == TRUE) {
drupal_goto(); drupal_goto();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment