| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: controller.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Content 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant to the 9 * GNU General Public License, and as distributed it includes or is derivative 10 * of works licensed under the GNU General Public License or other free or open 11 * source software licenses. See COPYRIGHT.php for copyright notices and 12 * details. 13 */ 14 15 // Check to ensure this file is included in Joomla! 16 defined('_JEXEC') or die( 'Restricted access' ); 17 18 jimport('joomla.application.component.controller'); 19 20 /** 21 * Weblinks Component Controller 22 * 23 * @package Joomla 24 * @subpackage Weblinks 25 * @since 1.5 26 */ 27 class WeblinksController extends JController 28 { 29 /** 30 * Method to show a weblinks view 31 * 32 * @access public 33 * @since 1.5 34 */ 35 function display() 36 { 37 // Set a default view if none exists 38 if ( ! JRequest::getCmd( 'view' ) ) { 39 JRequest::setVar('view', 'categories' ); 40 } 41 42 //update the hit count for the weblink 43 if(JRequest::getCmd('view') == 'weblink') 44 { 45 $model =& $this->getModel('weblink'); 46 $model->hit(); 47 } 48 49 // View caching logic -- simple... are we logged in? 50 $user = &JFactory::getUser(); 51 $view = JRequest::getVar('view'); 52 $viewcache = JRequest::getVar('viewcache', '1', 'POST', 'INT'); 53 if ($user->get('id') || ($view == 'category' && $viewcache == 0)) { 54 parent::display(false); 55 } else { 56 parent::display(true); 57 } 58 } 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |