// Ignore errors with borked installed.list's.
list ($name, $file, $id, $version) = array_pad(explode('|^|', $installed_mods[$i]), 4, '');
// Ignore errors with borked installed.list's.
$info = array_pad(explode('|^|', $installed_mods[$i]), 4, '');
list ($name, $file, $id, $version) = htmlspecialchars__recursive($info);
$data .= trim($packageInfo['name']) . '|^|' . trim($packageInfo['filename']) . '|^|' . trim($packageInfo['id']) . '|^|' . trim($packageInfo['version']) . "\n";
$keys = array('name', 'filename', 'id', 'version');
foreach($keys as $key)
{
// Yay for variable variables...
${"package_$key"} = trim(un_htmlspecialchars($packageInfo[$key]));
}
$data .= $package_name . '|^|' . $package_filename . '|^|' . $package_id . '|^|' . $package_version . "\n";
$package = $packageInfo->to_array();
$package['xml'] = $packageInfo;
$package['filename'] = $gzfilename;
$package = $packageInfo->to_array();
$package = htmlspecialchars__recursive($package);
$package['xml'] = $packageInfo;
$package['filename'] = $gzfilename;
// Don't want to mess with code...
$types = array('install', 'uninstall', 'upgrade');
foreach($types as $type)
{
if (isset($package[$type]['code']))
{
$package[$type]['code'] = un_htmlspecialchars($package[$type]['code']);
}
}
if (!empty($action['parse_bbc']))
$context['package_readme'] = parse_bbc($context['package_readme']);
if (!empty($action['parse_bbc']))
{
$context['package_readme'] = preg_replace('~\[[/]?html\]~i', '', $context['package_readme']);
$context['package_readme'] = parse_bbc($context['package_readme']);
}