CoreFiles by mySites.guru
message.php48 lines, 1,269 bytes, from Joomla_2.5.0-Stable-Full_Package.zip
Raw History Compare with 1.7.5
md5
d0b54c16cb0282b625b9ec33b496c382
sha1
10f9d2c9a302d7228e398c7ba1d23f3990532ded
sha256
6534615f2621200bbbfcd26d53ba6669268add9692c34d3ca33f4bda9e1b8c88
<?php
/**
 * @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;

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

/**
 * Messages Component Message Model
 *
 * @package		Joomla.Administrator
 * @subpackage	com_messages
 * @since		1.6
 */
class MessagesControllerMessage extends JControllerForm
{
	/**
	 * Method (override) to check if you can save a new or existing record.
	 *
	 * Adjusts for the primary key name and hands off to the parent class.
	 *
	 * @param	array	An array of input data.
	 * @param	string	The name of the key for the primary key.
	 *
	 * @return	boolean
	 */
	protected function allowSave($data, $key = 'message_id')
	{
		return parent::allowSave($data, $key);
	}

	/**
	 * Reply to an existing message.
	 *
	 * This is a simple redirect to the compose form.
	 */
	public function reply()
	{
		if ($replyId = JRequest::getInt('reply_id')) {
			$this->setRedirect('index.php?option=com_messages&view=message&layout=edit&reply_id='.$replyId);
		} else {
			$this->setMessage(JText::_('COM_MESSAGES_INVALID_REPLY_ID'));
			$this->setRedirect('index.php?option=com_messages&view=messages');
		}
	}
}

The same content is in 9 releases, Joomla 2.5.0 to 2.5.8. See them all, or every version of this file.