summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc12
-rw-r--r--modules/system/system.install8
2 files changed, 16 insertions, 4 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 7a9a5f89e..8b1c2f0b3 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1308,6 +1308,18 @@ function system_performance_settings() {
$description = '<p>' . t("The normal cache mode is suitable for most sites and does not cause any side effects. The aggressive cache mode causes Drupal to skip the loading (boot) and unloading (exit) of enabled modules when serving a cached page. This results in an additional performance boost but can cause unwanted side effects.") . '</p>';
+ // Check if the "Who's online" block is enabled.
+ $online_block_enabled = db_select('block')
+ ->condition('module', 'user')
+ ->condition('delta', 'online')
+ ->condition('status', 1)
+ ->countQuery()
+ ->execute()
+ ->fetchField();
+ if ($online_block_enabled) {
+ $description .= '<p>' . t("When caching is enabled, anonymous user sessions are only saved to the database when needed, so the \"Who's online\" block does not display the number of anonymous users.") . '</p>';
+ }
+
$problem_modules = array_unique(array_merge(module_implements('boot'), module_implements('exit')));
sort($problem_modules);
diff --git a/modules/system/system.install b/modules/system/system.install
index bef8dcb83..d24af9289 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -1899,10 +1899,10 @@ function system_update_6021() {
// Multi-part update
if (!isset($_SESSION['system_update_6021'])) {
db_add_field($ret, 'menu', 'converted', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
- $_SESSION['system_update_6021_max'] = db_result(db_query('SELECT COUNT(*) FROM {menu}'));
- $_SESSION['menu_menu_map'] = array(1 => 'navigation');
+ drupal_set_session('system_update_6021_max', db_result(db_query('SELECT COUNT(*) FROM {menu}')));
+ drupal_set_session('menu_menu_map', array(1 => 'navigation'));
// 0 => FALSE is for new menus, 1 => FALSE is for the navigation.
- $_SESSION['menu_item_map'] = array(0 => FALSE, 1 => FALSE);
+ drupal_set_session('menu_item_map', array(0 => FALSE, 1 => FALSE));
$table = array(
'fields' => array(
'menu_name' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
@@ -1913,7 +1913,7 @@ function system_update_6021() {
);
db_create_table($ret, 'menu_custom', $table);
db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", $menus['navigation']);
- $_SESSION['system_update_6021'] = 0;
+ drupal_set_session('system_update_6021', 0);
}
$limit = 50;