- md5
- 1be4b4ee6b8b3cb29d29e26cb7a394af
- sha1
- b1229407516e06d43d1808a03bd794641f652d23
- sha256
- 7e8e323b3e3e68c4efa3a0825bd9ec6d3afd242e6b2b1771bde32443c7957714
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the helper functions only once
JLoader::register('ModArticlesCategoryHelper', __DIR__ . '/helper.php');
$input = JFactory::getApplication()->input;
// Prep for Normal or Dynamic Modes
$mode = $params->get('mode', 'normal');
$idbase = null;
switch ($mode)
{
case 'dynamic' :
$option = $input->get('option');
$view = $input->get('view');
if ($option === 'com_content')
{
switch ($view)
{
case 'category' :
$idbase = $input->getInt('id');
break;
case 'categories' :
$idbase = $input->getInt('id');
break;
case 'article' :
if ($params->get('show_on_article_page', 1))
{
$idbase = $input->getInt('catid');
}
break;
}
}
break;
case 'normal' :
default:
$idbase = $params->get('catid');
break;
}
$cacheid = md5(serialize(array ($idbase, $module->module, $module->id)));
$cacheparams = new stdClass;
$cacheparams->cachemode = 'id';
$cacheparams->class = 'ModArticlesCategoryHelper';
$cacheparams->method = 'getList';
$cacheparams->methodparams = $params;
$cacheparams->modeparams = $cacheid;
$list = JModuleHelper::moduleCache($module, $params, $cacheparams);
if (!empty($list))
{
$grouped = false;
$article_grouping = $params->get('article_grouping', 'none');
$article_grouping_direction = $params->get('article_grouping_direction', 'ksort');
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
$item_heading = $params->get('item_heading');
if ($article_grouping !== 'none')
{
$grouped = true;
switch ($article_grouping)
{
case 'year' :
case 'month_year' :
$list = ModArticlesCategoryHelper::groupByDate(
$list,
$article_grouping,
$article_grouping_direction,
$params->get('month_year_format', 'F Y'),
$params->get('date_grouping_field', 'created')
);
break;
case 'author' :
case 'category_title' :
$list = ModArticlesCategoryHelper::groupBy($list, $article_grouping, $article_grouping_direction);
break;
case 'tags' :
$list = ModArticlesCategoryHelper::groupByTags($list, $article_grouping_direction);
break;
default:
break;
}
}
require JModuleHelper::getLayoutPath('mod_articles_category', $params->get('layout', 'default'));
}
The same content is in 12 releases, Joomla 3.10.0-alpha2 to 3.10.5. See them all, or every version of this file.