? .maxlength.module.swp
? maxlength_version6.patch
Index: maxlength.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/maxlength/maxlength.inc,v
retrieving revision 1.4
diff -u -p -r1.4 maxlength.inc
--- maxlength.inc	3 Sep 2007 23:49:38 -0000	1.4
+++ maxlength.inc	27 Sep 2008 16:42:45 -0000
@@ -1,10 +1,2 @@
 <?php
 // $Id: maxlength.inc,v 1.4 2007/09/03 23:49:38 mariuss Exp $
-
-// Content types that limit body field
-define('MAXLENGTH_NODE_TYPE', 'maxlength_');
-
-// Permissions
-define('ADMINISTER_MAXLENGTH', 'administer maxlength');
-
-?>
\ No newline at end of file
Index: maxlength.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/maxlength/maxlength.info,v
retrieving revision 1.2
diff -u -p -r1.2 maxlength.info
--- maxlength.info	18 Jun 2007 22:53:49 -0000	1.2
+++ maxlength.info	27 Sep 2008 16:42:45 -0000
@@ -2,3 +2,4 @@
 
 name = "Maxlength"
 description = "Set a maximum length for body fileds."
+core = 6.x
Index: maxlength.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/maxlength/maxlength.module,v
retrieving revision 1.11
diff -u -p -r1.11 maxlength.module
--- maxlength.module	20 Oct 2007 20:53:02 -0000	1.11
+++ maxlength.module	27 Sep 2008 16:42:46 -0000
@@ -1,14 +1,22 @@
 <?php
 // $Id: maxlength.module,v 1.11 2007/10/20 20:53:02 mariuss Exp $
 
-require_once 'maxlength.inc';
+// Content types that limit body field
+define('MAXLENGTH_NODE_TYPE', 'maxlength_');
 
-// hook_perm
+// Permissions
+define('ADMINISTER_MAXLENGTH', 'administer maxlength');
+
+/**
+ * Implemenation of hook_perm().
+ */
 function maxlength_perm() {
   return array(ADMINISTER_MAXLENGTH);
 }
 
-// hook_help
+/**
+ * Implemenation of hook_help().
+ */
 function maxlength_help($section) {
   switch ($section) {
     case 'admin/help#maxlength':
@@ -18,23 +26,18 @@ function maxlength_help($section) {
   }
 }
 
-// hook_menu
-function maxlength_menu($may_cache) {
-  $items = array();
-    
-  if ($may_cache) {
-  }
-  else {
-    $items[] = array(
-      'path' => 'admin/settings/maxlength',
-      'title' => t('Maxlength'),
-      'description' => t('Set maximum length for body fields.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => '_maxlength_admin_settings',
-      'access' => user_access(ADMINISTER_MAXLENGTH),
-      'type' => MENU_NORMAL_ITEM,
-    );
-  }
+/**
+ * Implemenation of hook_menu().
+ */
+function maxlength_menu() {
+  $items['admin/settings/maxlength'] = array(
+    'title' => t('Maxlength'),
+    'description' => t('Set maximum length for body fields.'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('_maxlength_admin_settings'),
+    'access arguments' => array(ADMINISTER_MAXLENGTH),
+    'type' => MENU_NORMAL_ITEM,
+  );
     
   return $items;
 }
@@ -76,7 +79,9 @@ function _maxlength_admin_settings() {
   return system_settings_form($form);
 }
 
-// hook_elements
+/**
+ * Implemenation of hook_elements().
+ */
 function maxlength_elements() {
   $type = array();
   
@@ -106,7 +111,18 @@ function _maxlength_limit_body() {
   
   return FALSE;
 }
-
+/**
+ * Implementation of hook_theme().
+ */ 
+function maxlength_theme(){
+  return array(
+    'maxlength_textarea' => array(
+      'arguments' => array(
+        'element' => array()
+      ),
+    ),
+  );
+}
 function theme_maxlength_textarea($element) {
   $prefix = '';
   
@@ -155,8 +171,10 @@ function _maxlength_node_type_from_id($n
   return $node->type;
 }
 
-// hook_form_alter
-function maxlength_form_alter($form_id, &$form) {
+/**
+ * Implemenation of hook_form_alter().
+ */
+function maxlength_form_alter(&$form, $form_state, $form_id) {
   if (isset($form['type'])) {
     $type = $form['type']['#value'];
     if ( $type . '_node_form' == $form_id) {
@@ -180,7 +198,9 @@ function maxlength_form_alter($form_id, 
   }
 }
 
-// hook_nodeapi
+/**
+ * Implemenation of hook_nodeapi().
+ */
 function maxlength_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
   $code = MAXLENGTH_NODE_TYPE . $node->type;
   
@@ -200,7 +220,9 @@ function maxlength_nodeapi(&$node, $op, 
   }
 }
 
-// hook_node_type
+/**
+ * Implemenation of hook_node_type().
+ */
 function maxlength_node_type($op, $info) {
   switch ($op) {
     case 'delete':
@@ -229,5 +251,3 @@ function maxlength_node_type($op, $info)
       break;
   }
 }
-
-?>
