function _ec_variable_init in Elysia Cron 7
Same name and namespace in other branches
- 5.2 elysia_cron.module \_ec_variable_init()
- 5 elysia_cron.module \_ec_variable_init()
- 6.2 elysia_cron.module \_ec_variable_init()
- 6 elysia_cron.module \_ec_variable_init()
- 7.2 elysia_cron.module \_ec_variable_init()
3 calls to _ec_variable_init()
- _ec_variable_del in ./
elysia_cron.module - A substitute for variable_del to avoid cache management Use ONLY for variables setted during cron execution: elysia_cron_semaphore, elysia_cron_last_run, elysia_cron_last_context, cron_semaphore, cron_last WARN_UPGRADE
- _ec_variable_get in ./
elysia_cron.module - A substitute for variable_get to avoid cache management Use ONLY for variables setted during cron execution: elysia_cron_semaphore, elysia_cron_last_run, elysia_cron_last_context, cron_semaphore, cron_last WARN_UPGRADE
- _ec_variable_set in ./
elysia_cron.module - A substitute for variable_set to avoid cache management Use ONLY for variables setted during cron execution: elysia_cron_semaphore, elysia_cron_last_run, elysia_cron_last_context, cron_semaphore, cron_last WARN_UPGRADE
File
- ./
elysia_cron.module, line 203
Code
function _ec_variable_init() {
global $_ec_variables, $_ec_variables_allowed;
$_ec_variables = array();
if (EC_DRUPAL_VERSION >= 7) {
$_ec_variables = array_map('unserialize', db_query("SELECT name, value FROM {variable} where name like '" . implode("' or name like '", $_ec_variables_allowed) . "'")
->fetchAllKeyed());
}
else {
$result = db_query("select * from {variable} where name like '" . implode("' or name like '", $_ec_variables_allowed) . "'");
while ($variable = db_fetch_object($result)) {
$_ec_variables[$variable->name] = unserialize($variable->value);
}
}
}