function _ec_variable_get in Elysia Cron 7.2
Same name and namespace in other branches
- 5.2 elysia_cron.module \_ec_variable_get()
- 5 elysia_cron.module \_ec_variable_get()
- 6.2 elysia_cron.module \_ec_variable_get()
- 6 elysia_cron.module \_ec_variable_get()
- 7 elysia_cron.module \_ec_variable_get()
A substitute for variable_get 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.
4 calls to _ec_variable_get()
- drush_elysia_cron_run_wrapper in ./
elysia_cron.drush.inc - Custom callback for 'elysia-cron' drush command.
- elysia_cron_admin_page in ./
elysia_cron.admin.inc - Page callback for 'admin/config/system/cron' path.
- elysia_cron_last_channel in ./
elysia_cron.module - elysia_cron_ping_page in ./
elysia_cron.module - Page callback for ping page. Throws 404 if cron hasn't been called within configured time period.
File
- ./
elysia_cron.module, line 258
Code
function _ec_variable_get($name, $default) {
global $_ec_variables, $_ec_variables_allowed;
if (!in_array($name, $_ec_variables_allowed)) {
elysia_cron_error('Wrong variable passed to _ec_variable_get: !var', array(
'!var' => $name,
), TRUE);
return variable_get($name, $default);
}
if (!is_array($_ec_variables)) {
_ec_variable_init();
}
// If there is a $GLOBALS['original_conf'] = $conf; at the end of settings.php
// i consider it.
global $_original_conf;
if (isset($_original_conf[$name])) {
return $_original_conf[$name];
}
if (isset($_ec_variables[$name])) {
return $_ec_variables[$name];
}
return $default;
}