function fillpdf_load in FillPDF 7.2
Same name and namespace in other branches
- 7 fillpdf.module \fillpdf_load()
Whoa, a load function! FillPDF is growing up!
2 calls to fillpdf_load()
File
- ./
fillpdf.module, line 1087 - Allows mappings of PDFs to site content
Code
function fillpdf_load($fid, $reset = FALSE) {
static $fillpdf = array();
if (isset($fillpdf[$fid]) && $reset === FALSE) {
// I'm a placeholder if statement!
}
else {
$fillpdf[$fid] = db_query("SELECT * FROM {fillpdf_forms} WHERE fid = :fid", array(
':fid' => $fid,
))
->fetch();
}
if ($fillpdf[$fid]) {
// Turn replacements (textarea content) into an array.
$fillpdf[$fid]->replacements = _fillpdf_replacements_to_array($fillpdf[$fid]->replacements);
}
if ($fillpdf[$fid]) {
return $fillpdf[$fid];
}
else {
return FALSE;
}
}