From f37a65cab9673c872983ae7626e11df096613cf4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 15 Nov 2004 11:26:04 +0000 Subject: - Patch #12353 by Stefan: usability improvement: don't show 'throttle fields' unless the throttle module is enabled. --- modules/system/system.module | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'modules/system/system.module') diff --git a/modules/system/system.module b/modules/system/system.module index e38cbe5fc..3b07b9da3 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -23,7 +23,7 @@ function system_help($section) { $theme = array_pop(explode('.', arg(3), 2)); return t('These options control the display settings for the %template theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the global settings for this theme.', array('%template' => $theme, '%global' => url('admin/themes/settings'))); case 'admin/modules': - return t("Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new permissions might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by checking throttle. The auto-throttle functionality must be enabled on the throttle configuration page after having enabled the throttle module.", array('%permissions' => url('admin/user/configure/permission'), '%throttle' => url('admin/settings/throttle'))); + return t("Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new permissions might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by enabling the throttle.module and checking throttle. The auto-throttle functionality must be enabled on the throttle configuration page after having enabled the throttle module.", array('%permissions' => url('admin/user/configure/permission'), '%throttle' => url('admin/settings/throttle'))); case 'admin/help#system': return t("

Drupal comes with system-wide defaults but the setting-module provides control over many Drupal preferences, behaviours including visual and operational settings.

@@ -472,7 +472,10 @@ function system_module_listing() { $required = array('modules/admin.module', 'modules/block.module', 'modules/filter.module', 'modules/system.module', 'modules/user.module', 'modules/watchdog.module'); $throttle_required = array_merge($required, array('modules/throttle.module')); - $header = array(t('Name'), t('Description'), t('Enabled'), t('Throttle')); + $header = array(t('Name'), t('Description'), t('Enabled')); + if (module_exist('throttle')) { + $header[] = t('Throttle'); + } foreach ($files as $filename => $file) { module_set_filename($file->name, $filename); @@ -495,7 +498,9 @@ function system_module_listing() { db_query('INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap) VALUES (\'%s\', \'%s\', \'%s\', \'%s\', %d, %d, %d)', $info->name, $info->description, 'module', $filename, $file->status, $file->throttle, $bootstrap); $row = array($info->name, $info->description, array('data' => (in_array($filename, $required) ? form_hidden('status]['. $filename, 1) . t('required') : form_checkbox('', 'status]['. $filename, 1, $file->status)), 'align' => 'center')); - $row[] = array('data' => (in_array($filename, $throttle_required) ? form_hidden('throttle]['. $filename, 0) . t('required') : form_checkbox(NULL, 'throttle]['. $filename, 1, $file->throttle, NULL, module_exist('throttle') ? NULL : array('disabled' => 'disabled'))), 'align' => 'center'); + if (module_exist('throttle')) { + $row[] = array('data' => (in_array($filename, $throttle_required) ? form_hidden('throttle]['. $filename, 0) . t('required') : form_checkbox(NULL, 'throttle]['. $filename, 1, $file->throttle, NULL)), 'align' => 'center'); + } $rows[] = $row; } -- cgit v1.2.3