Skip to content

Commit

Permalink
Small cleanup of code
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Sep 14, 2020
1 parent 0ea61fa commit 90005c9
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions administrator/components/com_installer/src/Model/DatabaseModel.php
Expand Up @@ -189,14 +189,12 @@ private function fetchSchemaCache($cid = 0)

if (!file_exists($folderTmp))
{
if ($result->type === 'plugin')
{
$installationXML = InstallerHelper::getInstallationXML($result->element, $result->type, $result->client_id, $result->folder);
}
else
{
$installationXML = InstallerHelper::getInstallationXML($result->element, $result->type, $result->client_id);
}
$installationXML = InstallerHelper::getInstallationXML(
$result->element,
$result->type,
$result->client_id,
$result->type === 'plugin' ? $result->folder : null
);

if ($installationXML !== null)
{
Expand Down Expand Up @@ -556,14 +554,12 @@ public function compareUpdateVersion($extension)
}
else
{
if ($extension->type === 'plugin')
{
$installationXML = InstallerHelper::getInstallationXML($extension->element, $extension->type, $extension->client_id, $extension->folder);
}
else
{
$installationXML = InstallerHelper::getInstallationXML($extension->element, $extension->type, $extension->client_id);
}
$installationXML = InstallerHelper::getInstallationXML(
$extension->element,
$extension->type,
$extension->client_id,
$extension->type === 'plugin' ? $extension->folder : null
);

$extensionVersion = (string) $installationXML->version;
}
Expand Down

0 comments on commit 90005c9

Please sign in to comment.