X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sql%2Falter2.3.php;h=c424bbe377cd871100d39047eb73a0d5f7660bdf;hb=d2aa6078df9bb042c629a4d5130dd59696613bd6;hp=56f03584e936e3c9bc5fbf31d0fa55f7031e64c5;hpb=b7d139b9bbc1978059be933fece5bbc72575ff9d;p=fa-stable.git diff --git a/sql/alter2.3.php b/sql/alter2.3.php index 56f03584..c424bbe3 100644 --- a/sql/alter2.3.php +++ b/sql/alter2.3.php @@ -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; @@ -264,8 +265,20 @@ class fa2_3 { function fix_extensions() { - global $path_to_root, $next_extension_id; + global $path_to_root, $next_extension_id, $installed_languages; + $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'] = $code; + $lang_chd = true; + } + } + if ($lang_chd) + write_lang(); + $installed_extensions= get_company_extensions(); if (!isset($next_extension_id)) @@ -276,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'],