[fusionregistry-commitlog] SF.net SVN: fusionregistry: [32] branches/stable_3_0_x
                
                Brought to you by:
                
                    copland007
                    
                
            
            
        
        
        
    | 
     
      
      
      From: SVN c. <fus...@li...> - 2008-02-09 23:55:57
      
     
   | 
Revision: 32
          http://fusionregistry.svn.sourceforge.net/fusionregistry/?rev=32&view=rev
Author:   copland007
Date:     2008-02-09 15:56:00 -0800 (Sat, 09 Feb 2008)
Log Message:
-----------
Pickup merge from trunk r25:31
Modified Paths:
--------------
    branches/stable_3_0_x/ipb_skin-fusionregistry.xml.gz
    branches/stable_3_0_x/upload/cache/lang_cache/en/lang_registry.php
    branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_config.php
    branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_registry_loader.php
    branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_tools.php
    branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/install/sql/inserts.sql.php
    branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/lib/core.php
    branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/version_history.php
Added Paths:
-----------
    branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/
    branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php
Removed Paths:
-------------
    branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php
Modified: branches/stable_3_0_x/ipb_skin-fusionregistry.xml.gz
===================================================================
(Binary files differ)
Modified: branches/stable_3_0_x/upload/cache/lang_cache/en/lang_registry.php
===================================================================
--- branches/stable_3_0_x/upload/cache/lang_cache/en/lang_registry.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/cache/lang_cache/en/lang_registry.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -63,10 +63,10 @@
     manage_vehicle => "Manage <{R_ITEM}>",
     search_form => "Search Form",
     guest_book_empty => "There are currently no comments in this guestbook, be the first to leave a message below!",
-    pm_notify_subject => "<#FROM_MEMBER#> has signed your registry guestbook",
-    pm_notify_text => "This is an automated message from the Registry.\n\n<#FROM_MEMBER#> has added a comment to your registry guestbook!\n\n[URL=<#GUESTBOOK_LINK#>]Click here[/URL] to view your registry guestbook.",
+    pm_notify_subject => "<#FROM_MEMBER#> has signed your <{R_NAME}> guestbook",
+    pm_notify_text => "This is an automated message from the <{R_NAME}>.\n\n<#FROM_MEMBER#> has added a comment to your <{R_NAME}> guestbook!\n\n[URL=<#GUESTBOOK_LINK#>]Click here[/URL] to view your <{R_NAME}> guestbook.",
     guestbook_pm_notify => "PM Guestbook Notifications?",
-    guestbook_pm_notify_explain => "Check this to receive a PM when someone signs your registry guestbook.",
+    guestbook_pm_notify_explain => "Check this to receive a PM when someone signs your <{R_NAME}> guestbook.",
     error_comment_empty => "You must enter a message to post!",
 
 
Modified: branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_config.php
===================================================================
--- branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_config.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_config.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -225,7 +225,7 @@
                                                                  $this->ipsclass->adskin->form_input('year_start', $this->registry_config['year_start']),
                                                         )      );
 
-        $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Year Range Ending Offset</b><div style='color:gray'>This is the amount of years offset from the current year for the latest year you want to appear as a selection for a the 'year' special custom field. If set to a positive integer the amount will be added to the current year, and if you set this to a negative integer the amount will be subtracted from the current year. Default is to offset positive 1 since model year numbers are usually one year ahead current year.</div>",
+        $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Year Range Ending Offset</b><div style='color:gray'>This is the amount of years offset from the current year for the latest year you want to appear as a selection for the 'year' special custom field. If set to a positive integer the amount will be added to the current year, and if you set this to a negative integer the amount will be subtracted from the current year. Default is to offset positive 1 since model year numbers are usually one year ahead current year.</div>",
                                                                  $this->ipsclass->adskin->form_input('year_end', $this->registry_config['year_end']),
                                                         )      );
 
@@ -280,7 +280,7 @@
                                                                  $this->ipsclass->adskin->form_yes_no('enable_featured_item', $this->registry_config['enable_featured_item']),
                                                         )      );
 
-        $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Item ID</b><div style='color:gray'>Enter the Item ID to feature.</div>",
+        $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Featured Item ID</b><div style='color:gray'>Enter the Item ID to feature.</div>",
                                                                  $this->ipsclass->adskin->form_input('featured_item_id', $this->registry_config['featured_item_id']).'<br />'.
                                                                  $this->ipsclass->adskin->form_checkbox('featured_item_random', $this->registry_config['featured_item_random'], '1'). ' Random?  '.
                                                                  $this->ipsclass->adskin->form_checkbox('featured_item_only_image', $this->registry_config['featured_item_only_image'], '1'). ' Only items with highlight images?',
Modified: branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_registry_loader.php
===================================================================
--- branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_registry_loader.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_registry_loader.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -53,8 +53,8 @@
 
     /**#@+ @var string */
     var $base_url;
-    var $r_version_short = 'v3.0.4';
-    var $r_version_long = '30004';
+    var $r_version_short = 'v3.0.5';
+    var $r_version_long = '30005';
     /**#@-*/
 
     /** @var object */
Modified: branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_tools.php
===================================================================
--- branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_tools.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_acp/fusionscripts/fusionregistry/ad_tools.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -101,6 +101,14 @@
                 $this->orphan_remove();
                 break;
 
+            case 'db_search_1742529':
+                $this->db_search_1742529();
+                break;
+
+            case 'db_remove_1742529':
+                $this->db_remove_1742529();
+                break;
+
             default:
                 $this->main_menu();
                 break;
@@ -109,6 +117,133 @@
 
 
     /**
+     * Find those duplicate ibf_registry_field_entry rows!
+     *
+     * Basic chain of events are to loop through the field_entry table
+     * for each item_id, then loop through each set of entry_id and
+     * field_id for that item. Find the largest value entry_id, mark the
+     * rest for removal.
+     */
+    function db_search_1742529()
+    {
+        $marked_for_death = $this->execute_db_search_1742529();
+
+        //-------------------------------
+        // Construct menu HTML
+        //-------------------------------
+
+        $this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "Fusion Registry Duplicate Row Locator", "Below are all the duplicate rows in the ibf_registry_field_entry table that were found.<br /><br />". $this->ad_registry_loader->imgs['warning'] ." <b>This operation is not undo-able!  Once you choose to remove these duplicate rows they will be gone, please make a backup of your ibf_registry_field_entries sql table before proceeding!!</b>".'<br /> ' ) . "<br >";
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', 'db_remove_1742529' ),
+                                                                             2 => array( 'act' , REGISTRY_URL        ),
+                                                                             3 => array( 'menu', 'tools'             ),
+                                                                             4 => array( 'section', 'components'     ),
+                                                                    )      );
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Duplicate ibf_registry_field_entry rows to be deleted" );
+
+        // If they don't have any, let them know
+        if ( count($marked_for_death) <= 0 )
+        {
+            $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Congratulations! You have no duplicate rows to clean up!" ) );
+        }
+        else
+        {
+            // Otherwise print them all out baby!
+            $list_html = join(', ', $marked_for_death);
+
+            $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $list_html ) );
+        }
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Remove '. count($marked_for_death) .' Duplicate Rows');
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->end_table();
+
+        $this->ipsclass->admin->output();
+    }
+
+
+    /**
+     * Do the actual removal of dup entries
+     */
+    function db_remove_1742529()
+    {
+        $output = array();
+
+        $marked_for_death = $this->execute_db_search_1742529();
+
+        // If we don't get anything in our returned array, there's nothing to do ;)
+        if ( count($marked_for_death) > 0 )
+        {
+            $rm_list = join("','", $marked_for_death);
+            $this->ipsclass->DB->simple_exec_query( array( 'delete' => 'registry_field_entries',  'where'  => "entry_id IN ( '$rm_list' )" ) );
+
+            // Report our mischief ways :)
+            $text = "<b>Duplicate rows removed</b><br /><br />".implode( "<br />", $output );
+            $url = "act=".REGISTRY_URL."§ion=components&menu=tools";
+            $time = 5;
+
+            // Big brother is watching :)
+            $this->ipsclass->admin->save_log("Removed Duplicate Fusion Registry sql field_entries");
+        }
+        else
+        {
+            $text = "<b>No duplicate rows were found, therefore none were removed ;)</b>";
+            $url = "act=".REGISTRY_URL."§ion=components&menu=tools";
+            $time = 5;
+        }
+
+        // End of the show, c'ya
+        $this->ipsclass->admin->redirect( $url, $text, 0, $time );
+    }
+
+
+    /**
+     * Helper function to search for dup entries in field_entries table
+     */
+    function execute_db_search_1742529()
+    {
+        $marked_for_death = array();
+
+        // Loop through for each item
+        $item_query_id = $this->ipsclass->DB->query("SELECT DISTINCT (item_id) FROM ibf_registry_field_entries");
+        while ( $item_row = $this->ipsclass->DB->fetch_row($item_query_id) )
+        {
+            $dup_rows = array();    // Bad boy rows marked for death
+            $max_rows = array();    // Keep track of max values (valid rows)
+
+            $entry_query_id = $this->ipsclass->DB->query("SELECT entry_id,field_id FROM ibf_registry_field_entries WHERE item_id='$item_row[item_id]'");
+
+            // Loop through each entry_id for each item_id
+            while ( $entry_row = $this->ipsclass->DB->fetch_row($entry_query_id) )
+            {
+                if ( isset( $max_rows[$entry_row[field_id]] ) ) {
+                    if ( $entry_row[entry_id] > $max_rows[$entry_row[field_id]] )
+                    {
+                        // This looks better, keep it, mark the last known max for death
+                        array_push($dup_rows, $max_rows[$entry_row[field_id]]);
+                        $max_rows[$entry_row[field_id]] = $entry_row[entry_id];
+                    }
+                }
+                else
+                {
+                    // There isn't a max row set yet, so set it now
+                    $max_rows[$entry_row[field_id]] = $entry_row[entry_id];
+                }
+            }
+
+            // Push to big array
+            foreach ($dup_rows as $dup_id)
+            {
+                array_push($marked_for_death, $dup_id);
+            }
+        }
+
+        return $marked_for_death;
+    }
+
+
+    /**
      * Find those Orphans!
      *
      * Basic chain of events are to compare all the known file names
@@ -761,6 +896,26 @@
 
         $this->ipsclass->html .= $this->ipsclass->adskin->end_table();
 
+        $this->ipsclass->html .= '<br />';
+
+        //-------------------------------
+        // Find/Remove Duplicate DB records from bug #1742529
+        //-------------------------------
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code', 'db_search_1742529' ),
+                                                                             2 => array( 'act' , REGISTRY_URL        ),
+                                                                             3 => array( 'menu', 'tools'             ),
+                                                                             4 => array( 'section', 'components'     ),
+                                                                    )      );
+
+        $desc = 'The \'Cleanup Database - bug #1742529 fix\' tool is used to locate any duplicate rows in the ibf_registry_field_entries that the Fusion Registry had once created.  The duplicate rows were created as the result of a bug in the code that was present until version 3.0.5.  Under normal circumstances there should be no duplicate rows.<br /><br />The first step of this tool is just to search for duplicate rows, no action will be taken unless you confirm the findings on the next step.';
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Cleanup Database - bug #1742529 fix", $desc );
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->end_form('Search for Duplicate Rows');
+
+        $this->ipsclass->html .= $this->ipsclass->adskin->end_table();
+
         // That's all folk!
         $this->ipsclass->admin->output();
     }
Modified: branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/install/sql/inserts.sql.php
===================================================================
--- branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/install/sql/inserts.sql.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/install/sql/inserts.sql.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -2,5 +2,5 @@
 INSERT INTO `ibf_registry_config` VALUES ('convert_path', '/usr/bin/convert');
 INSERT INTO `ibf_registry_config` VALUES ('convert_options', '-antialias +profile "*"');
 INSERT INTO `ibf_registry_config` VALUES ('date_format', 'm-j-y H:i');
-INSERT INTO `ibf_registry_config` VALUES ('version_long', '30004');
-INSERT INTO `ibf_registry_config` VALUES ('version_short', 'v3.0.4');
\ No newline at end of file
+INSERT INTO `ibf_registry_config` VALUES ('version_long', '30005');
+INSERT INTO `ibf_registry_config` VALUES ('version_short', 'v3.0.5');
\ No newline at end of file
Modified: branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/lib/core.php
===================================================================
--- branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/lib/core.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/lib/core.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -59,8 +59,8 @@
     var $class  = "";
 
     /** @var string */
-    var $r_version_short = 'v3.0.4';
-    var $r_version_long = '30004';
+    var $r_version_short = 'v3.0.5';
+    var $r_version_long = '30005';
     var $r_session = "";
     /**#@-*/
 
Copied: branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005 (from rev 31, trunk/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005)
Deleted: branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php
===================================================================
--- trunk/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -1,144 +0,0 @@
-<?php
-/*-------------------------------------------------------------------------\
-|
-|  ========================================================
-|  Fusion Registry GPL
-|  Copyright (C) 2007 Fusion Scripts
-|
-|  This program is free software; you can redistribute it and/or
-|  modify it under the terms of the GNU General Public License
-|  as published by the Free Software Foundation; either version 2
-|  of the License, or (at your option) any later version.
-|
-|  This program is distributed in the hope that it will be useful,
-|  but WITHOUT ANY WARRANTY; without even the implied warranty of
-|  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-|  GNU General Public License for more details.
-|
-|  You should have received a copy of the GNU General Public License
-|  along with this program; if not, write to the Free Software
-|  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-|  ========================================================
-|
-|  Email: in...@fu...
-|  Web-Site: http://www.fusionscripts.com/
-|
-|  $Id$
-|
-\-------------------------------------------------------------------------*/
-
-/**
- * Installation template class
- *
- * @package Fusion Registry
- * @subpackage installer
- * @version $Id$
- */
-if ( ! defined( 'IN_IPB' ) )
-{
-    print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
-    exit();
-}
-
-class version_upgrade
-{
-    var $ipsclass;
-    var $instagrade;
-    var $this_version = '30005';
-    var $upgrade_from = '30004';
-    var $base_url     = '';
-    var $mod_to_run   = '';
-
-
-    /**
-     * Generate the upgrades to happen string
-     */
-    function version_process()
-    {
-        $this->base_url  = "index.php?act=kit";
-
-        if ( is_array( $this->instagrade->modules_to_run ) and count( $this->instagrade->modules_to_run ) )
-        {
-            $tmp = array_shift( $this->instagrade->modules_to_run );
-
-            $this->mod_to_run = implode( ', ', $this->instagrade->modules_to_run );
-        }
-
-        if ( ! $this->mod_to_run )
-        {
-            $this->mod_to_run = 'None';
-        }
-    }
-
-
-    /**
-     * Oh how we love to upgrade!
-     */
-    function auto_run()
-    {
-        switch( $this->ipsclass->input['kitact'] )
-        {
-            case 'cleanup':
-                $this->do_cleanup();
-                break;
-
-            default:
-                $this->upgrade_kit_intro();
-                break;
-        }
-    }
-
-
-
-    /**
-     * Only thing we need to do is update the DB version
-     */
-    function do_cleanup()
-    {
-        $executed = 0;
-
-        // Update the database version strings
-        $vers = array( 'version_long' => $this->this_version,
-                       'version_short' => 'v3.0.5' );
-
-        foreach ( $vers as $name => $value )
-        {
-            $db_string = $this->ipsclass->DB->compile_db_update_string( array( 'config_name' => $name,
-                                                                               'config_value' => $value
-                                                                      )      );
-
-            $this->ipsclass->DB->query( "UPDATE ".$this->ipsclass->vars['sql_tbl_prefix']."registry_config SET $db_string ".
-                                        "WHERE config_name='$name'" );
-
-            $executed++;
-        }
-
-
-        // All done
-		$this->instagrade->redirect( "index.php?act=done", "Cleanup complete, $executed queries run...." );
-    }
-
-
-    /**
-     * Print intro
-     */
-    function upgrade_kit_intro()
-    {
-        $this->ipsclass->template->print_header();
-
-        $this->ipsclass->template->contents .= <<<HTML
-This upgrade kit will upgrade you from <b>"{$this->instagrade->version_history[$this->upgrade_from]}"</b> to <b>"{$this->instagrade->version_history[$this->this_version]}"</b>
-<br />
-<br />
-<div align='center'><a href="{$this->base_url}&kitact=cleanup" class='button' style='color: #003366'>Continue >></a></div>
-<br />
-<br />
-<div align='center'>Upgrade kits still to run after this upgrade: {$this->mod_to_run}</div>
-HTML;
-
-        $this->ipsclass->template->output();
-    }
-
-}
-
-?>
\ No newline at end of file
Copied: branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php (from rev 31, trunk/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php)
===================================================================
--- branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php	                        (rev 0)
+++ branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/upgrade_30005/version_upgrade.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -0,0 +1,144 @@
+<?php
+/*-------------------------------------------------------------------------\
+|
+|  ========================================================
+|  Fusion Registry GPL
+|  Copyright (C) 2007 Fusion Scripts
+|
+|  This program is free software; you can redistribute it and/or
+|  modify it under the terms of the GNU General Public License
+|  as published by the Free Software Foundation; either version 2
+|  of the License, or (at your option) any later version.
+|
+|  This program is distributed in the hope that it will be useful,
+|  but WITHOUT ANY WARRANTY; without even the implied warranty of
+|  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+|  GNU General Public License for more details.
+|
+|  You should have received a copy of the GNU General Public License
+|  along with this program; if not, write to the Free Software
+|  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+|  ========================================================
+|
+|  Email: in...@fu...
+|  Web-Site: http://www.fusionscripts.com/
+|
+|  $Id$
+|
+\-------------------------------------------------------------------------*/
+
+/**
+ * Installation template class
+ *
+ * @package Fusion Registry
+ * @subpackage installer
+ * @version $Id$
+ */
+if ( ! defined( 'IN_IPB' ) )
+{
+    print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
+    exit();
+}
+
+class version_upgrade
+{
+    var $ipsclass;
+    var $instagrade;
+    var $this_version = '30005';
+    var $upgrade_from = '30004';
+    var $base_url     = '';
+    var $mod_to_run   = '';
+
+
+    /**
+     * Generate the upgrades to happen string
+     */
+    function version_process()
+    {
+        $this->base_url  = "index.php?act=kit";
+
+        if ( is_array( $this->instagrade->modules_to_run ) and count( $this->instagrade->modules_to_run ) )
+        {
+            $tmp = array_shift( $this->instagrade->modules_to_run );
+
+            $this->mod_to_run = implode( ', ', $this->instagrade->modules_to_run );
+        }
+
+        if ( ! $this->mod_to_run )
+        {
+            $this->mod_to_run = 'None';
+        }
+    }
+
+
+    /**
+     * Oh how we love to upgrade!
+     */
+    function auto_run()
+    {
+        switch( $this->ipsclass->input['kitact'] )
+        {
+            case 'cleanup':
+                $this->do_cleanup();
+                break;
+
+            default:
+                $this->upgrade_kit_intro();
+                break;
+        }
+    }
+
+
+
+    /**
+     * Only thing we need to do is update the DB version
+     */
+    function do_cleanup()
+    {
+        $executed = 0;
+
+        // Update the database version strings
+        $vers = array( 'version_long' => $this->this_version,
+                       'version_short' => 'v3.0.5' );
+
+        foreach ( $vers as $name => $value )
+        {
+            $db_string = $this->ipsclass->DB->compile_db_update_string( array( 'config_name' => $name,
+                                                                               'config_value' => $value
+                                                                      )      );
+
+            $this->ipsclass->DB->query( "UPDATE ".$this->ipsclass->vars['sql_tbl_prefix']."registry_config SET $db_string ".
+                                        "WHERE config_name='$name'" );
+
+            $executed++;
+        }
+
+
+        // All done
+		$this->instagrade->redirect( "index.php?act=done", "Cleanup complete, $executed queries run...." );
+    }
+
+
+    /**
+     * Print intro
+     */
+    function upgrade_kit_intro()
+    {
+        $this->ipsclass->template->print_header();
+
+        $this->ipsclass->template->contents .= <<<HTML
+This upgrade kit will upgrade you from <b>"{$this->instagrade->version_history[$this->upgrade_from]}"</b> to <b>"{$this->instagrade->version_history[$this->this_version]}"</b>
+<br />
+<br />
+<div align='center'><a href="{$this->base_url}&kitact=cleanup" class='button' style='color: #003366'>Continue >></a></div>
+<br />
+<br />
+<div align='center'>Upgrade kits still to run after this upgrade: {$this->mod_to_run}</div>
+HTML;
+
+        $this->ipsclass->template->output();
+    }
+
+}
+
+?>
\ No newline at end of file
Modified: branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/version_history.php
===================================================================
--- branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/version_history.php	2008-02-04 05:48:50 UTC (rev 31)
+++ branches/stable_3_0_x/upload/sources/components_public/fusionscripts/fusionregistry/upgrade/version_history.php	2008-02-09 23:56:00 UTC (rev 32)
@@ -8,6 +8,7 @@
                          '30002' => 'Fusion Registry v3.0.2 Final',
                          '30003' => 'Fusion Registry v3.0.3',
                          '30004' => 'Fusion Registry v3.0.4',
+                         '30005' => 'Fusion Registry v3.0.5',
                        );
 
 ?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |