| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 4 * @license GNU General Public License version 2 or later; see LICENSE.txt 5 */ 6 7 // no direct access 8 defined('_JEXEC') or die; 9 10 jimport('joomla.application.component.controller'); 11 12 /** 13 * Component Controller 14 * 15 * @package Joomla.Administrator 16 * @subpackage com_content 17 */ 18 class ContentController extends JController 19 { 20 /** 21 * @var string The default view. 22 * @since 1.6 23 */ 24 protected $default_view = 'articles'; 25 26 /** 27 * Method to display a view. 28 * 29 * @param boolean If true, the view output will be cached 30 * @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. 31 * 32 * @return JController This object to support chaining. 33 * @since 1.5 34 */ 35 public function display($cachable = false, $urlparams = false) 36 { 37 // Load the submenu. 38 ContentHelper::addSubmenu(JRequest::getCmd('view', 'articles')); 39 40 $view = JRequest::getCmd('view', 'articles'); 41 $layout = JRequest::getCmd('layout', 'articles'); 42 $id = JRequest::getInt('id'); 43 44 // Check for edit form. 45 if ($view == 'article' && $layout == 'edit' && !$this->checkEditId('com_content.edit.article', $id)) { 46 // Somehow the person just went to the form - we don't allow that. 47 $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); 48 $this->setMessage($this->getError(), 'error'); 49 $this->setRedirect(JRoute::_('index.php?option=com_content&view=articles', false)); 50 51 return false; 52 } 53 54 parent::display(); 55 56 return $this; 57 } 58 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |