Skip to content
Snippets Groups Projects
Commit f47d2074 authored by Kevin Kaland's avatar Kevin Kaland
Browse files

Issue #1313990: Fix Database API call.

Also fixes affected code that uses the results.
parent 07a81058
No related branches found
No related tags found
No related merge requests found
......@@ -652,12 +652,16 @@ function _fillpdf_xmlrpc_request($url, $method) {
* Retrieve the PDF's fields.
*/
function fillpdf_get_fields($fid) {
$result = db_query('select * from {fillpdf_fields} where fid = %d', $fid);
$return = array();
$result = db_query('select * from {fillpdf_fields} where fid = :fid', array(':fid' => $fid));
$return = array(
'pdf_key' => '',
'label' => '',
'value' => ''
);
foreach ($result as $result_array) {
$return[$result_array['pdf_key']] = array(
'label' => $result_array['label'],
'value' => $result_array['value'],
$return[$result_array->pdf_key] = array(
'label' => $result_array->label,
'value' => $result_array->value,
);
}
return $return;
......
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