diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-06 09:00:31 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-06 09:00:31 +0000 |
commit | 5f09149caaff7f073101f01ec0ae8f3d251d4b56 (patch) | |
tree | d3ec6b0b777010bd2d9955768dde7ae2bb1d32ca /modules | |
parent | 235621a072caff6e05ccf36e4990e084009f7c49 (diff) | |
download | brdo-5f09149caaff7f073101f01ec0ae8f3d251d4b56.tar.gz brdo-5f09149caaff7f073101f01ec0ae8f3d251d4b56.tar.bz2 |
#178581 by lot of contributors: opt-in for update module on install and update to avoid any privacy concerns
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.install | 53 | ||||
-rw-r--r-- | modules/update/update.module | 7 |
2 files changed, 29 insertions, 31 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 028a0bdb6..2d7ef8be3 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -187,6 +187,23 @@ function system_requirements($phase) { include_once './includes/unicode.inc'; $requirements = array_merge($requirements, unicode_requirements()); + // Check for update status module. + if ($phase == 'runtime') { + if (!module_exists('update')) { + $requirements['update status'] = array( + 'value' => $t('Not enabled'), + 'severity' => REQUIREMENT_ERROR, + 'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update status module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information please read the <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules'))), + ); + } + else { + $requirements['update status'] = array( + 'value' => $t('Enabled'), + ); + } + $requirements['update status']['title'] = $t('Update notifications'); + } + return $requirements; } @@ -4269,43 +4286,17 @@ function system_update_6025() { } /** - * Enable the update.module by default on sites that upgrade. - * - * This cannot just rely on update.install to install the schema. If, - * in the future, someone decides to change the schema for the - * {cache_update} table, this update would cause uncertainty in the - * state of the DB, since the effect of running this update would - * change. For example, if the schema is changed in update #6101, and - * a site upgrades direct from 5.x to 6.1, update #6026 would create - * the table with the new schema, and then update #6101 would fail, - * since it's trying to alter the old schema into the new - * schema. Therefore, we must hard-code the particular version of the - * schema we mean during update #6026, and then future upgrades that - * might attempt to modify the schema of this table will be starting - * from a known state. See http://drupal.org/node/150220 for more. + * Display warning about new Update status module. */ function system_update_6026() { $ret = array(); - $schema['cache_update'] = array( - 'fields' => array( - 'cid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'data' => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'), - 'expire' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'headers' => array('type' => 'text', 'not null' => FALSE), - 'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0) - ), - 'indexes' => array('expire' => array('expire')), - 'primary key' => array('cid'), - ); - db_create_table($ret, 'cache_update', $schema['cache_update']); - drupal_set_installed_schema_version('update', 0); - module_enable(array('update')); - menu_rebuild(); + + // Notify user that new update module exists. + drupal_set_message(t('Drupal can check periodically for important bug fixes and security releases using the new update status module. This module can be turned on from the <a href="@modules">modules administration page</a>. For more information please read the <a href="@update">Update status handbook page</a>.', array('@modules' => url('admin/build/modules'), '@update' => 'http://drupal.org/handbook/modules/update'))); + return $ret; } - /** * Add block cache. */ diff --git a/modules/update/update.module b/modules/update/update.module index bf006230c..2a5305470 100644 --- a/modules/update/update.module +++ b/modules/update/update.module @@ -71,6 +71,13 @@ function update_help($path, $arg) { // These two pages don't need additional nagging. break; + case 'admin/help#update': + $output = '<p>'. t("The Update status module periodically checks for new versions of your site's software (including contributed modules and themes), and alerts you to available updates.") .'</p>'; + $output .= '<p>'. t('The <a href="@update-report">report of available updates</a> will alert you when new releases are available for download. You may configure options for update checking frequency and notifications at the <a href="@update-settings">Update status module settings page</a>.', array('@update-report' => url('admin/logs/updates'), '@update-settings' => url('admin/logs/updates/settings'))) .'</p>'; + $output .= '<p>'. t('Please note that in order to provide this information, anonymous usage statistics are sent to drupal.org. If desired, you may disable the Update status module from the <a href="@modules">module administration page</a>.', array('@modules' => url('admin/build/modules'))) .'</p>'; + $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@update">Update status page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update')) .'</p>'; + return $output; + default: // Otherwise, if we're on *any* admin page and there's a security // update missing, print an error message about it. |