diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 708bbf28eac5c1ade255ca1f7fb679eec5f98faa..565ad9e155497b917e0b7691365ced789fd3a636 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,7 +8,7 @@ Drupal 6.0, xxxx-xx-xx (development version) * The watchdog module is now called dblog, and is optional, but enabled by default in the default install profile. * Extended the database log module so log messages can be filtered. * Added syslog module: useful for monitoring large Drupal installations. -- Added optional e-mail notifications when user are approved, blocked, or deleted. +- Added optional e-mail notifications when users are approved, blocked, or deleted. - Added versioning support to node terms. - Made it easier to theme the forum overview page. - Made Drupal work correctly when running behind a reverse proxy like Squid or Pound. @@ -32,6 +32,7 @@ Drupal 6.0, xxxx-xx-xx (development version) * Removed default/settings.php. Instead the installer will create it from default.settings.php. * Made it possible to configure your own date formats. * Remember anonymous comment posters. + * Only allow modules and themes to be enabled that have explicitly been ported to the right core API version. - Theme system: * Added .info files to themes and made it easier to specify regions and features. * Added theme registry: modules can directly provide .tpl.php files for their themes without having to create theme_ functions. diff --git a/modules/aggregator/aggregator.info b/modules/aggregator/aggregator.info index 84c7c0afde9b9b74ba383408e39db07aea7ca094..5697ae3131bbd1fcced3e4836fcbf1908d35f333 100644 --- a/modules/aggregator/aggregator.info +++ b/modules/aggregator/aggregator.info @@ -3,3 +3,4 @@ name = Aggregator description = "Aggregates syndicated content (RSS, RDF, and Atom feeds)." package = Core - optional version = VERSION +core = 6.x diff --git a/modules/block/block.info b/modules/block/block.info index 8c12ddec73a9f4bb1f531540402f70c64638708d..858e44f6257ff49f8de566c77f0b6b06e1eafcba 100644 --- a/modules/block/block.info +++ b/modules/block/block.info @@ -3,3 +3,4 @@ name = Block description = Controls the boxes that are displayed around the main content. package = Core - required version = VERSION +core = 6.x diff --git a/modules/blog/blog.info b/modules/blog/blog.info index 898386dd9c61804f8dd712ee4bc9b943db8b4d40..3dc887322bb68541ef9f9dc9843bbc0b2dda2fef 100644 --- a/modules/blog/blog.info +++ b/modules/blog/blog.info @@ -3,3 +3,4 @@ name = Blog description = Enables keeping easily and regularly updated user web pages or blogs. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/blogapi/blogapi.info b/modules/blogapi/blogapi.info index ceab75326b5c57f90f0c2b33b031e1f22ced59c6..d1781117e36606127a56e961d8c1b4f433474f01 100644 --- a/modules/blogapi/blogapi.info +++ b/modules/blogapi/blogapi.info @@ -3,3 +3,4 @@ name = Blog API description = Allows users to post content using applications that support XML-RPC blog APIs. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/book/book.info b/modules/book/book.info index e9f69bdfbe124edb2005948c87a7139728b934e8..7dfa8ab4bfb5317b425975790a37ab95509ab33c 100644 --- a/modules/book/book.info +++ b/modules/book/book.info @@ -3,3 +3,4 @@ name = Book description = Allows users to collaboratively author a book. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/color/color.info b/modules/color/color.info index 9c66ccdc3e817a071bfd5d5749f458f7605325b5..82d04b2b4c19c8bc732e6f7db61205f0d5c4f3db 100644 --- a/modules/color/color.info +++ b/modules/color/color.info @@ -3,3 +3,4 @@ name = Color description = Allows the user to change the color scheme of certain themes. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/comment/comment.info b/modules/comment/comment.info index 0fe9f1dd58f2a7193b3e07036a0e0ba51e8a2dcc..5d13a6f5714ffd211de662448852eeca762e96e9 100644 --- a/modules/comment/comment.info +++ b/modules/comment/comment.info @@ -3,3 +3,4 @@ name = Comment description = Allows users to comment on and discuss published content. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/contact/contact.info b/modules/contact/contact.info index 238275eafea9f0631e4c11a844f47e0ca994f1d7..2a2e742c1f9b1384f14502b17ba33d59765d489e 100644 --- a/modules/contact/contact.info +++ b/modules/contact/contact.info @@ -3,3 +3,4 @@ name = Contact description = Enables the use of both personal and site-wide contact forms. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/dblog/dblog.info b/modules/dblog/dblog.info index 124280577d553af6cd30b71fc9de45f944e50575..4072ad4f5d1b7d0405c92dffc8f3c1038075415c 100644 --- a/modules/dblog/dblog.info +++ b/modules/dblog/dblog.info @@ -3,3 +3,4 @@ name = Database logging description = Logs and records system events to the database. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/drupal/drupal.info b/modules/drupal/drupal.info index ce23d5c275bbadff8c42a1a15d5585c31e4dc551..61a8afad7620a71b04375d4e10d2a80c7038f44c 100644 --- a/modules/drupal/drupal.info +++ b/modules/drupal/drupal.info @@ -3,3 +3,4 @@ name = Drupal description = Lets you register your site with a central server and improve ranking of Drupal projects by posting information on your installed modules and themes; also enables users to log in using a Drupal ID. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/filter/filter.info b/modules/filter/filter.info index 058a40b9abdb22cdfc63bd55275d0406d90862cd..1f19f7616e4708e70d268a4daada00661aecffe5 100644 --- a/modules/filter/filter.info +++ b/modules/filter/filter.info @@ -3,3 +3,4 @@ name = Filter description = Handles the filtering of content in preparation for display. package = Core - required version = VERSION +core = 6.x diff --git a/modules/forum/forum.info b/modules/forum/forum.info index eab2e580c4d4fe708c3d6ec8c3f0e6d6a7d9846a..00828a407d2a7d5ffc1d4627c132c0162dae5105 100644 --- a/modules/forum/forum.info +++ b/modules/forum/forum.info @@ -5,3 +5,4 @@ dependencies[] = taxonomy dependencies[] = comment package = Core - optional version = VERSION +core = 6.x diff --git a/modules/help/help.info b/modules/help/help.info index da857ef968ec9359a63f71ad63720782367b6e45..ea6dc550717dcead320b1d22fb3408cd909194f4 100644 --- a/modules/help/help.info +++ b/modules/help/help.info @@ -3,3 +3,4 @@ name = Help description = Manages the display of online help. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/locale/locale.info b/modules/locale/locale.info index 88d6ee7bc6c57184f610539e9d6a1cece1945858..24478931d7d9237ba1029d2daa96fdae095b7eb6 100644 --- a/modules/locale/locale.info +++ b/modules/locale/locale.info @@ -3,3 +3,4 @@ name = Locale description = Add language handling functionality and enables the translation of the user interface to languages other than English. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/menu/menu.info b/modules/menu/menu.info index 724b48445773aca9cbb2bdbdbb20cb20427aad56..56f8d140a18caadd86eb31756d12c9262e41039c 100644 --- a/modules/menu/menu.info +++ b/modules/menu/menu.info @@ -3,3 +3,4 @@ name = Menu description = Allows administrators to customize the site navigation menu. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/node/node.info b/modules/node/node.info index 7bbc00b32b4b08d63011bcb44a2d4273f9da5d15..95ddbe39b1ca49264e15212cbf9e90d57d1b8efd 100644 --- a/modules/node/node.info +++ b/modules/node/node.info @@ -3,3 +3,4 @@ name = Node description = Allows content to be submitted to the site and displayed on pages. package = Core - required version = VERSION +core = 6.x diff --git a/modules/path/path.info b/modules/path/path.info index 71501d850de8ab6a68b0e5f9b048e32669572cb6..8ba436f60aeffc8238e7f9421014c09152ff9d3f 100644 --- a/modules/path/path.info +++ b/modules/path/path.info @@ -3,3 +3,4 @@ name = Path description = Allows users to rename URLs. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/php/php.info b/modules/php/php.info index 712f540a182b27fa7752f6f9d89f9cbcf5671d5d..2327acc73c57242bff55eb2dc801a0c0d2b65911 100644 --- a/modules/php/php.info +++ b/modules/php/php.info @@ -3,3 +3,4 @@ name = PHP filter description = Allows embedded PHP code/snippets to be evaluated. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/ping/ping.info b/modules/ping/ping.info index cf72abb0a98f749fbe8c488b189633fe1104cbf3..c89de3baa367efd53b63386785e69c2aa3b52d5c 100644 --- a/modules/ping/ping.info +++ b/modules/ping/ping.info @@ -3,3 +3,4 @@ name = Ping description = Alerts other sites when your site has been updated. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/poll/poll.info b/modules/poll/poll.info index 45d9c16f007cfbbd84028456ca1ed4bc5b6f8618..1622d36e685b420de4ff7ff3d9403085076bbf51 100644 --- a/modules/poll/poll.info +++ b/modules/poll/poll.info @@ -3,3 +3,4 @@ name = Poll description = Allows your site to capture votes on different topics in the form of multiple choice questions. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/profile/profile.info b/modules/profile/profile.info index 042adc47b0619235ca7425b9f35a12218a500728..139670c637125159ec6a211b275d0ac52eae3322 100644 --- a/modules/profile/profile.info +++ b/modules/profile/profile.info @@ -3,3 +3,4 @@ name = Profile description = Supports configurable user profiles. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/search/search.info b/modules/search/search.info index 4ebabd18df0b102ed1a42e1b8ee0182702fb8a9f..1ea0f110d926a0f28bd5a352259500f7958dc73f 100644 --- a/modules/search/search.info +++ b/modules/search/search.info @@ -3,3 +3,4 @@ name = Search description = Enables site-wide keyword searching. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/statistics/statistics.info b/modules/statistics/statistics.info index 43ca8f7104b5196dfa00a480f30d5b3e4d7fc65d..8934614ba7327e0a71a9a7f963bd4219c7a51443 100644 --- a/modules/statistics/statistics.info +++ b/modules/statistics/statistics.info @@ -3,3 +3,4 @@ name = Statistics description = Logs access statistics for your site. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/syslog/syslog.info b/modules/syslog/syslog.info index fc76cc87389f5859b729a916c853e79b9e38cd09..e08efb52a34a0f3211c4dd25207cb882feed24d1 100644 --- a/modules/syslog/syslog.info +++ b/modules/syslog/syslog.info @@ -3,3 +3,4 @@ name = Syslog description = Logs and records system events to syslog. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/system/system.css b/modules/system/system.css index ef20fb1fe02a2987d3b5a4e716c9553cd4cc8891..67f92d89d9e1ff3172b48e2c053bed6196299e23 100644 --- a/modules/system/system.css +++ b/modules/system/system.css @@ -445,3 +445,10 @@ thead div.sticky-header { html.js .js-hide { display: none; } + +/* +** Styles for the system modules page (admin/build/modules) +*/ +#system-modules div.incompatible { + font-weight: bold; +} diff --git a/modules/system/system.info b/modules/system/system.info index a894f9bc3d268d53110788fab7c485e3c892d22d..28c8a686b7e6766dd6080ba92bd30430f9efe643 100644 --- a/modules/system/system.info +++ b/modules/system/system.info @@ -3,3 +3,4 @@ name = System description = Handles general site configuration for administrators. package = Core - required version = VERSION +core = 6.x diff --git a/modules/system/system.module b/modules/system/system.module index d2ad76018780b40da9bf61f44cc21e7224a9d571..bf1e7b93b7a56b84db517907f6322c3c5a432d50 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -7,6 +7,7 @@ */ define('VERSION', '6.0-dev'); +define('DRUPAL_CORE_COMPATIBILITY', '6.x'); define('DRUPAL_MINIMUM_PHP', '4.3.3'); define('DRUPAL_MINIMUM_MYSQL', '4.1.0'); // If using MySQL @@ -1471,12 +1472,20 @@ function system_modules($form_state = array()) { // Array for disabling checkboxes in callback system_module_disable. $disabled = array(); $throttle = array(); + $incompatible = array(); // Traverse the files retrieved and build the form. foreach ($files as $filename => $file) { $form['name'][$filename] = array('#value' => $file->info['name']); $form['version'][$filename] = array('#value' => $file->info['version']); $form['description'][$filename] = array('#value' => t($file->info['description'])); $options[$filename] = ''; + // Ensure this module is compatible with this version of core. + if (!isset($file->info['core']) || $file->info['core'] != DRUPAL_CORE_COMPATIBILITY) { + $incompatible[] = $file->name; + $disabled[] = $file->name; + // Nothing else in this loop matters, so move to the next module. + continue; + } if ($file->status) { $status[] = $file->name; } @@ -1554,6 +1563,7 @@ function system_modules($form_state = array()) { 'system_modules_disable', ), '#disabled_modules' => $disabled, + '#incompatible_modules' => drupal_map_assoc($incompatible), ); // Handle throttle checkboxes, including overriding the @@ -1797,14 +1807,22 @@ function theme_system_modules($form) { $rows = array(); foreach ($modules as $key => $module) { $row = array(); - $row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center'); - + $description = drupal_render($form['description'][$key]); + if (isset($form['status']['#incompatible_modules'][$key])) { + unset($form['status'][$key]); + $status = theme('image', 'misc/watchdog-error.png', t('incompatible'), t('Incompatible with this version of Drupal core')); + $description .= '<div class="incompatible">'. t('This version is incompatible with the !core_version version of Drupal core.', array('!core_version' => VERSION)) .'</div>'; + } + else { + $status = drupal_render($form['status'][$key]); + } + $row[] = array('data' => $status, 'align' => 'center'); if (module_exists('throttle')) { $row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center'); } $row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>'; $row[] = drupal_render($form['version'][$key]); - $row[] = array('data' => drupal_render($form['description'][$key]), 'class' => 'description'); + $row[] = array('data' => $description, 'class' => 'description'); $rows[] = $row; } $fieldset = array( diff --git a/modules/taxonomy/taxonomy.info b/modules/taxonomy/taxonomy.info index aa9e52ea17a0947ccef90fffb8377b6d5e9d1613..b1a2195484b393b91e51eedb90cf281fb2476335 100644 --- a/modules/taxonomy/taxonomy.info +++ b/modules/taxonomy/taxonomy.info @@ -3,3 +3,4 @@ name = Taxonomy description = Enables the categorization of content. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/throttle/throttle.info b/modules/throttle/throttle.info index 6b65ce5770d0c5028b6f36dae99498dac19d5103..7bdc100f0cb865b1eff7b4e2ddb8b67d56ab5c38 100644 --- a/modules/throttle/throttle.info +++ b/modules/throttle/throttle.info @@ -3,3 +3,4 @@ name = Throttle description = Handles the auto-throttling mechanism, to control site congestion. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/tracker/tracker.info b/modules/tracker/tracker.info index 0dceed5b98640bee38a5dd4886e768882e60d26b..2375bc01a216bd48acd1adfdc9bb073968d2f790 100644 --- a/modules/tracker/tracker.info +++ b/modules/tracker/tracker.info @@ -3,3 +3,4 @@ name = Tracker description = Enables tracking of recent posts for users. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/upload/upload.info b/modules/upload/upload.info index a0d2c406842ed2473e19ef5cb3edc360aaf4a5a1..dfb83d22424902123d497c259fac6cf791d5321b 100644 --- a/modules/upload/upload.info +++ b/modules/upload/upload.info @@ -3,3 +3,4 @@ name = Upload description = Allows users to upload and attach files to content. package = Core - optional version = VERSION +core = 6.x diff --git a/modules/user/user.info b/modules/user/user.info index be836c41eedf194a8454c1356f872294c3c44d2d..6059609ab379fe61e48c00254b82d8889daa6f58 100644 --- a/modules/user/user.info +++ b/modules/user/user.info @@ -3,3 +3,4 @@ name = User description = Manages the user registration and login system. package = Core - required version = VERSION +core = 6.x diff --git a/themes/bluemarine/bluemarine.info b/themes/bluemarine/bluemarine.info index 15646d9dfea547497e9b1254a86712111226d6d0..38c33853729d1f301b5f5ec8de981cc961c949cd 100644 --- a/themes/bluemarine/bluemarine.info +++ b/themes/bluemarine/bluemarine.info @@ -2,4 +2,5 @@ name = Bluemarine description = Table-based multi-column theme with a marine and ash color scheme. version = VERSION +core = 6.x engine = phptemplate diff --git a/themes/chameleon/chameleon.info b/themes/chameleon/chameleon.info index 59f4927339ef001f3d3bc5309568cb09a904f6ef..2103648ddb03d96b7af432eee2f923e7383e9a86 100644 --- a/themes/chameleon/chameleon.info +++ b/themes/chameleon/chameleon.info @@ -8,3 +8,4 @@ features[] = favicon features[] = name features[] = slogan version = VERSION +core = 6.x diff --git a/themes/chameleon/marvin/marvin.info b/themes/chameleon/marvin/marvin.info index c77d66055b40be68e563ebe1b1436428991dedc4..ac46c4e02328f5bffb17819fe6bbfc947c4eebfc 100644 --- a/themes/chameleon/marvin/marvin.info +++ b/themes/chameleon/marvin/marvin.info @@ -4,4 +4,5 @@ description = Boxy tabled theme in all grays. regions[left] = Left sidebar regions[right] = Right sidebar version = VERSION +core = 6.x base theme = chameleon diff --git a/themes/garland/garland.info b/themes/garland/garland.info index 740e0342573a46d7d7e4055528625a2f1895638f..32c000d92832217194fac93c7e4e21e440e389c0 100644 --- a/themes/garland/garland.info +++ b/themes/garland/garland.info @@ -2,4 +2,5 @@ name = Garland description = Tableless, recolorable, multi-column, fluid width theme (default). version = VERSION +core = 6.x engine = phptemplate diff --git a/themes/garland/minnelli/minnelli.info b/themes/garland/minnelli/minnelli.info index 3fb7d16a60e4e8976a915b5ba71048f352fa3f27..1ee55c8464bd4d681aab18401610dd97cdc8f3b6 100644 --- a/themes/garland/minnelli/minnelli.info +++ b/themes/garland/minnelli/minnelli.info @@ -2,4 +2,5 @@ name = Minnelli description = Tableless, recolorable, multi-column, fixed width theme. version = VERSION +core = 6.x base theme = garland diff --git a/themes/pushbutton/pushbutton.info b/themes/pushbutton/pushbutton.info index cbe4aca15254aafaaf5338ee17f56b6e32fd46d5..2f78fa4f13b852fa9af0ba1d9ea4b3fdaa4f158b 100644 --- a/themes/pushbutton/pushbutton.info +++ b/themes/pushbutton/pushbutton.info @@ -2,4 +2,5 @@ name = Pushbutton description = Tabled, multi-column theme in blue and orange tones. version = VERSION +core = 6.x engine = phptemplate diff --git a/update.php b/update.php index 2dcda2914534e92eb85672b9aef0856139029990..21c33ff82b14f46c82a441d9ba802d61be34ed6d 100644 --- a/update.php +++ b/update.php @@ -701,6 +701,37 @@ function update_create_batch_table() { return $ret; } +/** + * Disable anything in the {system} table that is not compatible with the + * current version of Drupal core. + */ +function update_fix_compatibility() { + $ret = array(); + $incompatible = array(); + $themes = system_theme_data(); + $modules = module_rebuild_cache(); + $query = db_query("SELECT name, type, status FROM {system} WHERE status = 1 AND type IN ('module','theme')"); + while ($result = db_fetch_object($query)) { + $name = $result->name; + $file = array(); + if ($result->type == 'module' && isset($modules[$name])) { + $file = $modules[$name]; + } + else if ($result->type == 'theme' && isset($themes[$name])) { + $file = $themes[$name]; + } + if (!isset($file) + || !isset($file->info['core']) + || $file->info['core'] != DRUPAL_CORE_COMPATIBILITY) { + $incompatible[] = $name; + } + } + if (!empty($incompatible)) { + $ret[] = update_sql("UPDATE {system} SET status = 0 WHERE name IN ('". implode("','", $incompatible) ."')"); + } + return $ret; +} + /** * Add the update task list to the current page. */ @@ -747,6 +778,7 @@ function update_task_list($active = NULL) { update_fix_watchdog_115(); update_fix_watchdog(); update_fix_sessions(); + update_fix_compatibility(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) {