projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug in update_person_contact().
[fa-stable.git]
/
includes
/
packages.inc
diff --git
a/includes/packages.inc
b/includes/packages.inc
index da379b8100729632e62a6a5aa85a2bb9e2afe928..c9387233e8b354618bc20e6961805ed339314994 100644
(file)
--- a/
includes/packages.inc
+++ b/
includes/packages.inc
@@
-606,7
+606,7
@@
function install_language($pkg_name)
//
function install_extension($pkg_name)
{
//
function install_extension($pkg_name)
{
- global $path_to_root, $next_extension_id, $Ajax;
+ global $path_to_root, $
installed_extensions, $
next_extension_id, $Ajax;
$pkg = get_pkg_or_list(array('extension', 'theme', 'chart'), $pkg_name);
if ($pkg) {
$pkg = get_pkg_or_list(array('extension', 'theme', 'chart'), $pkg_name);
if ($pkg) {
@@
-616,6
+616,11
@@
function install_extension($pkg_name)
$ext_id = array_search_key($pkg['Package'], $local_exts, 'package');
if ($ext_id === null)
$ext_id = $next_extension_id++;
$ext_id = array_search_key($pkg['Package'], $local_exts, 'package');
if ($ext_id === null)
$ext_id = $next_extension_id++;
+ else { // remove another already installed package for this language
+ $old_pkg = $installed_extensions[$ext_id]['package'];
+ if ($old_pkg)
+ uninstall_package($old_pkg);
+ }
$ext = array(
'name' => $pkg['Name'],
'package' => $pkg['Package'],
$ext = array(
'name' => $pkg['Name'],
'package' => $pkg['Package'],