From 76151a8bc900ebb38c76170283a05df791311f76 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 16 Apr 2008 11:35:52 +0000 Subject: - Patch #245504 by catch, David_Rothstein, Freso, et al: removed the throttle module from Drupal core. --- modules/system/system.admin.inc | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'modules/system/system.admin.inc') diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 8c9d0aa0e..c92ac2acb 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -588,7 +588,6 @@ function _system_is_incompatible(&$incompatible, $files, $file) { /** * Menu callback; provides module enable/disable interface. * - * Modules can be enabled or disabled and set for throttling if the throttle module is enabled. * The list of modules gets populated by module.info files, which contain each module's name, * description and dependencies. * @see drupal_parse_info_file for information on module.info descriptors. @@ -642,7 +641,6 @@ function system_modules($form_state = array()) { // Array for disabling checkboxes in callback system_module_disable. $disabled = array(); - $throttle = array(); // Traverse the files retrieved and build the form. foreach ($files as $filename => $file) { $form['name'][$filename] = array('#value' => $file->info['name']); @@ -658,9 +656,6 @@ function system_modules($form_state = array()) { if ($file->status) { $status[] = $file->name; } - if ($file->throttle) { - $throttle[] = $file->name; - } $dependencies = array(); // Check for missing dependencies. @@ -736,21 +731,6 @@ function system_modules($form_state = array()) { '#incompatible_modules_php' => $incompatible_php, ); - // Handle throttle checkboxes, including overriding the - // generated checkboxes for required modules. - if (module_exists('throttle')) { - $form['throttle'] = array( - '#type' => 'checkboxes', - '#default_value' => $throttle, - '#options' => $options, - '#process' => array( - 'expand_checkboxes', - 'system_modules_disable', - ), - '#disabled_modules' => array_merge($modules_required, array('throttle')), - ); - } - $form['buttons']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), @@ -861,13 +841,6 @@ function system_modules_submit($form, &$form_state) { $dependencies = NULL; } - // Update throttle settings, if present - if (isset($form_state['values']['throttle'])) { - foreach ($form_state['values']['throttle'] as $key => $choice) { - db_query("UPDATE {system} SET throttle = %d WHERE type = 'module' and name = '%s'", $choice ? 1 : 0, $key); - } - } - // If there where unmet dependencies and they haven't confirmed don't process // the submission yet. Store the form submission data needed later. if ($dependencies) { @@ -2085,9 +2058,6 @@ function theme_system_modules($form) { // Individual table headers. $header = array(); $header[] = array('data' => t('Enabled'), 'class' => 'checkbox'); - if (module_exists('throttle')) { - $header[] = array('data' => t('Throttle'), 'class' => 'checkbox'); - } $header[] = t('Name'); $header[] = t('Version'); $header[] = t('Description'); @@ -2127,9 +2097,6 @@ function theme_system_modules($form) { $status = drupal_render($form['status'][$key]); } $row[] = array('data' => $status, 'class' => 'checkbox'); - if (module_exists('throttle')) { - $row[] = array('data' => drupal_render($form['throttle'][$key]), 'class' => 'checkbox'); - } // Add labels only when there is also a checkbox. if (isset($form['status'][$key])) { -- cgit v1.2.3