CoreFiles by mySites.guru
preview.php50 lines, 1,217 bytes, from Joomla_3.2.2-Stable-Full_Package.zip
Raw History Compare with 3.2.1
md5
435f4f2246400a58928abb3861629463
sha1
5cb3164d7acb95c4b7c4d0283a250b9270f6dc6f
sha256
4355644e007335a0109df2a8adaa8efc5c9b4fe5d74c2d0688548f13a6fa0ef9
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contenthistory
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ContenthistoryHelper', JPATH_ADMINISTRATOR . '/components/com_contenthistory/helpers/contenthistory.php');

/**
 * Methods supporting a list of contenthistory records.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_contenthistory
 * @since       3.2
 */
class ContenthistoryModelPreview extends JModelItem
{

	/**
	 * Method to get a version history row.
	 *
	 * @return mixed    On success, standard object with row data. False on failure.
	 *
	 * @since   3.2
	 */
	public function getItem()
	{
		$table = JTable::getInstance('Contenthistory');
		$versionId = JFactory::getApplication()->input->getInt('version_id');

		if ($table->load($versionId))
		{
			$result = new stdClass;
			$result->save_date = $table->save_date;
			$result->version_note = $table->version_note;
			$result->data = ContenthistoryHelper::prepareData($table);
		}
		else
		{
			$result = false;
		}

		return $result;
	}
}

The same content is in 13 releases, Joomla 3.2.2 to 3.3.6. See them all, or every version of this file.