diff options
author | plegall <plg@piwigo.org> | 2016-02-01 10:20:57 +0100 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2016-02-01 10:20:57 +0100 |
commit | da8d2b2af0e38715a929b3d4b900ee793cdfb3e8 (patch) | |
tree | 386658eb909674adbb0c2afbe756bdbf9a895d37 /admin/include/updates.class.php | |
parent | 70726892e031553563899783d9caab4d2c2e5b65 (diff) | |
parent | 2fcf276811723d300b4d4c08675994339a6688fa (diff) |
Merge branch 'master' into translation
Diffstat (limited to 'admin/include/updates.class.php')
-rw-r--r-- | admin/include/updates.class.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/admin/include/updates.class.php b/admin/include/updates.class.php index 17a3b2578..d4e178f8a 100644 --- a/admin/include/updates.class.php +++ b/admin/include/updates.class.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -135,15 +135,33 @@ class updates {
return false;
}
+
+ $servers = array();
+
foreach ($pem_exts as $ext)
{
if (isset($ext_to_check[$ext['extension_id']]))
{
- $server = 'server_'.$ext_to_check[$ext['extension_id']];
- $this->$ext_to_check[$ext['extension_id']]->$server += array($ext['extension_id'] => $ext);
+ $type = $ext_to_check[$ext['extension_id']];
+
+ if (!isset($servers[$type]))
+ {
+ $servers[$type] = array();
+ }
+
+ $servers[$type][ $ext['extension_id'] ] = $ext;
+
unset($ext_to_check[$ext['extension_id']]);
}
}
+
+ foreach ($servers as $server_type => $extension_list)
+ {
+ $server_string = 'server_'.$server_type;
+
+ $this->$server_type->$server_string = $extension_list;
+ }
+
$this->check_missing_extensions($ext_to_check);
return true;
}
|