diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-01-05 20:45:54 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-01-05 20:45:54 +0000 |
commit | 553da403355fd8277f3845829f5818f5a557c370 (patch) | |
tree | 1dca7e34e1cf9583596287d7dc5e429b89efbe32 /modules/drupal.module | |
parent | 0158c920ada762f749971a826996c78a5f27d605 (diff) | |
download | brdo-553da403355fd8277f3845829f5818f5a557c370.tar.gz brdo-553da403355fd8277f3845829f5818f5a557c370.tar.bz2 |
Added checks to the drupal directory option to display an error when the site name, email, slogan or statement aren't filled in.
Diffstat (limited to 'modules/drupal.module')
-rw-r--r-- | modules/drupal.module | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/drupal.module b/modules/drupal.module index 4fa6a6041..5f3bb5ada 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -27,8 +27,18 @@ function drupal_help($section = "admin/help#drupal") { } function drupal_settings() { + // Check if all required fields are present for the Drupal directory + if ((variable_get("site_name", "drupal") == "drupal") || (variable_get("site_name", "drupal") == "")) + $error["drupal_directory"] = theme("error", t("You must set your site's name at the <a href=\"%url\">site configuration</a>.", array("%url" => url("admin/system")))); + else if (variable_get("site_mail", ini_get("sendmail_from")) == "") + $error["drupal_directory"] = theme("error", t("You must set your site's e-mail address at the <a href=\"%url\">site configuration</a>.", array("%url" => url("admin/system")))); + else if (variable_get("site_slogan", "") == "") + $error["drupal_directory"] = theme("error", t("You must set your site's slogan at the <a href=\"%url\">site configuration</a>.", array("%url" => url("admin/system")))); + else if (variable_get("site_mission", "") == "") + $error["drupal_directory"] = theme("error", t("You must set your site's mission at the <a href=\"%url\">site configuration</a>.", array("%url" => url("admin/system")))); + $output = form_textfield(t("Drupal XML-RPC server"), "drupal_server", variable_get("drupal_server", "http://www.drupal.org/xmlrpc.php"), 55, 128, t("The URL of your root Drupal XML-RPC server.")); - $output .= form_radios(t("Drupal directory"), "drupal_directory", variable_get("drupal_directory", 0), array(t("Disabled"), t("Enabled")), t("If enabled, your Drupal site will make itself known to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"%xml-rpc-server\" field is set to \"%drupal-xml-rpc\", your web site will get listed on the %drupal-sites page. Requires the cron feature to be enabled.", array("%xml-rpc-server" => t("Drupal XML-RPC server"), "%drupal-xml-rpc" => "http://www.drupal.org/xmlrpc.php", "%drupal-sites" => "<a href=\"http://www.drupal.org/sites\">".t("Drupal sites")."</a>"))); + $output .= form_radios(t("Drupal directory"), "drupal_directory", variable_get("drupal_directory", 0), array(t("Disabled"), t("Enabled")), t("If enabled, your Drupal site will make itself known to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"%xml-rpc-server\" field is set to \"%drupal-xml-rpc\", your web site will get listed on the %drupal-sites page. Requires the cron feature to be enabled.", array("%xml-rpc-server" => t("Drupal XML-RPC server"), "%drupal-xml-rpc" => "http://www.drupal.org/xmlrpc.php", "%drupal-sites" => "<a href=\"http://www.drupal.org/sites\">".t("Drupal sites")."</a>")) . $error["drupal_directory"]); return $output; } |