- md5
- 717d305228f2273961b95a2c597b3617
- sha1
- 5e0ea933b27f26f06d51e50e36a61c746de2884d
- sha256
- b9115140524ef1abedc07dc8a6e09759d42a042e33cff4e46a9f541de06cc959
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
<?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;
/**
* Component Controller
*
* @package Joomla.Administrator
* @subpackage com_content
*/
class ContentController extends JControllerLegacy
{
/**
* @var string The default view.
* @since 1.6
*/
protected $default_view = 'articles';
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
// Load the submenu.
ContentHelper::addSubmenu(JRequest::getCmd('view', 'articles'));
$view = JRequest::getCmd('view', 'articles');
$layout = JRequest::getCmd('layout', 'articles');
$id = JRequest::getInt('id');
// Check for edit form.
if ($view == 'article' && $layout == 'edit' && !$this->checkEditId('com_content.edit.article', $id)) {
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_content&view=articles', false));
return false;
}
parent::display();
return $this;
}
}
The same content is in 2 releases, Joomla 2.5.7 to 2.5.8. See them all, or every version of this file.