From b8b5956ee085a9b73338bdd62bdfb2ad15c65d1f Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Sat, 8 Apr 2006 18:29:49 +0000 Subject: #54294, don't set callback if ext auth disabled, patch by Markus Petrux --- modules/drupal/drupal.module | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules/drupal') diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index e1566f091..165a47dde 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -52,7 +52,7 @@ print drupal_client_page(); return t('

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 settings page and set the site name, the e-mail address, the slogan, and the mission statement.

', array('%site-settings' => url('admin/settings'))); case 'user/help#drupal': return variable_get('drupal_authentication_service', 0) ? t("

Drupal is the name of the software that powers %this-site. There are Drupal web sites all over the world, and many of them share their registration databases so that users may freely log in to any Drupal site using a single Drupal ID.

-

So please feel free to log in to your account here at %this-site with a username from another Drupal site. The format of a Drupal ID is similar to an e-mail address: username@server. An example of a valid Drupal ID is mwlily@drupal.org.

", array('%Drupal' => 'http://drupal.org', '%this-site' => ''. variable_get('site_name', 'this web site') .'')) : NULL; +

So please feel free to log in to your account here at %this-site with a username from another Drupal site. The format of a Drupal ID is similar to an e-mail address: username@server. An example of a valid Drupal ID is mwlily@drupal.org.

", array('%Drupal' => 'http://drupal.org', '%this-site' => ''. variable_get('site_name', 'this web site') .'')) : ''; } } @@ -330,10 +330,12 @@ function drupal_auth($username, $password, $server) { function drupal_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'drupal', 'title' => t('Drupal'), - 'callback' => 'drupal_page_help', 'access' => TRUE, - 'type' => MENU_SUGGESTED_ITEM - ); + if (variable_get('drupal_authentication_service', 0)) { + $items[] = array('path' => 'drupal', 'title' => t('Drupal'), + 'callback' => 'drupal_page_help', 'access' => TRUE, + 'type' => MENU_SUGGESTED_ITEM + ); + } } return $items; } -- cgit v1.2.3