function _ec_variable_del in Elysia Cron 7.2
Same name and namespace in other branches
- 5.2 elysia_cron.module \_ec_variable_del()
- 5 elysia_cron.module \_ec_variable_del()
- 6.2 elysia_cron.module \_ec_variable_del()
- 6 elysia_cron.module \_ec_variable_del()
- 7 elysia_cron.module \_ec_variable_del()
A substitute for variable_del to avoid cache management.
Use ONLY for variables set during cron execution: elysia_cron_semaphore, elysia_cron_last_run, elysia_cron_last_channel, cron_semaphore, cron_last WARN_UPGRADE.
File
- ./
elysia_cron.module, line 315
Code
function _ec_variable_del($name) {
global $_ec_variables, $_ec_variables_allowed;
if (!in_array($name, $_ec_variables_allowed)) {
elysia_cron_error('Wrong variable passed to _ec_variable_del: !var', array(
'!var' => $name,
), TRUE);
variable_del($name);
return;
}
if (!is_array($_ec_variables)) {
_ec_variable_init();
}
db_delete('variable')
->condition('name', $name)
->execute();
unset($_ec_variables[$name]);
}