--- C:/Users/zmove/Desktop/wordfilter/wordfilter.install	Wed May 21 07:41:02 2008
+++ D:/Taf/Kalys/drupal6/sites/all/modules/wordfilter/wordfilter.install	Tue Jun 03 14:20:03 2008
@@ -1,80 +1,95 @@
-<?php
-// $Id: wordfilter.install,v 1.4.2.1.2.2 2008/05/21 05:41:02 jaydub Exp $
-
-/**
- * Implementation of hook_schema().
- */
-function wordfilter_schema() {
-  $schema['wordfilter'] = array(
-    'description' => t('The {wordfilter} table stores user ids of users and other users that they have chosen to ignore.'),
-    'fields' => array(
-      'id' => array(
-        'description' => t('The ID of the wordfilter word pair.'),
-        'type' => 'serial',
-        'not null' => TRUE,
-      ),
-      'words' => array(
-        'description' => t('The word to filter.'),
-        'type' => 'text',
-        'not null' => TRUE,
-      ),
-      'replacement' => array(
-        'description' => t('The replacement word to filter with.'),
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-      ),
-      'standalone' => array(
-        'description' => t('A boolean to indicate if the word filtering should only be done if the word is not part of another word.'),
-        'type' => 'int',
-        'size' => 'tiny',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-    ),
-    'primary key' => array('id'),
-  );
-
-  return $schema;
-}
-/**
- * Implementation of hook_install().
- */
-function wordfilter_install() {
-  drupal_install_schema('wordfilter');
-}
-
-/**
- * Implementation of hook_update().
- */
-function wordfilter_update_1() {
-  return _system_update_utf8(array('wordfilter'));
-}
-
-function wordfilter_update_2() {
-  $ret = array();
-  db_change_field($ret, 'wordfilter', 'words', 'words', array('type' => 'text', 'not null' => TRUE));
-  return $ret;
-}
-
-/**
- * Update to lower module weight so that wordfiltering
- * can occur before other modules can run hook_nodeapi
- * and hook_comment
- */
-function wordfilter_update_3() {
-  $ret = array();
-  $ret[] = update_sql("UPDATE {system} SET weight = -1 WHERE name = '%s' AND type = '%s'", 'wordfilter', 'module');
-  return $ret;
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function wordfilter_uninstall() {
-  drupal_uninstall_schema('wordfilter');
-  variable_del('wordfilter_default_replacement');
-  variable_del('wordfilter_node_title');
-  variable_del('wordfilter_comment_title');
-}
+<?php
+// $Id: wordfilter.install,v 1.4.2.1.2.2 2008/05/21 05:41:02 jaydub Exp $
+
+/**
+ * Implementation of hook_schema().
+ */
+function wordfilter_schema() {
+  $schema['wordfilter'] = array(
+    'description' => t('The {wordfilter} table stores user ids of users and other users that they have chosen to ignore.'),
+    'fields' => array(
+      'id' => array(
+        'description' => t('The ID of the wordfilter word pair.'),
+        'type' => 'serial',
+        'not null' => TRUE,
+      ),
+      'language' => array(
+        'description' => t('The language.'),
+        'type' => 'text',
+        'not null' => TRUE,
+      ),
+      'words' => array(
+        'description' => t('The word to filter.'),
+        'type' => 'text',
+        'not null' => TRUE,
+      ),
+      'replacement' => array(
+        'description' => t('The replacement word to filter with.'),
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'standalone' => array(
+        'description' => t('A boolean to indicate if the word filtering should only be done if the word is not part of another word.'),
+        'type' => 'int',
+        'size' => 'tiny',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('id'),
+  );
+
+  return $schema;
+}
+/**
+ * Implementation of hook_install().
+ */
+function wordfilter_install() {
+  drupal_install_schema('wordfilter');
+}
+
+/**
+ * Implementation of hook_update().
+ */
+function wordfilter_update_1() {
+  return _system_update_utf8(array('wordfilter'));
+}
+
+function wordfilter_update_2() {
+  $ret = array();
+  db_change_field($ret, 'wordfilter', 'words', 'words', array('type' => 'text', 'not null' => TRUE));
+  return $ret;
+}
+
+/**
+ * Update to lower module weight so that wordfiltering
+ * can occur before other modules can run hook_nodeapi
+ * and hook_comment
+ */
+function wordfilter_update_3() {
+  $ret = array();
+  $ret[] = update_sql("UPDATE {system} SET weight = -1 WHERE name = '%s' AND type = '%s'", 'wordfilter', 'module');
+  return $ret;
+}
+
+/**
+ * Add language restriction to filters
+ */
+function wordfilter_update_4() {
+  $ret = array();
+  $ret[] = update_sql("ALTER TABLE {wordfilter} ADD language VARCHAR( 12 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `id`");
+  return $ret;
+}
+
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function wordfilter_uninstall() {
+  drupal_uninstall_schema('wordfilter');
+  variable_del('wordfilter_default_replacement');
+  variable_del('wordfilter_node_title');
+  variable_del('wordfilter_comment_title');
+}
