? .bzr
? diff.diff
? image_captcha_font_select.module.patch
? image_captcha/fonts-
? image_captcha/image_captcha.module-edit
Index: captcha.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/Attic/captcha.install,v
retrieving revision 1.1.4.4
diff -u -u -p -r1.1.4.4 captcha.install
--- captcha.install	24 Jul 2007 00:45:39 -0000	1.1.4.4
+++ captcha.install	19 Sep 2007 16:53:56 -0000
@@ -35,11 +35,12 @@ function captcha_install() {
     // insert some defaults
     $form_ids = array('comment_form', 'contact_mail_user', 'contact_mail_page',
       'user_register', 'user_pass', 'user_login', 'user_login_block');
-    foreach($form_ids as $form_id) {
+    foreach ($form_ids as $form_id) {
       db_query("INSERT INTO {captcha_points} (form_id, module, type) VALUES ('%s', NULL, NULL)", $form_id);
     }
     drupal_set_message(t('The installation of the captcha_points table and some default entries was successful'), 'status');
-  } else {
+  }
+  else {
     drupal_set_message(t('The installation of the captcha module failed'), 'error');
   }
 }
@@ -80,7 +81,7 @@ function captcha_update_1() {
     // insert some defaults
     $form_ids = array('comment_form', 'contact_mail_user', 'contact_mail_page',
       'user_register', 'user_pass');
-    foreach($form_ids as $form_id) {
+    foreach ($form_ids as $form_id) {
       $items[] = update_sql("INSERT INTO {captcha_points} (form_id, module, type) VALUES ('$form_id', NULL, NULL)");
     }
   }
@@ -94,7 +95,7 @@ function captcha_update_2() {
   $items = array();
   // insert some defaults
   $form_ids = array('user_login', 'user_login_block');
-  foreach($form_ids as $form_id) {
+  foreach ($form_ids as $form_id) {
     $items[] = update_sql("INSERT INTO {captcha_points} (form_id, module, type) VALUES ('$form_id', NULL, NULL)");
   }
   return $items;
Index: captcha.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/captcha.module,v
retrieving revision 1.42.2.32
diff -u -u -p -r1.42.2.32 captcha.module
--- captcha.module	19 Sep 2007 15:31:27 -0000	1.42.2.32
+++ captcha.module	19 Sep 2007 16:53:57 -0000
@@ -99,12 +99,12 @@ function captcha_perm() {
  * challenge and $challenge the name of the challenge type.
  * (It also includes a 'none' => 'none' option)
  */
-function _captcha_available_challenge_types(){
+function _captcha_available_challenge_types() {
   $captcha_challenges['none'] = 'none';
-  foreach(module_implements('captcha') as $module) {
+  foreach (module_implements('captcha') as $module) {
     $result = call_user_func_array($module .'_captcha', 'list');
     if (is_array($result)) {
-      foreach($result as $challenge) {
+      foreach ($result as $challenge) {
         $captcha_challenges["$module/$challenge"] = "$challenge ($module)";
       }
     }
@@ -145,13 +145,13 @@ function captcha_admin($form_id='', $op=
       case 'disable':
         // disable the captcha for the form: set the module and type to NULL
         db_query("UPDATE {captcha_points} SET module = NULL, type = NULL WHERE form_id = '%s'", $form_id);
-        drupal_set_message(t('Disabled captcha for form %form_id.', array('%form_id'=>$form_id)));
+        drupal_set_message(t('Disabled captcha for form %form_id.', array('%form_id' => $form_id)));
         // goto the captcha adminstration or alternative destination if present in URI
         drupal_goto('admin/user/captcha');
         break;
       case 'delete':
         db_query("DELETE FROM {captcha_points} WHERE form_id = '%s'", $form_id);
-        drupal_set_message(t('Deleted captcha for form %form_id.', array('%form_id'=>$form_id)));
+        drupal_set_message(t('Deleted captcha for form %form_id.', array('%form_id' => $form_id)));
         // goto the captcha adminstration or alternative destination if present in URI
         drupal_goto('admin/user/captcha');
         break;
@@ -225,7 +225,7 @@ function captcha_admin_settings() {
     foreach ($langs['name'] as $lang_code => $lang_name) {
       $form['captcha_descriptions']["captcha_description_$lang_code"] = array(
         '#type' => 'textfield',
-        '#title' => t('Captcha description for %lang_name (locale %lang_code)', array('%lang_name'=>$lang_name, '%lang_code'=>$lang_code)),
+        '#title' => t('Captcha description for %lang_name (locale %lang_code)', array('%lang_name' => $lang_name, '%lang_code' => $lang_code)),
         '#default_value' => _captcha_get_description($lang_code),
         '#maxlength' => 256,
       );
@@ -321,7 +321,7 @@ function captcha_captcha_point_settings_
     // select widget for captcha type
     $form['captcha_type'] = array(
       '#type' => 'select',
-      '#title' => t('Select the CAPTCHA for @form_id', array('@form_id'=>$form_id)),
+      '#title' => t('Select the CAPTCHA for @form_id', array('@form_id' => $form_id)),
       '#default_value' => "{$captcha_point->module}/{$captcha_point->type}",
       '#options' => _captcha_available_challenge_types(),
     );
@@ -339,7 +339,7 @@ function captcha_captcha_point_settings_
   }
   else {
     // illegal form_id
-    drupal_set_message(t('Unavailable form_id %form_id ', array('%form_id'=>$form_id)), 'error');
+    drupal_set_message(t('Unavailable form_id %form_id ', array('%form_id' => $form_id)), 'error');
     // goto the captcha adminstration or alternative destination if present in URI
     drupal_goto('admin/user/captcha');
   }
@@ -412,7 +412,7 @@ function captcha_form_alter($form_id, &$
       //The selected module returned nothing, maybe it is disabled or it's wrong, we should watchdog that and then quit.
       watchdog('captcha',
         t('Captcha problem: hook_captcha() of module %module returned nothing when trying to retrieve captcha type %type for form %form_id.',
-          array('%type' => $captcha_point->type, '%module' => $captcha_point->module, '%form_id'=> $form_id)),
+          array('%type' => $captcha_point->type, '%module' => $captcha_point->module, '%form_id' => $form_id)),
         WATCHDOG_ERROR);
       return;
     }
@@ -442,7 +442,7 @@ function captcha_form_alter($form_id, &$
     // in a new (POST) request. Consequently the right captcha solution would be
     // overwritten just before validation. The pre_render functions are not run
     // before validation and are the right place to store the solution in $_SESSION.
-    $form['captcha']['captcha_solution'] = array (
+    $form['captcha']['captcha_solution'] = array(
       '#type' => 'value',
       '#value' => $captcha['solution'],
     );
@@ -452,7 +452,7 @@ function captcha_form_alter($form_id, &$
     // couple of times before submitting them. The solution of the captcha of
     // each of these form instances will be stored at the pre_render phase in
     // $_SESSION['captcha'][$form_id][$captcha_token]
-    $form['captcha']['captcha_token'] = array (
+    $form['captcha']['captcha_token'] = array(
       '#type' => 'hidden',
       '#value' => md5(mt_rand()),
     );
@@ -592,7 +592,7 @@ function captcha_pre_render($form_id, &$
 function captcha_pre_render_place_captcha($form_id, &$form) {
   // search the weights of the buttons in the form
   $button_weights = array();
-  foreach(element_children($form) as $key) {
+  foreach (element_children($form) as $key) {
     if ($form[$key]['#type'] == 'submit' || $form[$key]['#type'] == 'button') {
       $button_weights[] = $form[$key]['#weight'];
     }
@@ -630,10 +630,10 @@ function captcha_examples($module=NULL, 
   else {
     // generate a list with examples of the available challenges
     $output = t('This page gives an overview of all available captcha types, generated with their current settings.');
-    foreach(module_implements('captcha') as $module) {
+    foreach (module_implements('captcha') as $module) {
       $challenges = call_user_func_array($module .'_captcha', 'list');
       if ($challenges) {
-        foreach($challenges as $challenge) {
+        foreach ($challenges as $challenge) {
           // generate captcha challenge
           $captcha = call_user_func_array($module .'_captcha', array('generate', $challenge));
           // build form
@@ -662,7 +662,7 @@ function captcha_examples($module=NULL, 
  * Default implementation of hook_captcha
  */
 function captcha_captcha($op, $captcha_type='') {
-  switch($op) {
+  switch ($op) {
     case 'list':
       return array('Math');
     case 'generate':
@@ -672,7 +672,7 @@ function captcha_captcha($op, $captcha_t
         $x = mt_rand(1, $answer);
         $y = $answer - $x;
         $result['solution'] = "$answer";
-        $result['form']['captcha_response'] = array (
+        $result['form']['captcha_response'] = array(
           '#type' => 'textfield',
           '#title' => t('Math Question'),
           '#description' => t('Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.'),
Index: captcha_api.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/Attic/captcha_api.txt,v
retrieving revision 1.1.4.5
diff -u -u -p -r1.1.4.5 captcha_api.txt
--- captcha_api.txt	17 Aug 2007 18:43:13 -0000	1.1.4.5
+++ captcha_api.txt	19 Sep 2007 16:53:57 -0000
@@ -28,14 +28,14 @@ enter "foo" in a textfield.
  * Implementation of hook_captcha().
  */
 function foo_captcha_captcha($op, $captcha_type='') {
-  switch($op) {
+  switch ($op) {
     case 'list':
       return array("Foo captcha");
     case 'generate':
       if ($captcha_type == "Foo captcha") {
         $captcha = array();
         $captcha['solution'] = 'foo';
-        $captcha['form']['captcha_response'] = array (
+        $captcha['form']['captcha_response'] = array(
           '#type' => 'textfield',
           '#title' => t('Enter "foo"'),
         );
@@ -116,7 +116,7 @@ For our simple foo captcha module this w
 function foo_captcha_help($section) {
   switch ($section) {
     case 'admin/user/captcha/foo_captcha':
-      return '<p>' . t('This is a very simple captcha, which requires users to enter "foo" in a textfield.') . '</p>';
+      return '<p>'. t('This is a very simple captcha, which requires users to enter "foo" in a textfield.') .'</p>';
   }
   return $output;
 }
