//
$loclist = PKG_CACHE_PATH.'/Release.gz';
- if ($type!=null && !is_array($type)) {
+ if (isset($type) && !is_array($type)) {
$type = array($type);
}
$refresh = true;
} while($refresh);
$Release = get_control_file($loclist, 'Filename');
-
// download and check all indexes containing given package types
// then complete package list or seek for pkg
$Packages = array();
$pkglist = get_control_file($locindex, 'Package');
foreach($pkglist as $name => $pkg) {
$pkgfullname = REPO_URL.'/'.$parms['Path']."/".$pkg['Filename'].'.pkg';
- if ($type==null || in_array($pkg['Type'], $type)) {
+ if (!isset($type) || in_array($pkg['Type'], $type)) {
if (empty($filter))
$p = $pkg;
else {
}
}
}
-
+
return $Packages;
}
// Return merged list of available and installed extensions as a local
// configuration array supplemented with installed versions information.
//
-function get_extensions_list()
+function get_extensions_list($type = null)
{
- $pkgs = get_pkg_or_list('extension', null, array(
+
+ if (isset($type) && !is_array($type)) {
+ $type = array($type);
+ }
+
+ $pkgs = get_pkg_or_list($type, null, array(
'Package' => 'package',
'Version' => 'available',
'Name' => 'name',
'DefaultStatus'=> 'active',
'MenuTabs' => 'tabs',
'MenuEntries' => 'entries',
+ 'Encoding' => 'encoding',
'AccessExtensions' => 'acc_file',
'InstallPath' => 'path'
));
//
$local = get_company_extensions();
foreach($local as $extno => $ext) {
- if ($ext['type'] != 'extension') continue;
+ if (!in_array($ext['type'], $type)) continue;
$ext['local_id'] = $extno;
if (!isset($pkgs[$ext['package']]) || $ext['package'] == '')
$pkgs[] = $ext;
'Description' => 'Descr',
'Type' => 'type',
'InstallPath' => 'path',
+ 'Encoding' => 'encoding',
'SqlScript' => 'sql'
));