diff -urp -N favorite_nodes-original/favorite_nodes.info favorite_nodes-new/favorite_nodes.info
--- favorite_nodes-original/favorite_nodes.info	2008-03-14 16:30:08.000000000 +0100
+++ favorite_nodes-new/favorite_nodes.info	2008-06-18 11:28:13.000000000 +0200
@@ -1,10 +1,10 @@
 ; $Id: favorite_nodes.info,v 1.1.2.1 2007/06/18 23:06:42 dww Exp $
 name = Favorite Nodes
 description = Allows users to manage a favorite list of nodes.
-package = 
-
+package = ""
+core = 6.x
 ; Information added by drupal.org packaging script on 2008-03-14
-version = "5.x-1.2"
+version = "6.x-1.x-dev"
 project = "favorite_nodes"
 datestamp = "1205508608"
 
diff -urp -N favorite_nodes-original/favorite_nodes.install favorite_nodes-new/favorite_nodes.install
--- favorite_nodes-original/favorite_nodes.install	2007-11-20 05:29:13.000000000 +0100
+++ favorite_nodes-new/favorite_nodes.install	2008-06-18 11:28:13.000000000 +0200
@@ -1,31 +1,41 @@
 <?php
-// $Id: 
+// $Id:
 
 /**
  * Implementation of hook_install().
  */
 function favorite_nodes_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      $result = db_query("CREATE TABLE {favorite_nodes} (
-          nid     INT NOT NULL,
-          uid     INT NOT NULL,
-          last    INT,
-          PRIMARY KEY (nid, uid)
-          ) Type=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
-        ");
-      break;
-    case 'pgsql':
-      // TODO: need someone to do this on PostgreSQL
-      break;
+  $result = drupal_install_schema('favorite_nodes');
+  if (count($result) > 0) {
+    drupal_set_message(t('favorite node module installed.'));
+  }
+  else {
+    drupal_set_message(t('favorite node table creation failed. Please "uninstall" the module and retry.'));
   }
 }
 
 /**
  * Implementation of hook_uninstall().
+ *
  */
 function favorite_nodes_uninstall() {
-  db_query('DROP TABLE {favorite_nodes}');
-  db_query("DELETE FROM {variable} WHERE name LIKE '%favorite_nodes%'");
+  db_query("DELETE FROM {variable} WHERE name LIKE 'favorite_node%'");
+  drupal_uninstall_schema('favorite_nodes');
+}
+
+/**
+ * Implementation of hook_schema().
+ */
+function favorite_nodes_schema() {
+  $schema['favorite_nodes'] = array(
+      'fields' => array(
+      'nid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'last'    => array('type' => 'int'),
+  ),
+      'primary key' => array('nid' ,'uid')
+  );
+
+  return $schema;
+
 }
diff -urp -N favorite_nodes-original/favorite_nodes.module favorite_nodes-new/favorite_nodes.module
--- favorite_nodes-original/favorite_nodes.module	2008-03-14 16:27:27.000000000 +0100
+++ favorite_nodes-new/favorite_nodes.module	2008-06-18 11:28:13.000000000 +0200
@@ -1,6 +1,14 @@
 <?php
 // $Id: favorite_nodes.module,v 1.5.2.7 2008/03/14 15:27:27 kbahey Exp $
 
+/**
+ * @file
+ * Favorite node module
+ *
+ * This module allows users to add certain nodes to a favorite list. Each node has an "add to favorites" link at the bottom.
+ * This favorite list is visible to others viewing the site.
+ */
+
 define('FAVORITE_NODES_NODE_TYPE',       'favorite_nodes_node_type_');
 define('FAVORITE_NODES_PERM_ADD',        'create favorite nodes');
 define('FAVORITE_NODES_PERM_VIEW',       'view favorite nodes');
@@ -16,8 +24,8 @@ define('FAVORITE_NODES_MENUS',          
 /**
  * Implementation of hook_help().
  */
-function favorite_nodes_help($section) {
-  switch ($section) {
+function favorite_nodes_help($path, $arg) {
+  switch ($path) {
     case 'admin/help#favorite_nodes':
     case 'admin/modules#description':
       return t('Allows users to manage a favorite list of nodes.');
@@ -31,62 +39,53 @@ function favorite_nodes_perm() {
 /**
  * Implementation of hook_menu().
  */
-function favorite_nodes_menu($may_cache) {
+function favorite_nodes_menu() {
   global $user;
   $items = array();
 
-  if ($may_cache) {
-    $items[] = array(
+  $items['admin/settings/favorite_nodes'] = array(
       'title'              => 'Favorite nodes',
-      'path'               => 'admin/settings/favorite_nodes',
       'description'        => 'Settings for favorite nodes',
-      'callback'           => 'drupal_get_form',
-      'callback arguments' => 'favorite_nodes_settings',
+      'page callback'      => 'drupal_get_form',
+      'page arguments' => array('favorite_nodes_settings'),
       'type'               => MENU_NORMAL_ITEM,
-      'access'             => user_access(FAVORITE_NODES_PERM_ADMINISTER),
-    );
+      'access arguments' => array(FAVORITE_NODES_PERM_ADMINISTER),
+  );
 
-    $items[] = array(
-      'path'     => 'favorite_nodes/add',
-      'callback' => 'favorite_nodes_add_page',
+  $items['favorite_nodes/add'] = array(
+      'page callback' => 'favorite_nodes_add_page',
       'type'     => MENU_CALLBACK,
-      'access'   => user_access(FAVORITE_NODES_PERM_ADD),
-    );
+      'access arguments' => array(FAVORITE_NODES_PERM_ADD),
+  );
 
-    $items[] = array(
-      'path'     => 'favorite_nodes/delete',
-      'callback' => 'favorite_nodes_delete_page',
+  $items['favorite_nodes/delete'] = array(
+      'page callback' => 'favorite_nodes_delete_page',
       'type'     => MENU_CALLBACK,
-      'access'   => user_access(FAVORITE_NODES_PERM_ADD),
-    );
- 
-    $items[] = array(
-      'path'     => 'favorite_nodes/view',
-      'callback' => 'favorite_nodes_view_page',
-      'title'    => t('Favorites'),
+      'access arguments' => array(FAVORITE_NODES_PERM_ADD),
+  );
+
+  $items['favorite_nodes/view'] = array(
+      'page callback' => 'favorite_nodes_view_page',
+      'title'    => 'Favorites',
       'type'     => MENU_CALLBACK,
-      'access'   => user_access(FAVORITE_NODES_PERM_VIEW),
-    );
+      'access arguments' => array(FAVORITE_NODES_PERM_VIEW),
+  );
 
-    $items[] = array(
-      'path'     => 'favorites/view',
-      'callback' => 'favorite_nodes_view_page',
+  $items['favorites/view'] = array(
+      'page callback' => 'favorite_nodes_view_page',
       'type'     => MENU_CALLBACK,
-      'access'   => user_access(FAVORITE_NODES_PERM_VIEW),
-    );
-  }
-  else {
-    if ($user->uid && variable_get(FAVORITE_NODES_MENUS, 0)) {
-      foreach (_node_types_natcasesort() as $type) {
-        if (variable_get(FAVORITE_NODES_NODE_TYPE . $type->type, 0)) {
-          $items[] = array(
-            'path'     => "favorites/view/$user->uid/$type->type",
-            'title'    => t('Favorite @type', array('@type' => $type->name)),
-            'callback' => 'favorite_nodes_view_page',
+      'access arguments' => array(FAVORITE_NODES_PERM_VIEW),
+  );
+
+  if ($user->uid && variable_get(FAVORITE_NODES_MENUS, 0)) {
+    foreach (_node_types_natcasesort() as $type) {
+      if (variable_get(FAVORITE_NODES_NODE_TYPE . $type->type, 0)) {
+        $items["favorites/view/$user->uid/$type->type"] = array(
+            'title'    => 'Favorite @type', array('@type' => $type->name),
+            'page callback' => 'favorite_nodes_view_page',
             'type'     => MENU_NORMAL_ITEM,
-            'access'   => user_access(FAVORITE_NODES_PERM_VIEW),
-          );
-        }
+            'access arguments' => array(FAVORITE_NODES_PERM_VIEW),
+        );
       }
     }
   }
@@ -94,6 +93,19 @@ function favorite_nodes_menu($may_cache)
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function favorite_nodes_theme() {
+  return array(
+'favorite_nodes_view_table' => array(
+'arguments' => array('list' => array(), 'uid' => NULL, 'type' => NULL),
+  ),
+'favorite_nodes_view_teasers' => array(
+'arguments' => array('list' => array(), 'uid' => NULL, 'type' => NULL),
+  )
+  );
+}
+/**
  * Implementation of hook_xmlrpc().
  */
 function favorite_nodes_xmlrpc() {
@@ -102,14 +114,14 @@ function favorite_nodes_xmlrpc() {
   $items[] = array(
     'favorite_nodes.add',
     'favorite_nodes_add',
-    array('boolean', 'int'),
-    t('Add a favorite node to the current user\'s list.')
+  array('boolean', 'int'),
+  t('Add a favorite node to the current user\'s list.')
   );
 }
 
 function _node_types_natcasesort() {
   static $node_types;
-  
+
   if (!isset($node_types)) {
     $node_types = node_get_types();
     uasort($node_types, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);'));
@@ -121,8 +133,14 @@ function _node_types_natcasesort() {
  * Implementation of hook_user().
  */
 function favorite_nodes_user($op, &$edit, &$user, $category = null) {
+
   switch ($op) {
     case 'view':
+      $user->content['faveliste'] = array(
+          '#type' => 'user_profile_category',
+          '#title' => t('My favorites'),
+          '#value' => theme('item_list', $items),
+      );
       $fav_list = array();
       foreach (_node_types_natcasesort() as $type) {
         if (variable_get(FAVORITE_NODES_NODE_TYPE . $type->type, 0)) {
@@ -133,14 +151,14 @@ function favorite_nodes_user($op, &$edit
             foreach ($favorites as $favorite) {
               $items[] = l($favorite->title, "node/$favorite->nid");
             }
-          }
-          $fav_list[] = array(
-          'title' => l($type->name, "favorite_nodes/view/$user->uid/$type->type"),
-          'value' => theme('item_list', $items),
+          $user->content['faveliste'][$type->name] = array(
+          '#type' => 'user_profile_item',
+          '#title' => l($type->name, "favorite_nodes/view/$user->uid/$type->type"),
+          '#value' => theme('item_list', $items),
           );
+          }
         }
       }
-      return array(t('Favorites') => $fav_list);
       break;
 
     case 'delete':
@@ -168,7 +186,7 @@ function favorite_nodes_block($op = 'lis
   global $user;
 
   $node_types = _node_types_natcasesort();
-  
+
   switch ($op) {
     case 'list':
       return array(array('info' => t('Favorite nodes')));
@@ -293,6 +311,7 @@ function favorite_nodes_settings() {
     '#collapsible' => true,
     '#collapsed' => false,
   );
+
   $form[$set][FAVORITE_NODES_PAGE_LIMIT] = array(
     '#type' => 'textfield',
     '#title' => t('Favorite Nodes Page Limit'),
@@ -311,7 +330,7 @@ function favorite_nodes_settings() {
     '#options' => array(
       'table' => 'Table',
       'teasers' => 'Teasers',
-    ),
+  ),
     '#default_value' => variable_get(FAVORITE_NODES_PAGE_TYPE, 'table'),
     '#description' => t('How should favorites be displayed on the favorite nodes page?'),
   );
@@ -339,8 +358,9 @@ function favorite_nodes_settings() {
       '#default_value' => variable_get(FAVORITE_NODES_NODE_TYPE . $type->type, 0),
     );
   }
-
+  // $form['#submit'][] = 'example_admin_settings_submit';
   return system_settings_form($form);
+
 }
 
 /**
@@ -367,12 +387,12 @@ function favorite_nodes_add($nid) {
  */
 function favorite_nodes_delete($nid) {
   global $user;
-   
   db_query("DELETE FROM {favorite_nodes} WHERE nid = %d AND uid = %d", $nid, $user->uid);
 }
 
 /**
  * Select all the favorite nodes a user has.
+ * TODO why don't return all node if tpye are nul. So we can display all favorite node on path favorite_nodes/view/"uid"
  */
 function favorite_nodes_get($uid, $type = null, $limit = null) {
   if (is_null($limit)) {
@@ -383,7 +403,7 @@ function favorite_nodes_get($uid, $type 
     $sql = "SELECT n.nid, n.title, f.uid, f.last FROM {node} n INNER JOIN {favorite_nodes} f ON n.nid = f.nid WHERE n.type = '%s' AND f.uid = %d ORDER by f.last DESC";
 
     $result = pager_query($sql, $limit, 0, null, $type, $uid);
-    if ($result && db_num_rows($result) > 0) {
+    if ($result) {
       while ($data = db_fetch_object($result)) {
         $row[$data->nid] = $data;
       }
@@ -417,7 +437,7 @@ function favorite_nodes_add_page() {
 function favorite_nodes_delete_page() {
   global $user;
   $nid = arg(2);
- 
+
   favorite_nodes_delete($nid);
   drupal_set_message(t('The node was deleted from your favorites'));
   drupal_goto("user/$user->uid");
@@ -427,10 +447,10 @@ function favorite_nodes_delete_page() {
  * Page to display a user's favorite list.
  */
 function favorite_nodes_view_page() {
+
   $uid  = arg(2);
   $type = arg(3);
   $output = theme('favorite_nodes_view_'. variable_get(FAVORITE_NODES_PAGE_TYPE, 'table'), favorite_nodes_get($uid, $type), $uid, $type);
-
   print theme('page', $output);
 }
 
@@ -497,8 +517,8 @@ function theme_favorite_nodes_view_tease
  * Table which displays favorite node lists.
  */
 function theme_favorite_nodes_view_table($list = array(), $uid = null, $type = null) {
-  global $user;
 
+  global $user;
   $account = user_load(array('uid' => $uid));
   $header = array(t('Title'), t('Added'), t('Operations'));
 
@@ -520,7 +540,7 @@ function theme_favorite_nodes_view_table
   $output .= '<h2>'. t('Favorite !types for !user', array('!type' => variable_get(FAVORITE_NODES_BLOCK . $type, node_get_types('name', $type)), '!user' => theme('username', $account))) ."</h2>\n";
   $output .= theme('table', $header, $rows);
   $output .= theme('pager');
-  
+
   return $output;
 }
 
@@ -532,11 +552,11 @@ function favorite_nodes_views_tables() {
       'left' => array(
         'table' => 'node',
         'field' => 'nid',
-      ),
+  ),
       'right' => array(
         'field' => 'nid',
-      ),
-    ),
+  ),
+  ),
     'fields' => array(
       'last' => array(
         'name' => t('Favorite Nodes: Time Added'),
@@ -544,21 +564,21 @@ function favorite_nodes_views_tables() {
         'handler' => views_handler_field_dates(),
         'option' => 'string',
         'help' => t('Display the date/time the favorite node was added.'),
-      ),
+  ),
       'count' => array(
         'name' => t('Favorite Nodes: Count'),
         'handler' => 'favorite_nodes_handler_user_count',
         'help' => t('Number of times this node was added to favorites by any user.'),
         'sortable' => FALSE,
         'notafield' => TRUE,
-      ),
-    ),
+  ),
+  ),
     'sorts' => array(
       'last' => array(
         'name' => t('Favorite Nodes: Time Added'),
         'help' => t('Sort by the date/time the favorite node was added.'),
-      ),
-    ),
+  ),
+  ),
     'filters' => array(
       'uid' => array(
         'field'     => 'uid',
@@ -569,9 +589,9 @@ function favorite_nodes_views_tables() {
         'list' => array(
           'uid_current'  => t('Currently Logged In User'),
           'uid_all'      => t('All Users'),
-        ),
+  ),
       'help' => t('This allows you to filter based on favorites nodes.'),
-      ),
+  ),
       'last' => array(
         'name'     => t('Favorite Nodes: Time Added'),
         'operator' => 'views_handler_operator_gtlt',
@@ -579,8 +599,8 @@ function favorite_nodes_views_tables() {
         'handler'  => 'views_handler_filter_timestamp',
         'option'   => 'string',
         'help'     => t('This filter allows favorite nodes to be filtered by the date and time the user added them. Enter dates in the format: CCYY-MM-DD HH:MM:SS. Enter \'now\' to use the current time. You may enter a delta (in seconds) to the option that will be added to the time; this is most useful when combined with now.'),
-      ),
-    ),
+  ),
+  ),
   );
   return $tables;
 }
@@ -595,9 +615,9 @@ function views_handler_filter_favorite_n
   $table = $query->get_table_name('favorite_nodes', $table_num);
   $query->set_distinct();
 
-  switch($filter['value']) {
+  switch ($filter['value']) {
     case 'uid_current':
-      if($user->uid) {
+      if ($user->uid) {
         $query->add_where("$table.uid = $user->uid");
       }
       break;
@@ -625,7 +645,7 @@ function favorite_nodes_handler_argument
       break;
     case 'filter':
       list($and_or, $uids) = _views_break_phrase($arg);
-      $and_or = strtoupper($and_or);
+      $and_or = drupal_strtoupper($and_or);
       // Similar to taxonomy AND/OR query.
 
       if ($and_or == 'OR') {
diff -urp -N favorite_nodes-original/po/favorite_nodes-module.pot favorite_nodes-new/po/favorite_nodes-module.pot
--- favorite_nodes-original/po/favorite_nodes-module.pot	2007-04-14 06:53:43.000000000 +0200
+++ favorite_nodes-new/po/favorite_nodes-module.pot	1970-01-01 01:00:00.000000000 +0100
@@ -1,143 +0,0 @@
-# $Id: favorite_nodes-module.pot,v 1.1.2.1 2007/04/14 04:53:43 kbahey Exp $
-#
-# LANGUAGE translation of Drupal (favorite_nodes.module)
-# Copyright YEAR NAME <EMAIL@ADDRESS>
-# Generated from file: favorite_nodes.module,v 1.5 2007/01/23 15:27:08 kbahey
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2007-04-14 00:52-0400\n"
-"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
-"Last-Translator: NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-
-#: favorite_nodes.module:80
-msgid "Add a favorite node to the current user's list."
-msgstr ""
-
-#: favorite_nodes.module:109;143;185
-msgid "Favorites"
-msgstr ""
-
-#: favorite_nodes.module:138
-msgid "Favorite nodes"
-msgstr ""
-
-#: favorite_nodes.module:164
-msgid "More Favorite %types"
-msgstr ""
-
-#: favorite_nodes.module:176
-msgid "Titles"
-msgstr ""
-
-#: favorite_nodes.module:182
-msgid "Block title"
-msgstr ""
-
-#: favorite_nodes.module:184
-msgid "This title will be displayed at the top of the block."
-msgstr ""
-
-#: favorite_nodes.module:189
-msgid "Number of favorites to display"
-msgstr ""
-
-#: favorite_nodes.module:191
-msgid "Up to this many favorites of each type of content will be displayed in the block. If there are no marked favorites of a type, then that type won't show up."
-msgstr ""
-
-#: favorite_nodes.module:199
-msgid "Type subtitles"
-msgstr ""
-
-#: favorite_nodes.module:207
-msgid "Subtitle for the %name content type"
-msgstr ""
-
-#: favorite_nodes.module:209
-msgid "Within the block, any links to content of the %name type will be categorized under this subtitle."
-msgstr ""
-
-#: favorite_nodes.module:242
-msgid "add to favorites"
-msgstr ""
-
-#: favorite_nodes.module:245
-msgid "in favorites"
-msgstr ""
-
-#: favorite_nodes.module:246
-msgid "remove from favorites"
-msgstr ""
-
-#: favorite_nodes.module:262
-msgid "Favorites Page Settings"
-msgstr ""
-
-#: favorite_nodes.module:268
-msgid "Favorite Nodes Page Limit"
-msgstr ""
-
-#: favorite_nodes.module:270
-msgid "How many items to display on a single page of marked favorites."
-msgstr ""
-
-#: favorite_nodes.module:274
-msgid "Favorite Nodes Profile Limit"
-msgstr ""
-
-#: favorite_nodes.module:276
-msgid "How many items per type to display on the profile page."
-msgstr ""
-
-#: favorite_nodes.module:280
-msgid "Type of Page Display for Favorite Nodes"
-msgstr ""
-
-#: favorite_nodes.module:286
-msgid "How should favorites be displayed on the favorite nodes page?"
-msgstr ""
-
-#: favorite_nodes.module:291
-msgid "Enable favorites for these node types"
-msgstr ""
-
-#: favorite_nodes.module:363
-msgid "The node was added to your favorites."
-msgstr ""
-
-#: favorite_nodes.module:381
-msgid "The node was deleted from your favorites"
-msgstr ""
-
-#: favorite_nodes.module:432;469
-msgid "Favorite %type for %user"
-msgstr ""
-
-#: favorite_nodes.module:452
-msgid "Title"
-msgstr ""
-
-#: favorite_nodes.module:452
-msgid "Added"
-msgstr ""
-
-#: favorite_nodes.module:452
-msgid "Operations"
-msgstr ""
-
-#: favorite_nodes.module:459
-msgid "delete"
-msgstr ""
-
-#: favorite_nodes.module:0
-msgid "favorite_nodes"
-msgstr ""
-
diff -urp -N favorite_nodes-original/po/general.pot favorite_nodes-new/po/general.pot
--- favorite_nodes-original/po/general.pot	2007-04-14 06:53:43.000000000 +0200
+++ favorite_nodes-new/po/general.pot	1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-# $Id: general.pot,v 1.1.2.1 2007/04/14 04:53:43 kbahey Exp $
-#
-# LANGUAGE translation of Drupal ()
-# Copyright YEAR NAME <EMAIL@ADDRESS>
-# Generated from file: 
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2007-04-14 00:52-0400\n"
-"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
-"Last-Translator: NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-
-#: favorite_nodes.module:21 favorite_nodes.info:0
-msgid "Allows users to manage a favorite list of nodes."
-msgstr ""
-
-#: favorite_nodes.install:25
-msgid "favourite_nodes module database tables created successfully."
-msgstr ""
-
-#: favorite_nodes.install:27
-msgid "favourite_nodes module database table creation failure. Please view the favourite_nodes module folder and read the README.txt"
-msgstr ""
-
-#: favorite_nodes.info:0
-msgid "Favorite Nodes"
-msgstr ""
-
-#: favorite_nodes.info:0
-msgid ""
-msgstr ""
-
diff -urp -N favorite_nodes-original/replace.php favorite_nodes-new/replace.php
--- favorite_nodes-original/replace.php	1970-01-01 01:00:00.000000000 +0100
+++ favorite_nodes-new/replace.php	2008-06-18 11:28:13.000000000 +0200
@@ -0,0 +1,116 @@
+<?php
+
+
+   function file_replace ($search, $replace, $filename) {
+       if (file_exists($filename)) {
+           $cnt = file_get_contents($filename);
+           
+           // Process file in chunks to avoid PCRE bug?
+           $data = preg_split('/(?=(?<!ion )(?<![a-zA-Z_\'\"])l\()|(?=(?<!ion )(?<![a-zA-Z_\'\"])url\()/', $cnt);
+           foreach ($data as $d) {
+             $cnt2 .= preg_replace_callback($search, $replace, $d);
+           }
+           if ($cnt2 != $cnt)
+             return file_put_contents($filename, $cnt2);
+           return true;
+       }
+       return false;
+   }
+   
+   function dir_replace ($search, $replace, $dirname, $recursive = true) {
+       $dir = opendir($dirname);
+       while ($file = readdir($dir)) {
+           if ($file != '.' && $file != '..') {
+               if (is_dir($dirname.'/'.$file) && $file != 'CVS') {
+                   if ($recursive) {
+                       dir_replace($search, $replace, $dirname.'/'.$file);
+                   }
+               } else if (preg_match('@(?<!replace)(?<!settings)\.(module|inc|php)$@', $file)) {
+                   print 'Processing '. $file ."...\n";
+                   file_replace($search, $replace, $dirname.'/'.$file);
+               }
+           }
+       }
+   }
+if(!function_exists('file_put_contents')) {
+  function file_put_contents($filename, $data, $file_append = false) {
+   $fp = fopen($filename, (!$file_append ? 'w+' : 'a+'));
+   if(!$fp) {
+     trigger_error('file_put_contents cannot write in file.', E_USER_ERROR);
+     return;
+   }
+   fputs($fp, $data);
+   fclose($fp);
+  }
+}
+
+function fix_l($matches) {
+  $args = get_args($matches[1]);
+
+  // Two arguments, no change.
+  if (count($args) <= 2) {
+    return $matches[0];
+  }
+
+  $options = "array(";
+  if (isset($args[2]) && $args[2][1] != 'array()' && $args[2][1] != 'NULL') {
+    $options .= "'attributes' => ". $args[2][1] .', ';
+  }
+  if (isset($args[3]) && $args[3][1] != "''" && $args[3][1] != '""' && $args[3][1] != 'NULL') {
+    $options .= "'query' => ". $args[3][1] .', ';
+  }
+  if (isset($args[4]) && $args[4][1] != "''" && $args[4][1] != '""' && $args[4][1] != 'NULL') {
+    $options .= "'fragment' => ". $args[4][1] .', ';
+  }
+  if (isset($args[5]) && $args[5][1] != "FALSE") {
+    $options .= "'absolute' => TRUE, ";
+  }
+  if (isset($args[6]) && $args[6][1] != "FALSE") {
+    $options .= "'html' => TRUE, ";
+  }
+  $options = rtrim($options, ', ');
+
+  $return = 'l('. $args[0][1] .', '. $args[1][1] .', '. $options  .'))';
+  print 'Before:  '. $matches[0] ."\nAfter:  " . $return . "\n\n";
+  return $return;
+}
+
+function fix_url($matches) {
+  $args = get_args($matches[1]);
+  
+  // One argument, no change.
+  if (count($args) <= 1) {
+    return $matches[0];
+  }
+
+  // Ignore the url() call from l().
+  if ($args[1][1] == '$options') return $matches[0];
+
+  $options = "array(";
+  if (isset($args[1]) && $args[1][1] != "''" && $args[1][1] != '""' && $args[1][1] != 'NULL') {
+    $options .= "'query' => ". $args[1][1] .', ';
+  }
+  if (isset($args[2]) && $args[2][1] != "''" && $args[2][1] != '""' && $args[2][1] != 'NULL') {
+    $options .= "'fragment' => ". $args[2][1] .', ';
+  }
+  if (isset($args[3]) && $args[3][1] != "FALSE") {
+    $options .= "'absolute' => TRUE, ";
+  }
+  $options = rtrim($options, ', ');
+
+  $return = 'url('. $args[0][1] .', '. $options  .'))';
+  print 'Before:  '. $matches[0] ."\nAfter:  " . $return . "\n\n";
+  return $return;
+}
+
+function get_args($string) {
+  preg_match_all('` *(([^(),]+|\((([^()]*|\((?3)?\))+)\))+) *(,|$)`', $string, $matches, PREG_SET_ORDER);
+  return $matches;
+}
+
+//(([^()]*|\((?2)?\))+)\)*/
+
+dir_replace('@(?<!ion )(?<![a-zA-Z_\'\"])l\((([^()]*|\((?2)?\))+)\)@', 'fix_l', '.', TRUE);
+dir_replace('@(?<!ion )(?<![a-zA-Z_\'\"])url\((([^()]*|\((?2)?\))+)\)@', 'fix_url', '.', TRUE);
+
+print "\n\n";
diff -urp -N favorite_nodes-original/translations/favorite_nodes-module.pot favorite_nodes-new/translations/favorite_nodes-module.pot
--- favorite_nodes-original/translations/favorite_nodes-module.pot	1970-01-01 01:00:00.000000000 +0100
+++ favorite_nodes-new/translations/favorite_nodes-module.pot	2008-06-18 11:28:13.000000000 +0200
@@ -0,0 +1,143 @@
+# $Id: favorite_nodes-module.pot,v 1.1.2.1 2007/04/14 04:53:43 kbahey Exp $
+#
+# LANGUAGE translation of Drupal (favorite_nodes.module)
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+# Generated from file: favorite_nodes.module,v 1.5 2007/01/23 15:27:08 kbahey
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2007-04-14 00:52-0400\n"
+"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
+"Last-Translator: NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: favorite_nodes.module:80
+msgid "Add a favorite node to the current user's list."
+msgstr ""
+
+#: favorite_nodes.module:109;143;185
+msgid "Favorites"
+msgstr ""
+
+#: favorite_nodes.module:138
+msgid "Favorite nodes"
+msgstr ""
+
+#: favorite_nodes.module:164
+msgid "More Favorite %types"
+msgstr ""
+
+#: favorite_nodes.module:176
+msgid "Titles"
+msgstr ""
+
+#: favorite_nodes.module:182
+msgid "Block title"
+msgstr ""
+
+#: favorite_nodes.module:184
+msgid "This title will be displayed at the top of the block."
+msgstr ""
+
+#: favorite_nodes.module:189
+msgid "Number of favorites to display"
+msgstr ""
+
+#: favorite_nodes.module:191
+msgid "Up to this many favorites of each type of content will be displayed in the block. If there are no marked favorites of a type, then that type won't show up."
+msgstr ""
+
+#: favorite_nodes.module:199
+msgid "Type subtitles"
+msgstr ""
+
+#: favorite_nodes.module:207
+msgid "Subtitle for the %name content type"
+msgstr ""
+
+#: favorite_nodes.module:209
+msgid "Within the block, any links to content of the %name type will be categorized under this subtitle."
+msgstr ""
+
+#: favorite_nodes.module:242
+msgid "add to favorites"
+msgstr ""
+
+#: favorite_nodes.module:245
+msgid "in favorites"
+msgstr ""
+
+#: favorite_nodes.module:246
+msgid "remove from favorites"
+msgstr ""
+
+#: favorite_nodes.module:262
+msgid "Favorites Page Settings"
+msgstr ""
+
+#: favorite_nodes.module:268
+msgid "Favorite Nodes Page Limit"
+msgstr ""
+
+#: favorite_nodes.module:270
+msgid "How many items to display on a single page of marked favorites."
+msgstr ""
+
+#: favorite_nodes.module:274
+msgid "Favorite Nodes Profile Limit"
+msgstr ""
+
+#: favorite_nodes.module:276
+msgid "How many items per type to display on the profile page."
+msgstr ""
+
+#: favorite_nodes.module:280
+msgid "Type of Page Display for Favorite Nodes"
+msgstr ""
+
+#: favorite_nodes.module:286
+msgid "How should favorites be displayed on the favorite nodes page?"
+msgstr ""
+
+#: favorite_nodes.module:291
+msgid "Enable favorites for these node types"
+msgstr ""
+
+#: favorite_nodes.module:363
+msgid "The node was added to your favorites."
+msgstr ""
+
+#: favorite_nodes.module:381
+msgid "The node was deleted from your favorites"
+msgstr ""
+
+#: favorite_nodes.module:432;469
+msgid "Favorite %type for %user"
+msgstr ""
+
+#: favorite_nodes.module:452
+msgid "Title"
+msgstr ""
+
+#: favorite_nodes.module:452
+msgid "Added"
+msgstr ""
+
+#: favorite_nodes.module:452
+msgid "Operations"
+msgstr ""
+
+#: favorite_nodes.module:459
+msgid "delete"
+msgstr ""
+
+#: favorite_nodes.module:0
+msgid "favorite_nodes"
+msgstr ""
+
diff -urp -N favorite_nodes-original/translations/general.pot favorite_nodes-new/translations/general.pot
--- favorite_nodes-original/translations/general.pot	1970-01-01 01:00:00.000000000 +0100
+++ favorite_nodes-new/translations/general.pot	2008-06-18 11:28:13.000000000 +0200
@@ -0,0 +1,39 @@
+# $Id: general.pot,v 1.1.2.1 2007/04/14 04:53:43 kbahey Exp $
+#
+# LANGUAGE translation of Drupal ()
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+# Generated from file: 
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2007-04-14 00:52-0400\n"
+"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
+"Last-Translator: NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: favorite_nodes.module:21 favorite_nodes.info:0
+msgid "Allows users to manage a favorite list of nodes."
+msgstr ""
+
+#: favorite_nodes.install:25
+msgid "favourite_nodes module database tables created successfully."
+msgstr ""
+
+#: favorite_nodes.install:27
+msgid "favourite_nodes module database table creation failure. Please view the favourite_nodes module folder and read the README.txt"
+msgstr ""
+
+#: favorite_nodes.info:0
+msgid "Favorite Nodes"
+msgstr ""
+
+#: favorite_nodes.info:0
+msgid ""
+msgstr ""
+
