Index: version.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/version/version.module,v
retrieving revision 1.5
diff -u -F^f -r1.5 version.module
--- version.module	23 May 2006 10:22:18 -0000	1.5
+++ version.module	6 Jul 2006 04:43:33 -0000
@@ -1,5 +1,5 @@
 <?php
- 
+
 /**
 * Implementation of hook_init().
 */
@@ -13,7 +13,7 @@ function version_init() {
 function version_help($section) {
   switch ($section) {
     case 'admin/modules#description':
-      return t('List hte $id line of each file of your drupal system.');
+      return t('List the $id line of each file of your drupal system.');
       case 'admin/help#version':
       return t('<p>This module list the first Id line of any file of your drupal installation. If you add a second id line for your patched files use a regular expression
       to get it listed also.</p>
@@ -32,7 +32,6 @@ function version_perm() {
   return array('view list');
 }
 
-
 /**
  * Implementation of hook_access().
  */
@@ -57,7 +56,6 @@ function version_menu($may_cache) {
       'access' => user_access('view list'),
       'callback' => 'version_list');
   }
-
   return $items;
 }
 
@@ -65,29 +63,38 @@ function version_menu($may_cache) {
 * Implemetation of hook_settings()
 */
 function version_settings() {
-
-  $output .= form_textfield(t('Extension filter'), 'version_extension_filter',
-    variable_get('version_extension_filter', 'php|module|inc'), 50, 255,
-    t('Regular expression to restrict the search of files to some extensions only. Default value restricts to files with extensions .php, . module and .inc'));
-  $output .= form_textfield(t('Exclusion filter'), 'version_exclusion_filter',
-    variable_get('version_exclusion_filter', ''), 50, 255,
-    t('Regular expression to exclude files and folders.'));
-  $output .= form_textfield(t('Extra id line'), 'version_extra_id_line',
-    variable_get('version_extra_id_line', ''), 50, 255,
-    t('Regular expression of any extra id line you might use with your files. This line should be right next to the drupal one which begins with &#39;// $Id:&#39;.'));
-  return $output;
- 
-
+  $form['version_extension_filter'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Extension filter'),
+    '#default_value' => variable_get('version_extension_filter', 'php|module|inc'),
+    '#size' => 50,
+    '#maxlength' => 255,
+    '#description' => t('Regular expression to restrict the search of files to some extensions only. Default value restricts to files with extensions .php, . module and .inc'),
+  );
+  $form['version_exclusion_filter'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Exclusion filter'),
+    '#default_value' => variable_get('version_exclusion_filter', ''),
+    '#size' => 50,
+    '#maxlength' => 255,
+    '#description' => t('Regular expression to exclude files and folders.'),
+  );
+  $form['version_extra_id_line'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Extra id line'),
+    '#default_value' => variable_get('version_extra_id_line', ''),
+    '#size' => 50,
+    '#maxlength' => 255,
+    '#description' => t('Regular expression of any extra id line you might use with your files. This line should be right next to the drupal one which begins with &#39;// $Id:&#39;.'),
+  );
+  return $form;
 }
 
-
 function version_list() {
-
-  
   $oDir = new CDir();
 
   $oDir->Read( './', "(" . variable_get('version_extension_filter', '') . ")\$", true, true, false, '', variable_get('version_exclusion_filter', 'CVS') );
- 
+
   // Sort entries descending by fullname
   $oDir->Sort( 'Fullname', true );
 
@@ -107,8 +114,8 @@ function version_list() {
       $line2 = $file->searchInLine($id_line2);
       //var_dump($id_line2);die;
     }
-    
-    if ($line[1]!='') { 
+
+    if ($line[1]!='') {
       $ver = substr(strstr($line[1], ',v '), 2);
 
       $rows[] = array($sFullname, $ver);
@@ -120,8 +127,6 @@ function version_list() {
   }
   $output = theme('table', $headers, $rows);
   print theme('page', $output);
-  
 }
 
-
-?>
\ No newline at end of file
+?>
