- md5
- 7f521c6005739a6652dfab0fabc3ddbc
- sha1
- 67d1a5f8c4a31836c410212a004da62771a2f033
- sha256
- 77194580c596fa43e81b716054c92b8cd4c4012cecfcc09dc55d69da595fa59a
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
<?php
/**
* @version $Id: view.html.php 20523 2011-02-03 01:26:20Z dextercowley $
* @package Joomla.Site
* @subpackage com_wrapper
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* @package Joomla.Site
* @subpackage Wrapper
*/
class WrapperViewWrapper extends JView
{
public function display($tpl = null)
{
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$menus = $app->getMenu();
$menu = $menus->getActive();
$params = $app->getParams();
// because the application sets a default page title, we need to get it
// right from the menu item itself
$title = $params->get('page_title', '');
if (empty($title)) {
$title = $app->getCfg('sitename');
}
elseif ($app->getCfg('sitename_pagetitles', 0)) {
$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
}
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
$wrapper = new stdClass();
// auto height control
if ($params->def('height_auto')) {
$wrapper->load = 'onload="iFrameHeight()"';
} else {
$wrapper->load = '';
}
$url = $params->def('url', '');
if ($params->def('add_scheme', 1))
{
// adds 'http://' if none is set
if (substr($url, 0, 1) == '/')
{
// relative url in component. use server http_host.
$wrapper->url = 'http://'. $_SERVER['HTTP_HOST'] . $url;
}
elseif (!strstr($url, 'http') && !strstr($url, 'https')) {
$wrapper->url = 'http://'. $url;
}
else {
$wrapper->url = $url;
}
}
else {
$wrapper->url = $url;
}
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
$this->assignRef('params', $params);
$this->assignRef('wrapper', $wrapper);
parent::display($tpl);
}
}
No other release has this exact content. See every version of this file.