function simple_cookie_compliance_update_7100 in Simple Cookie Compliance 7
Changes the database values of cookie content so they work with text_format filters.
File
- ./
simple_cookie_compliance.install, line 19 - Contains the install functions for the module.
Code
function simple_cookie_compliance_update_7100() {
$result = db_select('variable', 'v')
->fields('v')
->condition('name', db_like('simple_cookie_compliance_content') . '%', 'LIKE')
->execute()
->fetchAll();
foreach ($result as $row) {
$str = unserialize($row->value);
$arr = array(
'value' => $str,
'format' => 'full_html',
);
db_update('variable')
->fields(array(
'value' => serialize($arr),
))
->condition('name', $row->name)
->execute();
}
return;
}