Skip to content

Commit

Permalink
Merge pull request #1 from joomla-projects/feature-appstore-server
Browse files Browse the repository at this point in the history
Pulled Ashwin's PR
  • Loading branch information
emavro committed Sep 8, 2013
2 parents f781651 + 895047e commit fa50b39
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/com_apps/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static function getAJAXUrl($fragment) {

$uri = JURI::getInstance($route_prefix);
$query = $uri->getQuery();
$query .= '&'.$fragment;
$query .= '&' . $fragment;
$uri->setQuery($query);
$url = $uri->toString();

Expand Down
6 changes: 1 addition & 5 deletions components/com_apps/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function getExtensions()
$componentParams = JComponentHelper::getParams('com_apps');
$input = new JInput;
$catid = $input->get('id', null, 'int');
$order = $input->get('ordering', 't2.link_rating');
$order = $input->get('ordering', 't2.link_hits');
$orderCol = $this->state->get('list.ordering', $order);
$orderDirn = $orderCol == 't2.link_name' ? 'ASC' : 'DESC';
$order = $orderCol.' '.$orderDirn;
Expand Down Expand Up @@ -286,10 +286,6 @@ public function getExtensions()
$query->join('LEFT', 'jos_mt_cfvalues AS t4 ON t2.link_id = t4.link_id');
$query->join('LEFT', 'jos_mt_customfields AS t5 ON t4.cf_id = t5.cf_id');

if (!$order) {
$order = 't2.link_rating DESC';
}

$query->where(array(
't2.link_id IN (' . implode(',', $ids) . ')',
));
Expand Down
2 changes: 2 additions & 0 deletions language/en-GB/en-GB.com_apps.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ COM_APPS_INSTALL_DOWNLOAD_EXTERNAL="Download"
COM_APPS_EXTENSION_VERSION="Version: %s <small>(last update on %s)</small>"
COM_APPS_EXTENSION_AUTHOR="(By %s)"
COM_APPS_EXTENSION_VOTES_REVIEWS="(%s Votes, %s Reviews)"
COM_APPS_EXTENSION_LICENSE="License: %s [%s]"
COM_APPS_NO_RESULTS="No Extensions"
COM_APPS_NO_RESULTS_DESCRIPTION="Cannot find any extensions. Please try a different search word or another category."
COM_APPS_EXTENSIONS_DASHBOARD = "Popular extensions listed on the <a href="http://extensions.joomla.org/" target="_blank">Joomla Extension Directory</a>"
Expand All @@ -38,3 +39,4 @@ COM_APPS_EXTENSIONS_DASHBOARD = "Popular extensions listed on the <a href="http:
COM_APPS_SORT_BY_CREATED="Newest First"
COM_APPS_SORT_BY_NAME="Sort by Name"
COM_APPS_SORT_BY_RATING="Sort by Rating"
COM_APPS_SORT_BY_POPULAR="Sort by Popularity"
2 changes: 1 addition & 1 deletion layouts/joomla/apps/extensions_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</a>
</div>
<div class="item-license">
<?php echo $extension_data->fields->get('50') . ' [' . $extension_data->fields->get('49') . ']'; ?>
<?php echo JText::sprintf('COM_APPS_EXTENSION_LICENSE', $extension_data->fields->get('50'), $extension_data->fields->get('49')); ?>
</div>
<div class="item-version">
<?php echo JText::sprintf('COM_APPS_EXTENSION_VERSION', $extension_data->fields->get('43'), JHTML::date($extension_data->link_modified)); ?>
Expand Down
3 changes: 2 additions & 1 deletion layouts/joomla/apps/extensions_imagegrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
$extensions_perrow = $componentParams->get('extensions_perrow', 4);
$spanclass = 'span' . (12 / $extensions_perrow);

$ordering_options[] = JHtml::_('select.option', 't2.link_hits', JText::_('COM_APPS_SORT_BY_POPULAR'));
$ordering_options[] = JHtml::_('select.option', 't2.link_name', JText::_('COM_APPS_SORT_BY_NAME'));
$ordering_options[] = JHtml::_('select.option', 't2.link_rating', JText::_('COM_APPS_SORT_BY_RATING'));
$ordering_options[] = JHtml::_('select.option', 't2.link_created', JText::_('COM_APPS_SORT_BY_CREATED'));

$selected_ordering = $app->input->get('ordering', 't2.link_rating');
$selected_ordering = $app->input->get('ordering', 't2.link_hits');
$view = $app->input->getCmd('view');
if ($view != 'dashboard') {
$firstcrumb = '<a class="transcode" href="<?php echo AppsHelper::getAJAXUrl(\'view=dashboard\'); ?>">' . JText::_('COM_APPS_EXTENSIONS') . '</a>';
Expand Down

0 comments on commit fa50b39

Please sign in to comment.