CoreFiles by mySites.guru
languages.php47 lines, 1,171 bytes, from Joomla_1.6.1-Stable-Full_Package.zip
Raw History Compare with 1.6.0
md5
7ae4ebe4c61b0299bd32eea6ac1ab5c7
sha1
e511bf2daa575a46197c1f2a579ef899837ee19c
sha256
87d032120fa8097b291c887a43cb07f47f07c1e216faf232ca886f2e58e33c5a
<?php
/**
 * @version		$Id: languages.php 20196 2011-01-09 02:40:25Z ian $
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

jimport('joomla.application.component.controlleradmin');

/**
 * @package		Joomla.Administrator
 * @subpackage	com_languages
 * @since	1.6
 */
class LanguagesControllerLanguages extends JControllerAdmin
{
	/**
	 * Proxy for getModel
	 * @since	1.6
	 */
	function &getModel($name = 'Language', $prefix = 'LanguagesModel')
	{
		$model = parent::getModel($name, $prefix, array('ignore_request' => true));
		return $model;
	}

	/**
	 * Override the execute method to clear the language cache for non-display tasks.
	 *
	 * @param	string		The task to perform.
	 * @return	mixed|false	The value returned by the called method, false in error case.
	 * @since	1.6
	 */
	public function execute($task)
	{
		parent::execute($task);

		// Clear the component's cache
		if ($task != 'display' && $task != 'edit') {
			$cache = JFactory::getCache('com_languages');
			$cache->clean();
		}
	}
}

The same content is in 2 releases, Joomla 1.6.0 to 1.6.1. See them all, or every version of this file.