From 2c381622a5bd3ab5b22077348a088bb54ca202dc Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 31 Jan 2009 16:50:57 +0000 Subject: #88264 by Rob Loach and kscheirer: Make variable_get()'s defaultparameter default to NULL so that NULLs do not need to be specified. --- modules/system/system.api.php | 2 +- modules/system/system.install | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 9fc2457fb..7e5e2e7e7 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -1322,7 +1322,7 @@ function hook_requirements($phase) { // Report cron status if ($phase == 'runtime') { - $cron_last = variable_get('cron_last', NULL); + $cron_last = variable_get('cron_last'); if (is_numeric($cron_last)) { $requirements['cron']['value'] = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last))); diff --git a/modules/system/system.install b/modules/system/system.install index 1849f88ad..7b8f1e144 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -134,7 +134,7 @@ function system_requirements($phase) { $help = $t('For more information, see the online handbook entry for configuring cron jobs.', array('@cron-handbook' => 'http://drupal.org/cron')); // Determine when cron last ran. - $cron_last = variable_get('cron_last', NULL); + $cron_last = variable_get('cron_last'); if (!is_numeric($cron_last)) { $cron_last = variable_get('install_time', 0); } @@ -2491,7 +2491,7 @@ function system_update_6041() { */ function system_update_6042() { foreach (list_themes() as $theme) { - $stylesheet = variable_get('color_' . $theme->name . '_stylesheet', NULL); + $stylesheet = variable_get('color_' . $theme->name . '_stylesheet'); if (!empty($stylesheet)) { variable_set('color_' . $theme->name . '_stylesheets', array($stylesheet)); variable_del('color_' . $theme->name . '_stylesheet'); @@ -2853,12 +2853,12 @@ function system_update_7004(&$sandbox) { } } // Rename forum module's block variables. - $forum_block_num_0 = variable_get('forum_block_num_0', NULL); + $forum_block_num_0 = variable_get('forum_block_num_0'); if (isset($forum_block_num_0)) { variable_set('forum_block_num_active', $forum_block_num_0); variable_del('forum_block_num_0'); } - $forum_block_num_1 = variable_get('forum_block_num_1', NULL); + $forum_block_num_1 = variable_get('forum_block_num_1'); if (isset($forum_block_num_1)) { variable_set('forum_block_num_new', $forum_block_num_1); variable_del('forum_block_num_1'); @@ -3090,7 +3090,7 @@ function system_update_7013() { $timezones = system_time_zones(); // If the contributed Date module set a default time zone name, use this // setting as the default time zone. - if (($timezone_name = variable_get('date_default_timezone_name', NULL)) && isset($timezones[$timezone_name])) { + if (($timezone_name = variable_get('date_default_timezone_name')) && isset($timezones[$timezone_name])) { $timezone = $timezone_name; } // If the contributed Event module has set a default site time zone, look up -- cgit v1.2.3