- md5
- 2c1bca97db0cb9bd7672db827ed946d7
- sha1
- 4ea5cfcfe522931209e6d34cfdf43dd9fe35e511
- sha256
- f7bf141047738351eb10d904f1bb204d52de987fbbc2ca3dd2b6e1013001e468
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the helper functions only once
require_once __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)));
$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'));
$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'));
break;
case 'author':
case 'category_title':
$list = modArticlesCategoryHelper::groupBy($list, $article_grouping, $article_grouping_direction);
break;
default:
break;
}
}
require JModuleHelper::getLayoutPath('mod_articles_category', $params->get('layout', 'default'));
}
The same content is in 3 releases, Joomla 3.0.0 to 3.0.2. See them all, or every version of this file.