Fixing extension configurion file moved to installed() method.
[fa-stable.git] / sql / alter2.3.php
index 053fa02568d01d96d2a09ce7c560b594a613211b..c424bbe377cd871100d39047eb73a0d5f7660bdf 100644 (file)
@@ -18,7 +18,6 @@ class fa2_3 {
        
        function fa2_3() {
                $this->description = _('Upgrade from version 2.2 to 2.3');
-               $this->preconf = $this->fix_extensions();
        }
        
        //
@@ -99,6 +98,7 @@ class fa2_3 {
        //
        function pre_check($pref, $force)
        {
+
                if ($this->beta && !$force)
                        $this->sql = 'alter2.3rc.sql';
 
@@ -109,6 +109,7 @@ class fa2_3 {
        //
        function installed($pref) {
                $this->beta = !check_table($pref, 'suppliers', 'tax_included');
+               $this->preconf = $this->fix_extensions();
 
                $n = 1; // number of patches to be installed
                $patchcnt = 0;
@@ -269,8 +270,9 @@ class fa2_3 {
                $lang_chd = false;
                foreach($installed_languages as $i => $lang) {
                        if (!isset($lang['path'])) {
+                               $code = $lang['code'];
                                $installed_languages[$i]['path'] = 'lang/'.$code;
-                               $installed_languages[$i]['package'] = 'lang/'.$code;
+                               $installed_languages[$i]['package'] = $code;
                                $lang_chd = true;
                        }
                }
@@ -287,7 +289,7 @@ class fa2_3 {
                {
                        if (isset($ext['title'])) // old type entry
                        {
-                               if ($ext['type'] == 'module')
+                               if ($ext['type'] == 'module') {
                                        $new['type'] = 'extension';
                                        $new['tabs'][] = array(
                                                'url' => $ext['filename'],