Skip to content

Commit

Permalink
fix builder issues
Browse files Browse the repository at this point in the history
  • Loading branch information
peter1szalatnay committed Nov 13, 2024
1 parent 3522f69 commit ba39652
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
8 changes: 8 additions & 0 deletions bin/builder/build-joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@
</fileset>
</copy>

<copy todir="${tmp_dir}/packages/com_gantry5/media" overwrite="true">
<filterchain refid="filter"/>
<fileset dir="${path.platforms}/joomla/com_gantry5/media">
<include name="*.json"/>
</fileset>
</copy>

<move todir="${tmp_dir}/packages/com_gantry5" overwrite="true">
<fileset dir="${tmp_dir}/packages/com_gantry5/admin">
<include name="gantry5.xml"/>
Expand Down Expand Up @@ -232,6 +239,7 @@
<filterchain refid="filter"/>
<fileset dir="${path.platforms}/joomla/plg_system_gantry5">
<include name="*.xml"/>
<include name="src/Extension/Gantry5.php"/>
</fileset>
</copy>

Expand Down
3 changes: 2 additions & 1 deletion platforms/joomla/plg_gantry5_preset/preset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
<description>PLG_GANTRY5_PRESET_XML_DESCRIPTION</description>
<namespace path="src">Gantry\Plugin\Gantry5\Preset</namespace>
<files>
<filename plugin="preset">preset.php</filename>
<folder plugin="preset">services</folder>
<folder>language</folder>
<folder>src</folder>
</files>
<config>
<fields name="params">
Expand Down
1 change: 1 addition & 0 deletions platforms/joomla/plg_quickicon_gantry5/gantry5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<files>
<folder plugin="gantry5">services</folder>
<folder>language</folder>
<folder>src</folder>
<filename>MD5SUMS</filename>
</files>
<config>
Expand Down
15 changes: 12 additions & 3 deletions src/platforms/joomla/classes/Gantry/Framework/Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Database\DatabaseInterface;
use Joomla\Utilities\ArrayHelper;
use RocketTheme\Toolbox\DI\Container;

/**
Expand Down Expand Up @@ -562,21 +563,29 @@ public function updates(): array

$styles = ThemeList::getThemes();

$extension_ids = \array_unique(\array_map(
$extensionIds = \array_unique(\array_map(
function ($item) {
return (int) $item->extension_id;
},
$styles
));

$extension_ids = $extension_ids ? implode(',', $extension_ids) : '-1';
$ids = $extensionIds ?: ['-1'];
$ids = ArrayHelper::toInteger($ids);

/** @var DatabaseInterface $db */
$db = Factory::getContainer()->get(DatabaseInterface::class);
$query = $db->createQuery();

$query->select('*')
->from($db->quoteName('#__updates'))
->where("element='pkg_gantry5' OR extension_id IN ($extension_ids)");
->where(
[
$db->quoteName('element') . ' = ' . $db->quote('pkg_gantry5'),
$db->quoteName('extension_id') . ' IN (' . implode(',', $query->bindArray($ids)) . ')',
],
'OR'
);

$updateObject = $db->setQuery($query)->loadObjectList();

Expand Down

0 comments on commit ba39652

Please sign in to comment.