Skip to content

Commit

Permalink
Merge branch 'show_changelog' of https://github.com/NunoLopes96/gsoc1…
Browse files Browse the repository at this point in the history
…7_expand_extension_manager into show_changelog
  • Loading branch information
NunoLopesPT committed May 23, 2017
2 parents 813f69f + 9a05cee commit eaa19cd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
@@ -0,0 +1 @@
ALTER TABLE `#__updates` ADD COLUMN `changelogurl` text AFTER `infourl`;
@@ -0,0 +1 @@
ALTER TABLE "#__updates" ADD COLUMN "changelogurl" text AFTER `infourl`;
Expand Up @@ -78,11 +78,9 @@
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php
$client = $item->client_id ? JText::_('JADMINISTRATOR') : JText::_('JSITE');
$manifest = json_decode($item->manifest_cache);
$current_version = isset($manifest->version) ? $manifest->version : JText::_('JLIB_UNKNOWN');
?>
<?php $client = $item->client_id ? JText::_('JADMINISTRATOR') : JText::_('JSITE'); ?>
<?php $manifest = json_decode($item->manifest_cache); ?>
<?php $current_version = isset($manifest->version) ? $manifest->version : JText::_('JLIB_UNKNOWN'); ?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<?php echo JHtml::_('grid.id', $i, $item->update_id); ?>
Expand All @@ -105,6 +103,14 @@
</td>
<td>
<span class="badge badge-success"><?php echo $item->version; ?></span>
<?php $modal_params = array(); ?>
<?php $modal_params['title'] = $item->version . " - " . $item->name; ?>
<?php $modal_params['height'] = '500px'; ?>
<?php $body = '<iframe height="500px" src="' . $item->changelogurl . '"></iframe>'; ?>

<a href="#myModal" class="btn" data-toggle="modal"> <?php echo $item->version; ?></a>

<?php echo JHTML::_('bootstrap.renderModal', 'myModal', $modal_params, $body); ?>
</td>
<td class="hidden-sm-down text-center">
<?php echo $item->folder_translated; ?>
Expand Down
1 change: 1 addition & 0 deletions installation/sql/mysql/joomla.sql
Expand Up @@ -1877,6 +1877,7 @@ CREATE TABLE IF NOT EXISTS `#__updates` (
`data` text NOT NULL,
`detailsurl` text NOT NULL,
`infourl` text NOT NULL,
`changelogurl` text,
`extra_query` varchar(1000) DEFAULT '',
PRIMARY KEY (`update_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Available Updates';
Expand Down
1 change: 1 addition & 0 deletions installation/sql/postgresql/joomla.sql
Expand Up @@ -1854,6 +1854,7 @@ CREATE TABLE IF NOT EXISTS "#__updates" (
"data" text NOT NULL,
"detailsurl" text NOT NULL,
"infourl" text NOT NULL,
"changelogurl" text,
"extra_query" varchar(1000) DEFAULT '',
PRIMARY KEY ("update_id")
);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/updater/updateadapter.php
Expand Up @@ -48,7 +48,7 @@ abstract class JUpdateAdapter extends JAdapterInstance
* @var array
* @since 12.1
*/
protected $updatecols = array('NAME', 'ELEMENT', 'TYPE', 'FOLDER', 'CLIENT', 'VERSION', 'DESCRIPTION', 'INFOURL', 'EXTRA_QUERY');
protected $updatecols = array('NAME', 'ELEMENT', 'TYPE', 'FOLDER', 'CLIENT', 'VERSION', 'DESCRIPTION', 'INFOURL', 'CHANGELOGURL', 'EXTRA_QUERY');

/**
* Should we try appending a .xml extension to the update site's URL?
Expand Down

0 comments on commit eaa19cd

Please sign in to comment.