diff --git a/CHANGELOG b/CHANGELOG index 311cbb5b676b0493e0874f23973f23eb81f7fd6b..ce124c8dd4632c6fe94775964adcdb54546087c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,7 +44,7 @@ drupal 4.0.0, xx/xx/xxxx * changed output to valid XHTML. * improved multiple sites using the same Drupal database support. * added support for session IDs in URLs instead of cookies. - * made front page a configuration setting. + * made the type of content on the front page configurable * made each cloud site have its own settings. * modules and themes can now be enabled/disabled using the administrative pages. * added URL abstraction for links. diff --git a/database/database.mysql b/database/database.mysql index 1488dc5135e661254e031a7664f120f13e63fe77..e4c82f772fdd0d05f44bd836aacdf41775933a9b 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -1,9 +1,3 @@ -# MySQL dump 8.14 -# -# Host: localhost Database: drupal -#-------------------------------------------------------- -# Server version 3.23.38 - # # Table structure for table 'access' # @@ -43,6 +37,7 @@ CREATE TABLE blocks ( region tinyint(1) NOT NULL default '0', remove tinyint(1) NOT NULL default '0', path varchar(255) NOT NULL default '', + custom tinyint(2) NOT NULL default '0', PRIMARY KEY (name) ) TYPE=MyISAM; @@ -71,8 +66,8 @@ CREATE TABLE boxes ( info varchar(128) NOT NULL default '', type tinyint(2) NOT NULL default '0', PRIMARY KEY (bid), - UNIQUE KEY subject (title), - UNIQUE KEY info (info) + UNIQUE KEY info (info), + UNIQUE KEY subject (title) ) TYPE=MyISAM; # @@ -168,8 +163,8 @@ CREATE TABLE feed ( link varchar(255) NOT NULL default '', description text NOT NULL, PRIMARY KEY (fid), - UNIQUE KEY link (url), - UNIQUE KEY title (title) + UNIQUE KEY title (title), + UNIQUE KEY link (url) ) TYPE=MyISAM; # @@ -387,8 +382,8 @@ CREATE TABLE site ( refresh int(11) NOT NULL default '0', threshold int(11) NOT NULL default '0', PRIMARY KEY (sid), - UNIQUE KEY url (link), - UNIQUE KEY title (name) + UNIQUE KEY title (name), + UNIQUE KEY url (link) ) TYPE=MyISAM; # @@ -551,6 +546,37 @@ CREATE TABLE watchdog ( # Insert some default values # -INSERT INTO variable SET name='update_start', value='2002-04-23 : roles cleanup'; -INSERT INTO blocks SET name='User information', module='user', delta='0', status='2', weight='0', region='1', remove='0', path=''; -INSERT INTO blocks SET name='Log in', module='user', delta='1', status='2', weight='0', region='1', remove='0', path=''; +INSERT INTO variable SET name='update_start', value='2002-05-15'; +INSERT INTO system VALUES ('archive.module','archive','module','',1); +INSERT INTO system VALUES ('block.module','block','module','',1); +INSERT INTO system VALUES ('blog.module','blog','module','',1); +INSERT INTO system VALUES ('bloggerapi.module','bloggerapi','module','',1); +INSERT INTO system VALUES ('book.module','book','module','',1); +INSERT INTO system VALUES ('cloud.module','cloud','module','',1); +INSERT INTO system VALUES ('comment.module','comment','module','',1); +INSERT INTO system VALUES ('forum.module','forum','module','',1); +INSERT INTO system VALUES ('help.module','help','module','',1); +INSERT INTO system VALUES ('import.module','import','module','',1); +INSERT INTO system VALUES ('jabber.module','jabber','module','',1); +INSERT INTO system VALUES ('locale.module','locale','module','',1); +INSERT INTO system VALUES ('node.module','node','module','',1); +INSERT INTO system VALUES ('notify.module','notify','module','',1); +INSERT INTO system VALUES ('page.module','page','module','',1); +INSERT INTO system VALUES ('poll.module','poll','module','',1); +INSERT INTO system VALUES ('queue.module','queue','module','',1); +INSERT INTO system VALUES ('rating.module','rating','module','',1); +INSERT INTO system VALUES ('search.module','search','module','',1); +INSERT INTO system VALUES ('statistics.module','statistics','module','',1); +INSERT INTO system VALUES ('story.module','story','module','',1); +INSERT INTO system VALUES ('taxonomy.module','taxonomy','module','',1); +INSERT INTO system VALUES ('themes/example/example.theme','example','theme','Internet explorer, Netscape, Opera, Lynx',1); +INSERT INTO system VALUES ('themes/goofy/goofy.theme','goofy','theme','Internetexplorer, Netscape, Opera',1); +INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Internet explorer, Netscape, Opera',1); +INSERT INTO system VALUES ('themes/sosim/sosim.theme','sosim','theme','MSIE/NN/Opera',1); +INSERT INTO system VALUES ('themes/unconed/unconed.theme','unconed','theme','Internet explorer, Netscape, Opera',1); +INSERT INTO system VALUES ('tracker.module','tracker','module','',1); +INSERT INTO system VALUES ('weblogs.module','weblogs','module','',1); +REPLACE variable SET value = 'marvin', name = 'theme_default'; +REPLACE blocks SET name = 'User information', module = 'user', delta = '0', status = '1'; +REPLACE blocks SET name = 'Log in', module = 'user', delta = '1', status = '1'; + diff --git a/includes/module.inc b/includes/module.inc index 41e7e55084840e6c12446d56263a5b2dac98e770..deaace7803d568f7b03a359740aa046b56a22a4f 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -46,7 +46,9 @@ function module_list() { $result = db_query("SELECT name, filename FROM system WHERE type = 'module' AND status = '1' ORDER BY name"); while ($module = db_fetch_object($result)) { $list[$module->name] = $module->name; - include_once "modules/$module->filename"; + if (file_exists("modules/$module->filename")) { + include_once "modules/$module->filename"; + } } asort($list); } diff --git a/modules/aggregator.module b/modules/aggregator.module index 726dc08f5be510920e277fb1f27659bb768a886d..0e3f3e23996c599e36d04388525ae611f0f47494 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -11,6 +11,11 @@ function import_help() { <?php } +function import_system($field){ + $system["description"] = t("Used to import syndicated content (ie. news)"); + return $system[$field]; +} + function import_conf_options() { $number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100); $output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of items displayed in one block."); diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 726dc08f5be510920e277fb1f27659bb768a886d..0e3f3e23996c599e36d04388525ae611f0f47494 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -11,6 +11,11 @@ function import_help() { <?php } +function import_system($field){ + $system["description"] = t("Used to import syndicated content (ie. news)"); + return $system[$field]; +} + function import_conf_options() { $number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100); $output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of items displayed in one block."); diff --git a/modules/archive.module b/modules/archive.module index 2e3e281e150ee326f66fe4aa465e44f536d0fdf5..459fe34f075a68b2ae64beb1f1fa37c42397b2ce 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -1,6 +1,11 @@ <?php // $Id$ +function archive_system($field){ + $system["description"] = t("Displays calendar navigation to old content."); + return $system[$field]; +} + function archive_display($original = 0) { // Prevent future dates: diff --git a/modules/archive/archive.module b/modules/archive/archive.module index 2e3e281e150ee326f66fe4aa465e44f536d0fdf5..459fe34f075a68b2ae64beb1f1fa37c42397b2ce 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -1,6 +1,11 @@ <?php // $Id$ +function archive_system($field){ + $system["description"] = t("Displays calendar navigation to old content."); + return $system[$field]; +} + function archive_display($original = 0) { // Prevent future dates: diff --git a/modules/block.module b/modules/block.module index bbb9162c46bd14cf5a22ab2a25c5e78024a90c0b..638f0dc0861397273a33927ae4ca87c1431e5542 100644 --- a/modules/block.module +++ b/modules/block.module @@ -38,6 +38,11 @@ function block_help() { <?php } +function block_system($field){ + $system["description"] = t("Displays content in small boxes, generally along the side of the page."); + return $system[$field]; +} + function block_perm() { return array("administer blocks"); } diff --git a/modules/block/block.module b/modules/block/block.module index bbb9162c46bd14cf5a22ab2a25c5e78024a90c0b..638f0dc0861397273a33927ae4ca87c1431e5542 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -38,6 +38,11 @@ function block_help() { <?php } +function block_system($field){ + $system["description"] = t("Displays content in small boxes, generally along the side of the page."); + return $system[$field]; +} + function block_perm() { return array("administer blocks"); } diff --git a/modules/blog.module b/modules/blog.module index 7d4f4a2066884a6f63e05cbfb8137e0fbb809e98..223610a3266d36cfd8eec7754c8731795221db19 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -1,6 +1,12 @@ <?php // $Id$ +function blog_system($field){ + $system["description"] = t("Enables keeping an online journal."); + return $system[$field]; +} + + function blog_conf_options() { $output .= form_textarea("Explanation or submission guidelines", "blog_help", variable_get("blog_help", ""), 55, 4, "This text will be displayed at the top of the blog submission form. Useful for helping or instructing your users."); $output .= form_select(t("Minimum number of words in a node"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a personal blog entry should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test posts.")); diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 7d4f4a2066884a6f63e05cbfb8137e0fbb809e98..223610a3266d36cfd8eec7754c8731795221db19 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -1,6 +1,12 @@ <?php // $Id$ +function blog_system($field){ + $system["description"] = t("Enables keeping an online journal."); + return $system[$field]; +} + + function blog_conf_options() { $output .= form_textarea("Explanation or submission guidelines", "blog_help", variable_get("blog_help", ""), 55, 4, "This text will be displayed at the top of the blog submission form. Useful for helping or instructing your users."); $output .= form_select(t("Minimum number of words in a node"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a personal blog entry should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test posts.")); diff --git a/modules/bloggerapi.module b/modules/bloggerapi.module index 404105683144c063df500275950f7691abef9fac..49e0b4bf80b6143439319e6129696ebb3f5e02dd 100644 --- a/modules/bloggerapi.module +++ b/modules/bloggerapi.module @@ -368,6 +368,11 @@ function bloggerapi_perm() { return array("access bloggerapi"); } +function bloggerapi_system($field){ + $system["description"] = t("Allows users post to Drupal via alternate methods or different tools."); + return $system[$field]; +} + function bloggerapi_help() { ?> <h3>Introduction</h3> diff --git a/modules/book.module b/modules/book.module index f6dab9d06943a568a460914eb28ebe5a0aa071b6..8f02ce4ee8f42235790d6f4d4306fed3dc5f1c76 100644 --- a/modules/book.module +++ b/modules/book.module @@ -1,6 +1,11 @@ <?php // $Id$ +function book_system($field){ + $system["description"] = t("Allows users to collaboratively author a book."); + return $system[$field]; +} + function book_node($field) { global $user; diff --git a/modules/book/book.module b/modules/book/book.module index f6dab9d06943a568a460914eb28ebe5a0aa071b6..8f02ce4ee8f42235790d6f4d4306fed3dc5f1c76 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -1,6 +1,11 @@ <?php // $Id$ +function book_system($field){ + $system["description"] = t("Allows users to collaboratively author a book."); + return $system[$field]; +} + function book_node($field) { global $user; diff --git a/modules/cloud.module b/modules/cloud.module index add48475948b8dc4da4550e6baa3ee5e7bb06a28..77817ba8b1703be8c6b657f397ae0a122facc8fd 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -17,6 +17,11 @@ function cloud_help($type = "administrator") { return $output; } +function cloud_system($field){ + $system["description"] = t("Tracks other sites and displays last date changed."); + return $system[$field]; +} + function cloud_cron() { $result = db_query("SELECT * FROM site WHERE timestamp = 0 OR timestamp + refresh < ". time()); @@ -64,7 +69,7 @@ function cloud_update($site) { $data .= fgets($fp, 128); } - if (abs($site["size"] - strlen($data)) > $site["threshold"]) { + if (abs($site["size"] - strlen($data)) >= $site["threshold"]) { db_query("UPDATE site SET size = '". strlen($data) ."', timestamp = '". time() ."' WHERE link = '%s'", $site["link"]); } @@ -78,7 +83,7 @@ function cloud_update($site) { function cloud_form($edit = array()) { $period = array(900 => format_interval(900), 1800 => format_interval(1800), 3600 => format_interval(3600), 7200 => format_interval(7200), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 64800 => format_interval(64800), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200)); - $threshold = array(0 => "0 bytes", 10 => "10 bytes", 20 => "20 bytes", 40 => "40 bytes", 60 => "60 bytes", 80 => "80 bytes", 160 => "160 bytes", 320 => "320 bytes", 640 => "640 bytes"); + $threshold = array(1 => "1 byte", 10 => "10 bytes", 20 => "20 bytes", 40 => "40 bytes", 60 => "60 bytes", 80 => "80 bytes", 100 => "100 bytes", 120 => "120 bytes", 140 => "140 bytes", 160 => "160 bytes", 320 => "320 bytes", 640 => "640 bytes"); $form .= form_textfield("Site name", "name", $edit["name"], 50, 128, "The name of the website you want to monitor for updates."); $form .= form_textfield("Site URL", "link", $edit["link"], 50, 255, "The URL of the website you want to monitor for updates."); diff --git a/modules/comment.module b/modules/comment.module index 0f11bec1d1b62e2656a53fa1022771d6fdb898b1..509341ede2764b8f500b38162425100432ed3c77 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -13,6 +13,11 @@ function comment_help() { return $output; } +function comment_system($field){ + $system["description"] = t("Enables user commenting."); + return $system[$field]; +} + function comment_settings($mode, $order, $threshold) { global $user; @@ -516,7 +521,7 @@ function comment_render($nid, $cid = 0) { } if ($mode == 1) { - if (db_result($result)) { + if (db_num_rows($result)) { print "<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"; print " <tr><th>". t("Subject") ."</th><th>". t("Author") ."</th><th>". t("Date") ."</th></tr>\n"; while ($comment = db_fetch_object($result)) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 0f11bec1d1b62e2656a53fa1022771d6fdb898b1..509341ede2764b8f500b38162425100432ed3c77 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -13,6 +13,11 @@ function comment_help() { return $output; } +function comment_system($field){ + $system["description"] = t("Enables user commenting."); + return $system[$field]; +} + function comment_settings($mode, $order, $threshold) { global $user; @@ -516,7 +521,7 @@ function comment_render($nid, $cid = 0) { } if ($mode == 1) { - if (db_result($result)) { + if (db_num_rows($result)) { print "<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"; print " <tr><th>". t("Subject") ."</th><th>". t("Author") ."</th><th>". t("Date") ."</th></tr>\n"; while ($comment = db_fetch_object($result)) { diff --git a/modules/drupal.module b/modules/drupal.module index 0a1cb8639cc36ed5424146ca6500f8950edb2f69..6468076eb319c8e511081f65ce85f7c4bb69623c 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -1,5 +1,10 @@ <?php +function drupal_system($field){ + $system["description"] = t("You'll need this :-)"); + return $system[$field]; +} + function drupal_conf_options() { $output .= form_textfield("Drupal server", "drupal_server", variable_get("drupal_server", "http://www.drupal.org/xmlrpc.php"), 55, 128, "The URL of your root Drupal XML-RPC server."); $output .= form_select("Drupal directory", "drupal_directory", variable_get("drupal_directory", 0), array("Disabled", "Enabled"), "If enabled, your Drupal site will make itself know to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you have to set your site's name, e-mail address, slogan and mission statement."); diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 0a1cb8639cc36ed5424146ca6500f8950edb2f69..6468076eb319c8e511081f65ce85f7c4bb69623c 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -1,5 +1,10 @@ <?php +function drupal_system($field){ + $system["description"] = t("You'll need this :-)"); + return $system[$field]; +} + function drupal_conf_options() { $output .= form_textfield("Drupal server", "drupal_server", variable_get("drupal_server", "http://www.drupal.org/xmlrpc.php"), 55, 128, "The URL of your root Drupal XML-RPC server."); $output .= form_select("Drupal directory", "drupal_directory", variable_get("drupal_directory", 0), array("Disabled", "Enabled"), "If enabled, your Drupal site will make itself know to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you have to set your site's name, e-mail address, slogan and mission statement."); diff --git a/modules/forum.module b/modules/forum.module index 79a3363c76c41437d6e960200f28f94527631560..a001a57fdfacc676cf936d1e70859f19cfd4819e 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -1,6 +1,11 @@ <?php // $Id$ +function forum_system($field){ + $system["description"] = t("Enables threaded discussions."); + return $system[$field]; +} + function forum_node($field) { $info["name"] = t("discussion forum"); $info["description"] = t("A forum is a threaded discussion, enabling users to communicate about a particular topic."); diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 79a3363c76c41437d6e960200f28f94527631560..a001a57fdfacc676cf936d1e70859f19cfd4819e 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -1,6 +1,11 @@ <?php // $Id$ +function forum_system($field){ + $system["description"] = t("Enables threaded discussions."); + return $system[$field]; +} + function forum_node($field) { $info["name"] = t("discussion forum"); $info["description"] = t("A forum is a threaded discussion, enabling users to communicate about a particular topic."); diff --git a/modules/help.module b/modules/help.module index 4f11236f10dec58c7a6cb5cf7b1dd03bf853f943..423ac662cf5b98c021679929360b44ab0aa2f831 100644 --- a/modules/help.module +++ b/modules/help.module @@ -1,6 +1,11 @@ <?php // $Id$ +function help_system($field){ + $system["description"] = t("Manages displaying online help."); + return $system[$field]; +} + function help_link($type) { if ($type == "admin") { $links[] = la(t("help"), array("mod" => "help")); diff --git a/modules/help/help.module b/modules/help/help.module index 4f11236f10dec58c7a6cb5cf7b1dd03bf853f943..423ac662cf5b98c021679929360b44ab0aa2f831 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -1,6 +1,11 @@ <?php // $Id$ +function help_system($field){ + $system["description"] = t("Manages displaying online help."); + return $system[$field]; +} + function help_link($type) { if ($type == "admin") { $links[] = la(t("help"), array("mod" => "help")); diff --git a/modules/import.module b/modules/import.module index 726dc08f5be510920e277fb1f27659bb768a886d..0e3f3e23996c599e36d04388525ae611f0f47494 100644 --- a/modules/import.module +++ b/modules/import.module @@ -11,6 +11,11 @@ function import_help() { <?php } +function import_system($field){ + $system["description"] = t("Used to import syndicated content (ie. news)"); + return $system[$field]; +} + function import_conf_options() { $number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100); $output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of items displayed in one block."); diff --git a/modules/jabber.module b/modules/jabber.module index 98ddd7480b9fbcd7757ee0fd9423522cb9612bd8..abe1a4448ea8d68f7c84147de770714c52531cb4 100644 --- a/modules/jabber.module +++ b/modules/jabber.module @@ -1,4 +1,10 @@ <?php +// $Id$ + +function jabber_system($field){ + $system["description"] = t("Enables login with Jabber ID and Password"); + return $system[$field]; +} function jabber_info($field = 0) { $info["name"] = "Jabber"; diff --git a/modules/locale.module b/modules/locale.module index 4d6e8f0831f18c9c3fdc6dc787c2a9f82a80e015..c6d0cb173048ed23523dceb7bb24df96779da80d 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -35,6 +35,11 @@ function locale_help() { <?php } +function locale_system($field){ + $system["description"] = t("Enables the translation of drupal messages to languages other than English."); + return $system[$field]; +} + function locale_perm() { return array("administer locales"); } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 4d6e8f0831f18c9c3fdc6dc787c2a9f82a80e015..c6d0cb173048ed23523dceb7bb24df96779da80d 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -35,6 +35,11 @@ function locale_help() { <?php } +function locale_system($field){ + $system["description"] = t("Enables the translation of drupal messages to languages other than English."); + return $system[$field]; +} + function locale_perm() { return array("administer locales"); } diff --git a/modules/node.module b/modules/node.module index 68b64c59cb10a5a41887fff555208c16e999cce2..a12e61ad90675339c708a439a83b4675de38bb4b 100644 --- a/modules/node.module +++ b/modules/node.module @@ -14,6 +14,11 @@ function node_help() { } } +function node_system($field){ + $system["description"] = t("You'll need this too."); + return $system[$field]; +} + function node_teaser($body) { $size = 400; diff --git a/modules/node/node.module b/modules/node/node.module index 68b64c59cb10a5a41887fff555208c16e999cce2..a12e61ad90675339c708a439a83b4675de38bb4b 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -14,6 +14,11 @@ function node_help() { } } +function node_system($field){ + $system["description"] = t("You'll need this too."); + return $system[$field]; +} + function node_teaser($body) { $size = 400; diff --git a/modules/page.module b/modules/page.module index 3f59513d3d35c99d876e2b9533ab42e8d9b0dbbd..fa53d8bb02f148767523d8b0ad55137c0fd4745c 100644 --- a/modules/page.module +++ b/modules/page.module @@ -7,6 +7,11 @@ function page_help() { return $output; } +function page_system($field){ + $system["description"] = t("Enables the creation of persistent site pages that can be added to the navigation system."); + return $system[$field]; +} + function page_node($field) { $info["name"] = t("site page"); $info["description"] = t("If you just want to add a page with a link in the menu to your site, this would be the best choice. Unlike a story, a site page by-passes the submission queue."); diff --git a/modules/page/page.module b/modules/page/page.module index 3f59513d3d35c99d876e2b9533ab42e8d9b0dbbd..fa53d8bb02f148767523d8b0ad55137c0fd4745c 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -7,6 +7,11 @@ function page_help() { return $output; } +function page_system($field){ + $system["description"] = t("Enables the creation of persistent site pages that can be added to the navigation system."); + return $system[$field]; +} + function page_node($field) { $info["name"] = t("site page"); $info["description"] = t("If you just want to add a page with a link in the menu to your site, this would be the best choice. Unlike a story, a site page by-passes the submission queue."); diff --git a/modules/poll.module b/modules/poll.module index 8238ea0bc99de1dc33139742e26e8f895bb3d8b1..ab7792e187eb89322f901b053e91a28b6963dbc2 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -1,6 +1,11 @@ <?php // $Id$ +function poll_system($field){ + $system["description"] = t("Enables submission of multiple choice questions for voting."); + return $system[$field]; +} + function poll_access($op, $node) { if ($op == "view") { return $node->status; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 8238ea0bc99de1dc33139742e26e8f895bb3d8b1..ab7792e187eb89322f901b053e91a28b6963dbc2 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -1,6 +1,11 @@ <?php // $Id$ +function poll_system($field){ + $system["description"] = t("Enables submission of multiple choice questions for voting."); + return $system[$field]; +} + function poll_access($op, $node) { if ($op == "view") { return $node->status; diff --git a/modules/queue.module b/modules/queue.module index 833a7c44261c888492962ab8274d974a7e4ca2da..744b83ddcf7d51985b055c9f6677efdec5877c22 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -1,8 +1,12 @@ <?php // $Id$ -function queue_conf_options() { +function queue_system($field){ + $system["description"] = t("Enables new content submissions to be rated before being displayed"); + return $system[$field]; +} +function queue_conf_options() { $threshold_post = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 60 => 60, 70 => 70, 80 => 80, 90 => 90, 100 => 100); $threshold_dump = array(-1 => -1, -2 => -2, -3 => -3, -4 => -4, -5 => -5, -6 => -6, -7 => -7, -8 => -8, -9 => -9, -10 => -10, -11 => -11, -12 => -12, -13 => -13, -14 => -14, -15 => -15, -20 => -20, -25 => -25, -30 => -30); $threshold_expire = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 60 => 60, 70 => 70, 80 => 80, 90 => 90, 100 => 100); diff --git a/modules/rating.module b/modules/rating.module index 07acab3ec5fbf487138eb85c260dbb6fc4cb5c13..4f8fe48be4e19dde2b9c0badd9e218df739ea21b 100644 --- a/modules/rating.module +++ b/modules/rating.module @@ -8,6 +8,11 @@ function rating_help() { return $output; } +function rating_system($field){ + $system["description"] = t("Enables ranking of users based on the rating of their submissions."); + return $system[$field]; +} + function rating_perm() { return array("access user ratings"); } diff --git a/modules/search.module b/modules/search.module index b441b096aa0b50b5f87e7920b1594e1033f07a00..7ecbf677f84cf958297b0cda308775a756504bd0 100644 --- a/modules/search.module +++ b/modules/search.module @@ -14,6 +14,11 @@ function search_help() { return $output; } +function search_system($field){ + $system["description"] = t("Enables site wide key word searching"); + return $system[$field]; +} + /** * Return an array of valid search access permissions */ diff --git a/modules/search/search.module b/modules/search/search.module index b441b096aa0b50b5f87e7920b1594e1033f07a00..7ecbf677f84cf958297b0cda308775a756504bd0 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -14,6 +14,11 @@ function search_help() { return $output; } +function search_system($field){ + $system["description"] = t("Enables site wide key word searching"); + return $system[$field]; +} + /** * Return an array of valid search access permissions */ diff --git a/modules/statistics.module b/modules/statistics.module index 3b04cf3aec139d63d47d5e24139a3942070a0c16..c4e1d48d0478f9c53b6576d1f30d56dc11d39599 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -14,6 +14,11 @@ function statistics_help() { return $output; } +function statistics_system($field){ + $system["description"] = t("Gathers and displays site metrics."); + return $system[$field]; +} + function statistics_cron() { db_query("DELETE FROM referrer WHERE ". time() ." - timestamp > ". variable_get("referrer_clear", 604800)); } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 3b04cf3aec139d63d47d5e24139a3942070a0c16..c4e1d48d0478f9c53b6576d1f30d56dc11d39599 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -14,6 +14,11 @@ function statistics_help() { return $output; } +function statistics_system($field){ + $system["description"] = t("Gathers and displays site metrics."); + return $system[$field]; +} + function statistics_cron() { db_query("DELETE FROM referrer WHERE ". time() ." - timestamp > ". variable_get("referrer_clear", 604800)); } diff --git a/modules/story.module b/modules/story.module index f4366d0cb07ae8492fa19de23be2c4f6a5211b1e..8742be964916e5021c467beaf833ed3d27d39652 100644 --- a/modules/story.module +++ b/modules/story.module @@ -7,6 +7,11 @@ function story_help() { return $output; } +function story_system($field){ + $system["description"] = t("Enables users to submit stories. These stories are not part of their blogs."); + return $system[$field]; +} + function story_conf_options() { $output .= form_textarea("Explanation or submission guidelines", "story_help", variable_get("story_help", ""), 55, 4, "This text will be displayed at the top of the story submission form. Useful for helping or instructing your users."); $output .= form_select(t("Minimum number of words"), "minimum_story_size", variable_get("minimum_story_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a personal story entry should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test posts.")); diff --git a/modules/story/story.module b/modules/story/story.module index f4366d0cb07ae8492fa19de23be2c4f6a5211b1e..8742be964916e5021c467beaf833ed3d27d39652 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -7,6 +7,11 @@ function story_help() { return $output; } +function story_system($field){ + $system["description"] = t("Enables users to submit stories. These stories are not part of their blogs."); + return $system[$field]; +} + function story_conf_options() { $output .= form_textarea("Explanation or submission guidelines", "story_help", variable_get("story_help", ""), 55, 4, "This text will be displayed at the top of the story submission form. Useful for helping or instructing your users."); $output .= form_select(t("Minimum number of words"), "minimum_story_size", variable_get("minimum_story_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a personal story entry should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test posts.")); diff --git a/modules/system.module b/modules/system.module index a1fe0c515d8aac6cb91eb9893cbd521b1e8357d3..99aea87d1a06844fa7c2901daa84c6f7392eeb79 100644 --- a/modules/system.module +++ b/modules/system.module @@ -8,6 +8,11 @@ function system_help() { return $output; } +function system_system($field){ + $system["description"] = t("You'll need this."); + return $system[$field]; +} + function system_help_cache() { $output .= "<p>Drupal has a caching mechanism that stores dynamically generated pages in a database. By caching a page, Drupal does not have to generate the page each time it is requested. Only pages requested by anonymous users are being cached. When a cached page is accessed, Drupal will retrieve that page with minimal overhead using one SQL query only, thus reducing both the server load and the response time.</p>"; $output .= "<p>Drupal's caching mechanism can be enabled and disabled by the site administrators from the 'settings' page. He can also define how long cached pages should be kept.</p>"; diff --git a/modules/system/system.module b/modules/system/system.module index a1fe0c515d8aac6cb91eb9893cbd521b1e8357d3..99aea87d1a06844fa7c2901daa84c6f7392eeb79 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -8,6 +8,11 @@ function system_help() { return $output; } +function system_system($field){ + $system["description"] = t("You'll need this."); + return $system[$field]; +} + function system_help_cache() { $output .= "<p>Drupal has a caching mechanism that stores dynamically generated pages in a database. By caching a page, Drupal does not have to generate the page each time it is requested. Only pages requested by anonymous users are being cached. When a cached page is accessed, Drupal will retrieve that page with minimal overhead using one SQL query only, thus reducing both the server load and the response time.</p>"; $output .= "<p>Drupal's caching mechanism can be enabled and disabled by the site administrators from the 'settings' page. He can also define how long cached pages should be kept.</p>"; diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 24d0062fdb5bfff7c3ce2a9406c513ba4e1ba0c6..695db46d2cb166aa76427b274747251d1de0d483 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -1,6 +1,11 @@ <?php // $Id$ +function taxonomy_system($field){ + $system["description"] = t("Enables the organization of content into categories and subcategories."); + return $system[$field]; +} + function taxonomy_feed() { global $id, $or, $and, $type; diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 24d0062fdb5bfff7c3ce2a9406c513ba4e1ba0c6..695db46d2cb166aa76427b274747251d1de0d483 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1,6 +1,11 @@ <?php // $Id$ +function taxonomy_system($field){ + $system["description"] = t("Enables the organization of content into categories and subcategories."); + return $system[$field]; +} + function taxonomy_feed() { global $id, $or, $and, $type; diff --git a/modules/tracker.module b/modules/tracker.module index b88df8ed7eaa2ebcfc099796285680a26bf27394..5335b2e6df05f207ae58022b771f8d63c8d24fb9 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -6,6 +6,11 @@ function tracker_help() { return $output; } +function tracker_system($field){ + $system["description"] = t("Enables tracking of recent and new comments for site readers."); + return $system[$field]; +} + function tracker_link($type) { if ($type == "menu.view" && user_access("access comments")) { diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index b88df8ed7eaa2ebcfc099796285680a26bf27394..5335b2e6df05f207ae58022b771f8d63c8d24fb9 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -6,6 +6,11 @@ function tracker_help() { return $output; } +function tracker_system($field){ + $system["description"] = t("Enables tracking of recent and new comments for site readers."); + return $system[$field]; +} + function tracker_link($type) { if ($type == "menu.view" && user_access("access comments")) { diff --git a/modules/user.module b/modules/user.module index d68b170cf308ba70c965056607858ea83e339fe2..c3f869ca2dad0fb33ddcc352abc9b72a0dce4fdd 100644 --- a/modules/user.module +++ b/modules/user.module @@ -4,6 +4,11 @@ session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc"); session_start(); +function user_system($field){ + $system["description"] = t("Enables a user registration system."); + return $system[$field]; +} + /*** Session functions *****************************************************/ function sess_open($save_path, $session_name) { @@ -709,7 +714,7 @@ function user_login($edit = array(), $msg = "") { ** When possible, determine corrosponding external auth source. Invoke source, and login user if successful: */ - if (!$user && $server && $result = user_get_authmaps("$name@$server")) { + if (!$user && $server && $result = user_get_authmaps("$name@$server")) { if (module_invoke(key($result), "auth", $name, $pass, $server)) { $user = user_external_load("$name@$server"); watchdog("user", "external load: $name@$server, module: " . key($result)); diff --git a/modules/user/user.module b/modules/user/user.module index d68b170cf308ba70c965056607858ea83e339fe2..c3f869ca2dad0fb33ddcc352abc9b72a0dce4fdd 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -4,6 +4,11 @@ session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc"); session_start(); +function user_system($field){ + $system["description"] = t("Enables a user registration system."); + return $system[$field]; +} + /*** Session functions *****************************************************/ function sess_open($save_path, $session_name) { @@ -709,7 +714,7 @@ function user_login($edit = array(), $msg = "") { ** When possible, determine corrosponding external auth source. Invoke source, and login user if successful: */ - if (!$user && $server && $result = user_get_authmaps("$name@$server")) { + if (!$user && $server && $result = user_get_authmaps("$name@$server")) { if (module_invoke(key($result), "auth", $name, $pass, $server)) { $user = user_external_load("$name@$server"); watchdog("user", "external load: $name@$server, module: " . key($result)); diff --git a/modules/watchdog.module b/modules/watchdog.module index 545dd32af4a7596654e025342c08f9861affc4c1..d4e7b654e4b798cc10cc2e98e99ff6dfe67a2eb5 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -8,6 +8,11 @@ function watchdog_help() { <?php } +function watchdog_system($field){ + $system["description"] = t("Logs and records system events."); + return $system[$field]; +} + function watchdog_perm() { return array("administer watchdog"); } diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 545dd32af4a7596654e025342c08f9861affc4c1..d4e7b654e4b798cc10cc2e98e99ff6dfe67a2eb5 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -8,6 +8,11 @@ function watchdog_help() { <?php } +function watchdog_system($field){ + $system["description"] = t("Logs and records system events."); + return $system[$field]; +} + function watchdog_perm() { return array("administer watchdog"); } diff --git a/modules/weblogs.module b/modules/weblogs.module index ebd7671c639770b30ef5938a5ea942160e26c8dd..e62e3936a34a8056e3245337467735079d012cb8 100644 --- a/modules/weblogs.module +++ b/modules/weblogs.module @@ -12,6 +12,11 @@ function weblogs_help() { return $output; } +function weblogs_system($field){ + $system["description"] = t("Alerts weblogs.com that your site has updated."); + return $system[$field]; +} + function weblogs_cron() { if (variable_get("weblogs_ping", 0) && variable_get("site_name", 0) && variable_get("site_slogan", 0)) { diff --git a/update.php b/update.php index 8f80729de7c5bd4559252320ba70fdd3a3080e39..134c6e6414038aab5e7f644f12e3d575e644390f 100644 --- a/update.php +++ b/update.php @@ -82,7 +82,7 @@ function update_2() { $output .= "$name ..."; db_query("DROP TABLE IF EXISTS ". $name ."_seq"); db_query("CREATE TABLE ". $name ."_seq (id INTEGER UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY(id))"); - $result = db_query("SELECT MAX(". ($name == "node" ? "nid" : "lid") .") FROM $name", 1); + $result = db_query("SELECT MAX(". ($name == "node" ? "nid" : "lid") .") FROM $name"); $count = $result ? db_result($result, 0) : 0; db_query("INSERT INTO ". $name ."_seq (id) VALUES ('$count')"); $output .= "done ($count)<br />"; @@ -333,7 +333,7 @@ function update_24() { update_sql("ALTER TABLE site ADD refresh int(11) NOT NULL;"); update_sql("ALTER TABLE site ADD threshold int(11) NOT NULL;"); update_sql("UPDATE site SET refresh = '7200';"); - update_sql("UPDATE site SET threshold = '50';"); + update_sql("UPDATE site SET threshold = '60';"); } function update_25() { @@ -471,9 +471,9 @@ function update_31() { } // Clean up meta tag system -/* update_sql("DROP TABLE collection"); + update_sql("DROP TABLE collection"); update_sql("DROP TABLE tag"); - update_sql("ALTER TABLE node DROP attributes");*/ + update_sql("ALTER TABLE node DROP attributes"); } function update_upgrade3() { @@ -605,8 +605,7 @@ function update_info() { print "<ol>\n"; print "<li><p>Before doing anything backup your database. This process will change your database and its values, and some things might get lost.</p></li>\n"; print "<li><p>Don't run this script twice as it will cause some serious problems!</p></li>\n"; - print "<li><p><b>Backup your database.</b> If you haven't done it by now don't blame anyone if by some statistical anomaly things blow up and you loose all data.</p></li>\n"; - print "<li>These queries have to be run manually:<br />\n"; + print "<li>Before doing anything else these queries have to be run manually:<br />\n"; print "<pre>\n"; print "ALTER TABLE watchdog CHANGE user uid int(10) DEFAULT '0' NOT NULL;\n"; print "ALTER TABLE watchdog CHANGE id wid int(5) DEFAULT '0' NOT NULL auto_increment;\n"; @@ -620,21 +619,24 @@ function update_info() { print "ALTER TABLE users ADD rid INT UNSIGNED NOT NULL;\n"; print "</pre></li>\n"; print "<li><p>You might have to by-pass the access check near the bottom of the file called update.php such that you can gain access to the updates: search for <i>user_access()</i>.</p></li>"; - print "<li><p>Choose one of the links below to either upgrade from Drupal 3.x or update from a CVS checkout.<br />» upgrading will by default enable the standard Drupal themes and modules as well as setting some default values.<br />» updating will require modules and themes enabled manually under <i>Administer | Site configuration | modules</i>.</p></li>"; + print "<li><p>"; + print "Choose one of the links below to either upgrade from Drupal 3.x or update from a CVS checkout.<br />"; + print "» upgrading will by default enable the standard Drupal themes and modules as well as setting some default values.<br />"; + print "» updating will require modules and themes enabled manually under <i>Administer | Site configuration | modules</i>.<br />"; + print "<p><b>» <a href=\"update.php?op=upgrade3\">Upgrade 3.x to 4.0.0</a></b></p>\n"; + print "<p><b>» <a href=\"update.php?op=update\">Update CVS database</a></b></p>\n"; + print "<p>Once you are done remove or disable access to update.php so nobody else can tamper with the database.</p>\n"; + print "</p></li>"; print "<li><p>Go through the various administration pages to change the existing and new settings to your liking.</p></li>\n"; - print "<li><p>Remove or disable access to update.php so nobody else can tamper with the database.</p></li>\n"; print "<li><p>Thanks for using Drupal!</p></li>\n"; print "</ol>"; - print "<p><b>» <a href=\"update.php?op=upgrade3\">Upgrade 3.x to 4.0.0</a></b></p>\n"; - print "<p><b>» <a href=\"update.php?op=update\">Update CVS database</a></b></p>\n"; print "</html>"; } -// Security check: - if ($op) { include_once "includes/common.inc"; - if (user_access(NULL)) { + // Security check: + if (user_access(NULL) || variable_get("update_start", 0) == 0) { update_page(); } else {