Index: modules/captcha/text_captcha/text_captcha.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/text_captcha/text_captcha.info,v
retrieving revision 1.2
diff -u -p -r1.2 text_captcha.info
--- modules/captcha/text_captcha/text_captcha.info	27 Oct 2007 14:44:16 -0000	1.2
+++ modules/captcha/text_captcha/text_captcha.info	30 Dec 2007 04:09:44 -0000
@@ -2,4 +2,6 @@
 name = "Text CAPTCHA"
 description = "Provides a simple text based CAPTCHA."
 package = "Spam control"
-dependencies = captcha
+dependencies[] = captcha
+core = 6.x
+
Index: modules/captcha/text_captcha/text_captcha.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/text_captcha/text_captcha.module,v
retrieving revision 1.2
diff -u -p -r1.2 text_captcha.module
--- modules/captcha/text_captcha/text_captcha.module	27 Oct 2007 14:44:16 -0000	1.2
+++ modules/captcha/text_captcha/text_captcha.module	30 Dec 2007 04:09:44 -0000
@@ -13,29 +13,25 @@ define('TEXT_CAPTCHA_USER_DEFINED_WORD_M
 /**
  * Implementation of hook_help().
  */
-function text_captcha_help($section) {
-  switch ($section) {
+function text_captcha_help($path, $arg) {
+  switch ($path) {
     case 'admin/user/captcha/text_captcha':
       return '<p>'. t('In this challenge the visitor is asked for the n<sup>th</sup> word of a given phrase.') .'</p>';
   }
-  return $output;
 }
 
 /**
  * Implementation of hook_menu().
  */
-function text_captcha_menu($may_cache) {
-  $items = array();
-  if ($may_cache) {
-    // add an administration tab for text_captcha
-    $items[] = array(
-      'path' => 'admin/user/captcha/text_captcha',
-      'title' => t('Text CAPTCHA'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('text_captcha_settings_form'),
-      'type' => MENU_LOCAL_TASK,
+function text_captcha_menu() {
+  $items['admin/user/captcha/text_captcha'] = array(
+   // add an administration tab for text_captcha
+    'title' => 'Text CAPTCHA',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('text_captcha_settings_form'),
+    'type' => MENU_LOCAL_TASK,
     );
-  }
+  
   return $items;
 }
 
@@ -44,6 +40,8 @@ function text_captcha_menu($may_cache) {
  */
 function text_captcha_settings_form() {
   $form = array();
+  $form['#validate'][] ='text_captcha_settings_form_validate';
+
   // radio buttons for selecting the kind of words to use
   $form['text_captcha_words'] = array(
     '#type' => 'radios',
@@ -69,30 +67,29 @@ function text_captcha_settings_form() {
     '#size' => 2,
     '#maxlength' => 2,
   );
+
   return system_settings_form($form);
 }
 
 /**
  * Validate function of the administration form
  */
-function text_captcha_settings_form_validate($form_id, $form_values) {
-  if ($form_id == 'text_captcha_settings_form') {
-    if ($form_values['text_captcha_words'] == TEXT_CAPTCHA_USER_DEFINED_WORDS) {
-      // check if there are at minimum TEXT_CAPTCHA_USER_DEFINED_WORD_MINIMUM user defined words
-      if (count(explode(' ', $form_values['text_captcha_userdefined_words'])) < TEXT_CAPTCHA_USER_DEFINED_WORD_MINIMUM) {
-        form_set_error('text_captcha_userdefined_words',
-          t('You need to enter at least @min words if you want to use user defined words.',
-            array('@min' => TEXT_CAPTCHA_USER_DEFINED_WORD_MINIMUM)
-          )
-        );
-      }
-    }
-    // chech text_captcha_word_quantity
-    $word_quantity = (int) $form_values['text_captcha_word_quantity'];
-    if ($word_quantity < 4 || $word_quantity > 10) {
-      form_set_error('text_captcha_word_quantity', t('Number of words in the phrase should be between 4 and 10.'));
+function text_captcha_settings_form_validate($form, &$form_state) {
+  if ($form_state['values']['text_captcha_words'] == TEXT_CAPTCHA_USER_DEFINED_WORDS) {
+    // check if there are at minimum TEXT_CAPTCHA_USER_DEFINED_WORD_MINIMUM user defined words
+    if (count(explode(' ', $form_state['values']['text_captcha_userdefined_words'])) < TEXT_CAPTCHA_USER_DEFINED_WORD_MINIMUM) {
+      form_set_error('text_captcha_userdefined_words',
+        t('You need to enter at least @min words if you want to use user defined words.',
+          array('@min' => TEXT_CAPTCHA_USER_DEFINED_WORD_MINIMUM)
+        )
+      );
     }
   }
+  // chech text_captcha_word_quantity
+  $word_quantity = (int) $form_state['values']['text_captcha_word_quantity'];
+  if ($word_quantity < 4 || $word_quantity > 10) {
+    form_set_error('text_captcha_word_quantity', t('Number of words in the phrase should be between 4 and 10.'));
+  }
 }
 
 /**
