Index: captcha.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/captcha.module,v
retrieving revision 1.42.2.44
diff -u -p -r1.42.2.44 captcha.module
--- captcha.module	15 Feb 2008 16:02:47 -0000	1.42.2.44
+++ captcha.module	4 Mar 2008 07:11:00 -0000
@@ -204,6 +204,12 @@ function captcha_admin_settings() {
     '#default_value' => variable_get('captcha_administration_mode', FALSE),
     '#description' => t('This option is very helpful to enable/disable challenges on forms. When enabled, users with the "%admincaptcha" permission will see CAPTCHA administration links on all forms (except on administrative pages, which shouldn\'t be accessible to untrusted users in the first place). These links make it possible to enable a challenge of the desired type or disable it.', array('%admincaptcha' => 'administer CAPTCHA settings')),
   );
+  $form['captcha_administration_admin_mode'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Also add CAPTCHA administration links to administrative forms'),
+    '#default_value' => variable_get('captcha_administration_admin_mode', FALSE),
+    '#description' => t('If enabled, users with the "%admincaptcha" permission will see CAPTCHA administration links also on forms on administrative pages. Note that these forms shouldn\'t be accessible to untrusted users in the first place. Enabling this option probably makes only sense for public <a href="!demo">demonstrations</a> of a Drupal site.', array('%admincaptcha' => 'administer CAPTCHA settings', '!demo' => 'http://drupal.org/project/demo')),
+  );
   // field set with form_id -> CAPTCHA type configuration
   $form['captcha_types'] = array(
     '#type' => 'fieldset',
@@ -309,6 +315,7 @@ function theme_captcha_admin_settings_ca
 function captcha_admin_settings_submit($form_id, $form_values) {
   if ($form_id == 'captcha_admin_settings') {
     variable_set('captcha_administration_mode', $form_values['captcha_administration_mode']);
+    variable_set('captcha_administration_admin_mode', $form_values['captcha_administration_admin_mode']);
     foreach ($form_values['captcha_types'] as $captcha_point_form_id => $data) {
       if ($data['captcha_type'] == 'none') {
         db_query("UPDATE {captcha_points} SET module = NULL, type = NULL WHERE form_id = '%s'", $captcha_point_form_id);
@@ -508,7 +515,7 @@ function captcha_form_alter($form_id, &$
     $form['captcha']['#validate'] = ((array) $form['captcha']['#validate']) + array('captcha_validate' => array());
 
   }
-  elseif (user_access('administer CAPTCHA settings') && variable_get('captcha_administration_mode', FALSE) && arg(0) != 'admin') {
+  elseif (user_access('administer CAPTCHA settings') && variable_get('captcha_administration_mode', FALSE) && variable_get('captcha_administration_admin_mode', FALSE)) {
     // For administrators: show CAPTCHA info and offer link to configure it
     $result = db_query("SELECT module, type FROM {captcha_points} WHERE form_id = '%s'", $form_id);
     if (!$result) {
