CoreFiles by mySites.guru
mod_random_image.php29 lines, 866 bytes, from Joomla_3.10.3-Stable-Full_Package.zip
Raw History Compare with 3.10.2
md5
e60866374c7d2049ed89f31349105eec
sha1
9c3d7a4afc8e6fe008d6eff56b93bf0e3a73c917
sha256
9c9dbb140a1495835d35470e88789a0a49837c3eb49d2ffc020305692c68b9eb
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_random_image
 *
 * @copyright   (C) 2005 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 random image functions only once
JLoader::register('ModRandomImageHelper', __DIR__ . '/helper.php');

$link   = $params->get('link');
$folder = ModRandomImageHelper::getFolder($params);
$images = ModRandomImageHelper::getImages($params, $folder);

if (!count($images))
{
	echo JText::_('MOD_RANDOM_IMAGE_NO_IMAGES');

	return;
}

$image           = ModRandomImageHelper::getRandomImage($params, $images);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');

require JModuleHelper::getLayoutPath('mod_random_image', $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.