From c64db1da29a6b2067f09e66e5e85e8877b489cb0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Thu, 31 Aug 2006 20:22:37 +0000 Subject: [PATCH] - Patch #80952 by earl, webchick, neclimdul et al: .info files --- includes/module.inc | 42 +++++++++++++++++++++++++--- modules/aggregator/aggregator.info | 3 ++ modules/aggregator/aggregator.module | 2 -- modules/block/block.info | 4 +++ modules/block/block.module | 2 -- modules/blog/blog.info | 4 +++ modules/blog/blog.module | 2 -- modules/blogapi/blogapi.info | 4 +++ modules/blogapi/blogapi.module | 2 -- modules/book/book.info | 4 +++ modules/book/book.module | 2 -- modules/comment/comment.info | 4 +++ modules/comment/comment.module | 2 -- modules/contact/contact.info | 4 +++ modules/contact/contact.module | 2 -- modules/drupal/drupal.info | 4 +++ modules/drupal/drupal.module | 2 -- modules/filter/filter.info | 4 +++ modules/filter/filter.module | 2 -- modules/forum/forum.info | 4 +++ modules/forum/forum.module | 2 -- modules/help/help.info | 3 ++ modules/help/help.module | 2 -- modules/legacy/legacy.info | 4 +++ modules/legacy/legacy.module | 2 -- modules/locale/locale.info | 4 +++ modules/locale/locale.module | 2 -- modules/menu/menu.info | 4 +++ modules/menu/menu.module | 2 -- modules/node/node.info | 4 +++ modules/node/node.module | 2 -- modules/path/path.info | 4 +++ modules/path/path.module | 2 -- modules/ping/ping.info | 4 +++ modules/ping/ping.module | 2 -- modules/poll/poll.info | 4 +++ modules/poll/poll.module | 2 -- modules/profile/profile.info | 4 +++ modules/profile/profile.module | 2 -- modules/search/search.info | 4 +++ modules/search/search.module | 2 -- modules/statistics/statistics.info | 4 +++ modules/statistics/statistics.module | 2 -- modules/system/system.info | 4 +++ modules/system/system.module | 12 ++------ modules/taxonomy/taxonomy.info | 4 +++ modules/taxonomy/taxonomy.module | 2 -- modules/throttle/throttle.info | 4 +++ modules/throttle/throttle.module | 2 -- modules/tracker/tracker.info | 4 +++ modules/tracker/tracker.module | 2 -- modules/upload/upload.info | 4 +++ modules/upload/upload.module | 2 -- modules/user/user.info | 4 +++ modules/user/user.module | 2 -- modules/watchdog/watchdog.info | 4 +++ modules/watchdog/watchdog.module | 2 -- 57 files changed, 151 insertions(+), 67 deletions(-) create mode 100644 modules/aggregator/aggregator.info create mode 100644 modules/block/block.info create mode 100644 modules/blog/blog.info create mode 100644 modules/blogapi/blogapi.info create mode 100644 modules/book/book.info create mode 100644 modules/comment/comment.info create mode 100644 modules/contact/contact.info create mode 100644 modules/drupal/drupal.info create mode 100644 modules/filter/filter.info create mode 100644 modules/forum/forum.info create mode 100644 modules/help/help.info create mode 100644 modules/legacy/legacy.info create mode 100644 modules/locale/locale.info create mode 100644 modules/menu/menu.info create mode 100644 modules/node/node.info create mode 100644 modules/path/path.info create mode 100644 modules/ping/ping.info create mode 100644 modules/poll/poll.info create mode 100644 modules/profile/profile.info create mode 100644 modules/search/search.info create mode 100644 modules/statistics/statistics.info create mode 100644 modules/system/system.info create mode 100644 modules/taxonomy/taxonomy.info create mode 100644 modules/throttle/throttle.info create mode 100644 modules/tracker/tracker.info create mode 100644 modules/upload/upload.info create mode 100644 modules/user/user.info create mode 100644 modules/watchdog/watchdog.info diff --git a/includes/module.inc b/includes/module.inc index fecb9c68a6f7..150b776b8d83 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -103,8 +103,13 @@ function module_rebuild_cache() { ksort($files); foreach ($files as $filename => $file) { - drupal_get_filename('module', $file->name, $file->filename); - drupal_load('module', $file->name); + $file->info = _module_parse_info_file(dirname($file->filename) .'/'. $file->name .'.info'); + // Skip modules that don't provide info. + if (empty($file->info)) { + unset($files[$filename]); + continue; + } + $files[$filename]->info = $file->info; // log the critical hooks implemented by this module $bootstrap = 0; @@ -116,12 +121,13 @@ function module_rebuild_cache() { } // Update the contents of the system table: + // TODO: We shouldn't actually need this description field anymore. Remove me next release. if (isset($file->status) || (isset($file->old_filename) && $file->old_filename != $file->filename)) { - db_query("UPDATE {system} SET description = '%s', name = '%s', filename = '%s', bootstrap = %d WHERE filename = '%s'", $file->description, $file->name, $file->filename, $bootstrap, $file->old_filename); + db_query("UPDATE {system} SET description = '%s', name = '%s', filename = '%s', bootstrap = %d WHERE filename = '%s'", $file->info['description'], $file->name, $file->filename, $bootstrap, $file->old_filename); } else { // This is a new module. - db_query("INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', %d, %d, %d)", $file->name, $file->description, 'module', $file->filename, $file->status, $file->throttle, $bootstrap); + db_query("INSERT INTO {system} (name, description, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', %d, %d, %d)", $file->name, $file->info['description'], 'module', $file->filename, $file->status, $file->throttle, $bootstrap); } } @@ -152,6 +158,34 @@ function module_parse_meta_file($filename) { return $metadata; } +/** + * Parse Drupal info file format. + * Uses ini parser provided by php's parse_ini_file(). + * + * Files should use the ini format to specify values. + * e.g. + * key = "value" + * key2 = value2 + * + * Some things to be aware of: + * - This function is NOT for placing arbitrary module-specific settings. Use variable_get() + * and variable_set() for that. + * - You may not use double-quotes in a value. + * + * @param $filename + * The file we are parsing. Accepts file with relative or absolute path. + * @return + * The info array. + */ +function _module_parse_info_file($filename) { + $info = array(); + + if (file_exists($filename)) { + $info = parse_ini_file($filename); + } + return $info; +} + /** * Determine whether a given module exists. * diff --git a/modules/aggregator/aggregator.info b/modules/aggregator/aggregator.info new file mode 100644 index 000000000000..8ef1277729bc --- /dev/null +++ b/modules/aggregator/aggregator.info @@ -0,0 +1,3 @@ +; $Id$ +name = Aggregator +description = "Aggregates syndicated content (RSS, RDF, and Atom feeds)." diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 49edc354c4f0..a678443379d0 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -27,8 +27,6 @@ function aggregator_help($section) { ', array('@admin-aggregator' => url('admin/content/aggregator'), '@admin-aggregator-add-feed' => url('admin/content/aggregator/add/feed'), '@admin-aggregator-add-category' => url('admin/content/aggregator/add/category'), '@admin-settings-aggregator' => url('admin/settings/aggregator'), '@admin-access' => url('admin/user/access'), '@aggregator' => url('aggregator'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@aggregator">Aggregator page</a>.', array('@aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Aggregates syndicated content (RSS, RDF, and Atom feeds).'); case 'admin/content/aggregator': return t('<p>Thousands of sites (particularly news sites and weblogs) publish their latest headlines and/or stories in a machine-readable format so that other sites can easily link to them. This content is usually in the form of an <a href="http://blogs.law.harvard.edu/tech/rss">RSS</a> feed (which is an XML-based syndication standard). To display the feed or category in a block you must decide how many items to show by editing the feed or block and turning on the <a href="@block">feed\'s block</a>.</p>', array('@block' => url('admin/build/block'))); case 'admin/content/aggregator/add/feed': diff --git a/modules/block/block.info b/modules/block/block.info new file mode 100644 index 000000000000..906099324f78 --- /dev/null +++ b/modules/block/block.info @@ -0,0 +1,4 @@ +; $Id$ +name = Block +description = Controls the boxes that are displayed around the main content. + diff --git a/modules/block/block.module b/modules/block/block.module index 7430312fda33..0a915b7be9ff 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -38,8 +38,6 @@ function block_help($section) { ', array('@admin-block' => url('admin/build/block'), '@admin-block-add' => url('admin/build/block/add'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@block">Block page</a>.', array('@block' => 'http://drupal.org/handbook/modules/block/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Controls the boxes that are displayed around the main content.'); case 'admin/build/block': return t(" <p>Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. They are usually generated automatically by modules, but administrators can create blocks manually.</p> diff --git a/modules/blog/blog.info b/modules/blog/blog.info new file mode 100644 index 000000000000..af4cfaf04880 --- /dev/null +++ b/modules/blog/blog.info @@ -0,0 +1,4 @@ +; $Id$ +name = Blog +description = Enables keeping an easily and regularly updated web page or a blog. + diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 6b0a60026b69..f3f8ed32ea0c 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -76,8 +76,6 @@ function blog_help($section) { ', array('@user' => url('user'), '@node-add-blog' => url('node/add/blog'), '@admin-node-configure-types-blog' => url('admin/content/types/blog'), '@admin-settings-blogapi' => url('admin/settings/blogapi'), '@admin-block' => url('admin/build/block'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@blog">Blog page</a>.', array('@blog' => 'http://drupal.org/handbook/modules/blog/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Enables keeping an easily and regularly updated web page or a blog.'); } } diff --git a/modules/blogapi/blogapi.info b/modules/blogapi/blogapi.info new file mode 100644 index 000000000000..711b769ebce9 --- /dev/null +++ b/modules/blogapi/blogapi.info @@ -0,0 +1,4 @@ +; $Id$ +name = Blog API +description = Allows users to post content using applications that support XML-RPC blog APIs. + diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 8d6fb52bca4a..7231ee59e4df 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -23,8 +23,6 @@ function blogapi_help($section) { ', array('@file-xmlrpc' => 'xmlrpc.php', '@admin-settings-blogapi' => url('admin/settings/blogapi'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@blogapi">BlogApi page</a>.', array('@blogapi' => 'http://drupal.org/handbook/modules/blogapi/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows users to post content using applications that support XML-RPC blog APIs.'); } } diff --git a/modules/book/book.info b/modules/book/book.info new file mode 100644 index 000000000000..c4ad50ef7269 --- /dev/null +++ b/modules/book/book.info @@ -0,0 +1,4 @@ +; $Id$ +name = Book +description = Allows users to collaboratively author a book. + diff --git a/modules/book/book.module b/modules/book/book.module index b8fd87b10201..8ed14872a800 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -985,8 +985,6 @@ function book_help($section) { ', array('@node-add-book' => url('node/add/book'), '@admin-node-book' => url('admin/content/book'), '@admin-settings-content-types-book-page' => url('admin/content/types/book'), '@admin-block' => url('admin/build/block'), '@admin-access' => url('admin/user/access'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@book">Book page</a>.', array('@book' => 'http://drupal.org/handbook/modules/book/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows users to collaboratively author a book.'); case 'admin/content/book': return t('<p>The book module offers a means to organize content, authored by many users, in an online manual, outline or FAQ.</p>'); case 'admin/content/book/orphan': diff --git a/modules/comment/comment.info b/modules/comment/comment.info new file mode 100644 index 000000000000..f5b14fe138e4 --- /dev/null +++ b/modules/comment/comment.info @@ -0,0 +1,4 @@ +; $Id$ +name = Comment +description = Allows users to comment on and discuss published content. + diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 557d63d47f73..0df7c1f13982 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -80,8 +80,6 @@ function comment_help($section) { ', array('@admin-access' => url('admin/user/access'), '@admin-settings-comment' => url('admin/content/comment/settings'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@comment">Comment page</a>.', array('@comment' => 'http://drupal.org/handbook/modules/comment/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows users to comment on and discuss published content.'); case 'admin/content/comment': case 'admin/content/comment/new': return t("<p>Below is a list of the latest comments posted to your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit\" to modify the text, and \"delete\" to remove their submission.</p>"); diff --git a/modules/contact/contact.info b/modules/contact/contact.info new file mode 100644 index 000000000000..abe8012ef024 --- /dev/null +++ b/modules/contact/contact.info @@ -0,0 +1,4 @@ +; $Id$ +name = Contact +description = Enables the use of both personal and site-wide contact forms. + diff --git a/modules/contact/contact.module b/modules/contact/contact.module index a0176995a71d..18b169526043 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -23,8 +23,6 @@ function contact_help($section) { $output .= '<li>'. t('Site-wide contact form <a href="@menu-configuration">menu configuration</a>.', array('@menu-configuration' => url('admin/build/menu'))) .'</li></ul>'; $output .= t('For more information, please read the configuration and customization handbook page for the <a href="@contact">contact module</a>.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', NULL, NULL, TRUE))); return $output; - case 'admin/settings/modules#description': - return t('Enables the use of both personal and site-wide contact forms.'); case 'admin/build/contact': $output = t('This page lets you setup <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/build/contact/settings'), '@form' => url('contact'))); if (!module_exists('menu')) { diff --git a/modules/drupal/drupal.info b/modules/drupal/drupal.info new file mode 100644 index 000000000000..23f02363b4d2 --- /dev/null +++ b/modules/drupal/drupal.info @@ -0,0 +1,4 @@ +; $Id$ +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. + diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 69c4ed569827..afa6b70a5dac 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -44,8 +44,6 @@ function drupal_help($section) { $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@drupal">Drupal page</a>.', array('@drupal' => 'http://drupal.org/handbook/modules/drupal/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('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.'); case 'admin/settings/distributed-authentication': return t('<p>Using this your site can "call home" to another Drupal server. By calling home to drupal.org and sending a list of your installed modules and themes, you help rank projects on drupal.org and so assist all Drupal administrators to find the best components for meeting their needs. If you want to register with a different server, you can change the Drupal XML-RPC server setting -- but the server has to be able to handle Drupal XML. Some XML-RPC servers may present directories of all registered sites. To get all your site information listed, go to the <a href="@site-settings">site information settings page</a> and set the site name, the e-mail address, the slogan, and the mission statement.</p>', array('@site-settings' => url('admin/settings/site-information'))); case 'user/help#drupal': diff --git a/modules/filter/filter.info b/modules/filter/filter.info new file mode 100644 index 000000000000..cc656cbf4a7f --- /dev/null +++ b/modules/filter/filter.info @@ -0,0 +1,4 @@ +; $Id$ +name = Filter +description = Handles the filtering of content in preparation for display. + diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 1961a6753efd..e56ba2e15d11 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -30,8 +30,6 @@ function filter_help($section) { ', array('@admin-filters' => url('admin/settings/filters'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@filter">Filter page</a>.', array('@filter' => 'http://drupal.org/handbook/modules/filter/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Handles the filtering of content in preparation for display.'); case 'admin/settings/filters': return t(' diff --git a/modules/forum/forum.info b/modules/forum/forum.info new file mode 100644 index 000000000000..15f7269cb2be --- /dev/null +++ b/modules/forum/forum.info @@ -0,0 +1,4 @@ +; $Id$ +name = Forum +description = Enables threaded discussions about general topics. + diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 5ee5fa3dcde6..1ebc7175c50b 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -25,8 +25,6 @@ function forum_help($section) { ', array('@admin-forum' => url('admin/content/forum'), '@admin-modules' => url('admin/settings/modules'), '@admin-help-comment' => url('admin/help/comment'), '@admin-help-taxonomy' => url('admin/help/taxonomy'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@forum">Forum page</a>.', array('@forum' => 'http://drupal.org/handbook/modules/forum/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Enables threaded discussions about general topics.'); case 'admin/content/forum': return t('<p>This is a list of existing containers and forums that you can edit. Containers hold forums and, in turn, forums hold threaded discussions. Both containers and forums can be placed inside other containers and forums. By planning the structure of your containers and forums well, you make it easier for users to find a topic area of interest to them.</p>'); case 'admin/content/forum/add/container': diff --git a/modules/help/help.info b/modules/help/help.info new file mode 100644 index 000000000000..bc38bc25a803 --- /dev/null +++ b/modules/help/help.info @@ -0,0 +1,3 @@ +; $Id$ +name = Help +description = Manages the display of online help. diff --git a/modules/help/help.module b/modules/help/help.module index 8f6edcbc51f0..d0e13fdb3f80 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -116,8 +116,6 @@ function help_help($section) { $output .= '<p>'. t('You can not administer the help system.') .'</p>'; $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@help">Help page</a>.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Manages the display of online help.'); } } diff --git a/modules/legacy/legacy.info b/modules/legacy/legacy.info new file mode 100644 index 000000000000..cf953c6d4f25 --- /dev/null +++ b/modules/legacy/legacy.info @@ -0,0 +1,4 @@ +; $Id$ +name = Legacy +description = Provides legacy handlers for upgrades from older Drupal installations. + diff --git a/modules/legacy/legacy.module b/modules/legacy/legacy.module index 2105ffb8d1fd..8fef686fb2e7 100644 --- a/modules/legacy/legacy.module +++ b/modules/legacy/legacy.module @@ -27,8 +27,6 @@ function legacy_help($section) { $output .= '<p>'. t('Legacy module has no configurable options.') .'</p>'; $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@legacy">Legacy page</a>.', array('@legacy' => 'http://drupal.org/handbook/modules/legacy/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Provides legacy handlers for upgrades from older Drupal installations.'); } } diff --git a/modules/locale/locale.info b/modules/locale/locale.info new file mode 100644 index 000000000000..56f4ab2c0403 --- /dev/null +++ b/modules/locale/locale.info @@ -0,0 +1,4 @@ +; $Id$ +name = Locale +description = Enables the translation of the user interface to languages other than English. + diff --git a/modules/locale/locale.module b/modules/locale/locale.module index abe3db05694c..157551094f67 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -33,8 +33,6 @@ function locale_help($section) { ', array('@admin-locale' => url('admin/settings/locale'), '@admin-locale-string-search' => url('admin/settings/locale/string/search'), '@admin-locale-language-add' => url('admin/settings/locale/language/add'), '@external-http-drupal-org-project-Translations' => 'http://drupal.org/project/Translations')); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@locale">Locale page</a>.', array('@locale' => 'http://drupal.org/handbook/modules/locale/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Enables the translation of the user interface to languages other than English.'); case 'admin/settings/locale': case 'admin/settings/locale/language/overview': return t("<p>Drupal provides support for the translation of its interface text into different languages. This page provides an overview of the installed languages. You can add a language on the <a href=\"@add-language\">add language page</a>, or directly by <a href=\"@import\">importing a translation</a>. If multiple languages are enabled, registered users will be able to set their preferred language. The site default will be used for anonymous visitors and for users without their own settings.</p><p>Drupal interface translations may be added or extended by several courses: by <a href=\"@import\">importing</a> an existing translation, by <a href=\"@search\">translating everything</a> from scratch, or by a combination of these approaches.</p>", array("@search" => url("admin/settings/locale/string/search"), "@import" => url("admin/settings/locale/language/import"), "@add-language" => url("admin/settings/locale/language/add"))); diff --git a/modules/menu/menu.info b/modules/menu/menu.info new file mode 100644 index 000000000000..7ae926281edb --- /dev/null +++ b/modules/menu/menu.info @@ -0,0 +1,4 @@ +; $Id$ +name = Menu +description = Allows administrators to customize the site navigation menu. + diff --git a/modules/menu/menu.module b/modules/menu/menu.module index 773077dfd398..151b86f2855c 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -31,8 +31,6 @@ function menu_help($section) { ', array('@admin-menu' => url('admin/build/menu'), '@admin-block' => url('admin/build/block'), '@admin-menu-menu-add' => url('admin/build/menu/menu/add'), '@admin-menu-item-add' => url('admin/build/menu/item/add'), '@admin-settings-menus' => url('admin/build/menu/settings'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@menu">Menu page</a>.', array('@menu' => 'http://drupal.org/handbook/modules/menu/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows administrators to customize the site navigation menu.'); case 'admin/build/menu': return '<p>'. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('@admin-settings-menus' => url('admin/build/menu/settings'), '@admin-block'=> url('admin/build/block'))) .'</p>'; case 'admin/build/menu/menu/add': diff --git a/modules/node/node.info b/modules/node/node.info new file mode 100644 index 000000000000..ccc22963e1f7 --- /dev/null +++ b/modules/node/node.info @@ -0,0 +1,4 @@ +; $Id$ +name = Node +description = Allows content to be submitted to the site and displayed on pages. + diff --git a/modules/node/node.module b/modules/node/node.module index 764125020935..cd8aec031c4c 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -33,8 +33,6 @@ function node_help($section) { ', array('@search' => url('search'), '@admin-settings-content-types' => url('admin/content/types'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@node">Node page</a>.', array('@node' => 'http://drupal.org/handbook/modules/node/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows content to be submitted to the site and displayed on pages.'); case 'admin/content/search': return t('<p>Enter a simple pattern to search for a post. This can include the wildcard character *.<br />For example, a search for "br*" might return "bread bakers", "our daily bread" and "brenda".</p>'); case 'admin/content/types': diff --git a/modules/path/path.info b/modules/path/path.info new file mode 100644 index 000000000000..1fda006aaabb --- /dev/null +++ b/modules/path/path.info @@ -0,0 +1,4 @@ +; $Id$ +name = Path +description = Allows users to rename URLs. + diff --git a/modules/path/path.module b/modules/path/path.module index 760e5b02fd9f..5b9fdbf43aa9 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -34,8 +34,6 @@ function path_help($section) { ', array('@admin-path-add' => url('admin/build/path/add'), '@admin-path' => url('admin/build/path'), '@external-http-drupal-org-node-15365' => 'http://drupal.org/node/15365', '@admin-clean-url-settings' => url('admin/settings/clean-urls'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@path">Path page</a>.', array('@path' => 'http://drupal.org/handbook/modules/path/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows users to rename URLs.'); case 'admin/build/path': return t("<p>Drupal provides users complete control over URLs through aliasing. This feature is typically used to make URLs human-readable or easy to remember. For example, one could map the relative URL 'node/1' onto 'about'. Each system path can have multiple aliases.</p>"); case 'admin/build/path/add': diff --git a/modules/ping/ping.info b/modules/ping/ping.info new file mode 100644 index 000000000000..ad02584bd1b9 --- /dev/null +++ b/modules/ping/ping.info @@ -0,0 +1,4 @@ +; $Id$ +name = Ping +description = Alerts other sites when your site has been updated. + diff --git a/modules/ping/ping.module b/modules/ping/ping.module index 279fd8f2e703..1c288aeb2256 100644 --- a/modules/ping/ping.module +++ b/modules/ping/ping.module @@ -23,8 +23,6 @@ function ping_help($section) { ', array('@admin-modules' => url('admin/settings/modules'), '@file-cron' => 'cron.php', '@external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714')); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@ping">Ping page</a>.', array('@ping' => 'http://drupal.org/handbook/modules/ping/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Alerts other sites when your site has been updated.'); } } diff --git a/modules/poll/poll.info b/modules/poll/poll.info new file mode 100644 index 000000000000..90dbe8156c5c --- /dev/null +++ b/modules/poll/poll.info @@ -0,0 +1,4 @@ +; $Id$ +name = Poll +description = Allows your site to capture votes on different topics in the form of multiple choice questions. + diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 317c6ce8711b..16f76bb9a17d 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -23,8 +23,6 @@ function poll_help($section) { ', array('@poll' => url('poll'), '@admin-node-configure-types-poll' => url('admin/content/types/poll'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@poll">Poll page</a>.', array('@poll' => 'http://drupal.org/handbook/modules/poll/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t("Allows your site to capture votes on different topics in the form of multiple choice questions."); } } diff --git a/modules/profile/profile.info b/modules/profile/profile.info new file mode 100644 index 000000000000..bd269b2b432d --- /dev/null +++ b/modules/profile/profile.info @@ -0,0 +1,4 @@ +; $Id$ +name = Profile +description = Supports configurable user profiles. + diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 66d4ef84d5a0..2d473203ef4e 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -40,8 +40,6 @@ function profile_help($section) { ', array('@profile' => url('profile'), '@admin-settings-profile' => url('admin/user/profile'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@profile">Profile page</a>.', array('@profile' => 'http://drupal.org/handbook/modules/profile/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Supports configurable user profiles.'); case 'admin/user/profile': return t('<p>Here you can define custom fields that users can fill in in their user profile (such as <em>country</em>, <em>real name</em>, <em>age</em>, ...).</p>'); } diff --git a/modules/search/search.info b/modules/search/search.info new file mode 100644 index 000000000000..96ea5e1a834c --- /dev/null +++ b/modules/search/search.info @@ -0,0 +1,4 @@ +; $Id$ +name = Search +description = Enables site-wide keyword searching. + diff --git a/modules/search/search.module b/modules/search/search.module index 074572c89e0c..9df070d8d4ec 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -107,8 +107,6 @@ function search_help($section) { ', array('@admin-help-system' => url('admin/help/system'), '@file-cron' => 'cron.php', '@external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714', '@admin-settings-search' => url('admin/settings/search'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@search">Search page</a>.', array('@search' => 'http://drupal.org/handbook/modules/search/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Enables site-wide keyword searching.'); case 'admin/settings/search': return t(' <p>The search engine works by maintaining an index of the words in your site\'s content. You can adjust the settings below to tweak the indexing behaviour. Note that the search requires cron to be set up correctly.</p> diff --git a/modules/statistics/statistics.info b/modules/statistics/statistics.info new file mode 100644 index 000000000000..3dc8fd66a281 --- /dev/null +++ b/modules/statistics/statistics.info @@ -0,0 +1,4 @@ +; $Id$ +name = Statistics +description = Logs access statistics for your site. + diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index d40e5d24e403..757ddae95817 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -41,8 +41,6 @@ function statistics_help($section) { ', array('@admin-settings-statistics' => url('admin/logs/settings'), '@admin-logs' => url('admin/logs'), '@admin-logs-hits' => url('admin/logs/hits'), '@admin-block' => url('admin/build/block'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@statistics">Statistics page</a>.', array('@statistics' => 'http://drupal.org/handbook/modules/statistics/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Logs access statistics for your site.'); case 'admin/logs/settings': return t('<p>Settings for the statistical information that Drupal will keep about the site. See <a href="@statistics">site statistics</a> for the actual information.</p>', array('@statistics' => url('admin/logs/hits'))); case 'admin/logs/hits': diff --git a/modules/system/system.info b/modules/system/system.info new file mode 100644 index 000000000000..134d72084d7c --- /dev/null +++ b/modules/system/system.info @@ -0,0 +1,4 @@ +; $Id$ +name = System +description = Handles general site configuration for administrators. + diff --git a/modules/system/system.module b/modules/system/system.module index 6c4c0a45a485..6b7a630f4f1d 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -30,8 +30,6 @@ function system_help($section) { ', array('@file-cron' => 'cron.php', '@external-http-drupal-org-cron' => 'http://drupal.org/cron', '@cron-status' => url('admin/settings/cron-status'), '@cron-manually' => url('admin/settings/cron-status/cron'), '@admin-settings' => url('admin/settings/page-caching'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@system">System page</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Handles general site configuration for administrators.'); case 'admin': return t('<p>Welcome to the administration section. Here you may control how your site functions.</p>'); case 'admin/settings/page-caching': @@ -1220,13 +1218,9 @@ function system_modules() { $files = module_rebuild_cache(); foreach ($files as $filename => $file) { - drupal_get_filename('module', $file->name, $file->filename); - drupal_load('module', $file->name); - - $file->description = module_invoke($file->name, 'help', 'admin/settings/modules#description'); - - $form['name'][$file->name] = array('#value' => $file->name); - $form['description'][$file->name] = array('#value' => $file->description); + $info = $file->info; + $form['name'][$file->name] = array('#value' => $info['name']); + $form['description'][$file->name] = array('#value' => t($info['description'])); $options[$file->name] = ''; if ($file->status) { $status[] = $file->name; diff --git a/modules/taxonomy/taxonomy.info b/modules/taxonomy/taxonomy.info new file mode 100644 index 000000000000..988d59c09702 --- /dev/null +++ b/modules/taxonomy/taxonomy.info @@ -0,0 +1,4 @@ +; $Id$ +name = Taxonomy +description = Enables the categorization of content. + diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 317bd0636788..82fd2bbea0a2 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1331,8 +1331,6 @@ function taxonomy_help($section) { ', array('@admin-taxonomy-add-vocabulary' => url('admin/content/taxonomy/add/vocabulary'), '@admin-taxonomy' => url('admin/content/taxonomy'), '@external-http-drupal-org-project-taxonomy_access' => 'http://drupal.org/project/taxonomy_access', '@external-http-drupal-org-project-taxonomy_browser' => 'http://drupal.org/project/taxonomy_browser')); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@taxonomy">Taxonomy page</a>.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Enables the categorization of content.'); case 'admin/content/taxonomy': return t('<p>The taxonomy module allows you to classify content into categories and subcategories; it allows multiple lists of categories for classification (controlled vocabularies) and offers the possibility of creating thesauri (controlled vocabularies that indicate the relationship of terms), taxonomies (controlled vocabularies where relationships are indicated hierarchically), and free vocabularies where terms, or tags, are defined during content creation. To view and manage the terms of each vocabulary, click on the associated <em>list terms</em> link. To delete a vocabulary and all its terms, choose "edit vocabulary".</p>'); case 'admin/content/taxonomy/add/vocabulary': diff --git a/modules/throttle/throttle.info b/modules/throttle/throttle.info new file mode 100644 index 000000000000..447f17afed72 --- /dev/null +++ b/modules/throttle/throttle.info @@ -0,0 +1,4 @@ +; $Id$ +name = Throttle +description = Handles the auto-throttling mechanism, to control site congestion. + diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module index de21c1497ca7..9f80af747be8 100644 --- a/modules/throttle/throttle.module +++ b/modules/throttle/throttle.module @@ -133,8 +133,6 @@ function throttle_help($section) { ', array('@admin-modules' => url('admin/settings/modules'), '@admin-block' => url('admin/build/block'), '@admin-settings-throttle' => url('admin/settings/throttle'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@throttle">Throttle page</a>.', array('@throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Handles the auto-throttling mechanism, to control site congestion.'); case 'admin/settings/throttle': return t('If your site gets linked to by a popular website, or otherwise comes under a "Denial of Service" (DoS) attack, your webserver might become overwhelmed. This module provides a congestion control throttling mechanism for automatically detecting a surge in incoming traffic. This mechanism is utilized by other Drupal modules to automatically optimize their performance by temporarily disabling CPU-intensive functionality.'); } diff --git a/modules/tracker/tracker.info b/modules/tracker/tracker.info new file mode 100644 index 000000000000..b814d135f58c --- /dev/null +++ b/modules/tracker/tracker.info @@ -0,0 +1,4 @@ +; $Id$ +name = Tracker +description = Enables tracking of recent posts for users. + diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index a22b630f447e..410b7cbd00ca 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -23,8 +23,6 @@ function tracker_help($section) { ', array('@tracker' => url('tracker'), '@profile' => url('profile'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@tracker">Tracker page</a>.', array('@tracker' => 'http://drupal.org/handbook/modules/tracker/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Enables tracking of recent posts for users.'); } } diff --git a/modules/upload/upload.info b/modules/upload/upload.info new file mode 100644 index 000000000000..e70c878fee94 --- /dev/null +++ b/modules/upload/upload.info @@ -0,0 +1,4 @@ +; $Id$ +name = Upload +description = Allows users to upload and attach files to content. + diff --git a/modules/upload/upload.module b/modules/upload/upload.module index d0ed472b29be..d4c2ad5a510f 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -24,8 +24,6 @@ function upload_help($section) { ', array('@admin-access' => url('admin/user/access'), '@admin-content-types' => url('admin/settings/types'), '@admin-upload' => url('admin/settings/upload'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@upload">Upload page</a>.', array('@upload' => 'http://drupal.org/handbook/modules/upload/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Allows users to upload and attach files to content.'); case 'admin/settings/upload': return t('<p>Users with the <a href="@permissions">upload files permission</a> can upload attachments. Users with the <a href="@permissions">view uploaded files permission</a> can view uploaded attachments. You can choose which post types can take attachments on the <a href="@types">content types settings</a> page.</p>', array('@permissions' => url('admin/user/access'), '@types' => url('admin/settings/types'))); } diff --git a/modules/user/user.info b/modules/user/user.info new file mode 100644 index 000000000000..e9bd85f390a9 --- /dev/null +++ b/modules/user/user.info @@ -0,0 +1,4 @@ +; $Id$ +name = User +description = Manages the user registration and login system. + diff --git a/modules/user/user.module b/modules/user/user.module index a61ba6b1aae1..27bfaf0146a3 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -2267,8 +2267,6 @@ function user_help($section) { ', array('@user' => url('user'), '@admin-user' => url('admin/user/user'), '@admin-themes' => url('admin/build/themes'), '@admin-help-profile' => url('admin/help/profile'), '@admin-help-system' => url('admin/help/system'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@user">User page</a>.', array('@user' => 'http://drupal.org/handbook/modules/user/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Manages the user registration and login system.'); case 'admin/user/user': return t('<p>Drupal allows users to register, login, log out, maintain user profiles, etc. Users of the site may not use their own names to post content until they have signed up for a user account.</p>'); case 'admin/user/user/create': diff --git a/modules/watchdog/watchdog.info b/modules/watchdog/watchdog.info new file mode 100644 index 000000000000..2b2d60ac8ef3 --- /dev/null +++ b/modules/watchdog/watchdog.info @@ -0,0 +1,4 @@ +; $Id$ +name = Watchdog +description = Logs and records system events. + diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 4f965d8ab25d..7373b23e3c51 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -28,8 +28,6 @@ function watchdog_help($section) { ', array('@admin-watchdog' => url('admin/logs/watchdog'), '@admin-watchdog-events' => url('admin/logs/watchdog/events'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@watchdog">Watchdog page</a>.', array('@watchdog' => 'http://drupal.org/handbook/modules/watchdog/')) .'</p>'; return $output; - case 'admin/settings/modules#description': - return t('Logs and records system events.'); case 'admin/logs': return t('<p>The watchdog module monitors your web site, capturing system events in a log to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.</p>'); } -- GitLab