function fillpdf_update_7003 in FillPDF 7.2
Same name and namespace in other branches
- 7 fillpdf.install \fillpdf_update_7003()
Convert legacy configuration variables to new fillpdf_service variable and delete.
File
- ./
fillpdf.install, line 175 - Install
Code
function fillpdf_update_7003() {
$default = FALSE;
global $conf;
foreach (array(
'fillpdf_remote_service',
'fillpdf_local_service',
'fillpdf_local_php',
) as $variable_name) {
if (isset($conf[$variable_name])) {
if ($conf[$variable_name]) {
$default = $variable_name;
}
variable_del($variable_name);
}
}
if ($default) {
$variable_name_map = array(
'fillpdf_local_php' => 'pdftk',
'fillpdf_local_service' => 'local',
'fillpdf_remote_service' => 'remote',
);
variable_set('fillpdf_service', $variable_name_map[$default]);
}
}