- md5
- 6ba56e7cf9898ee4a22cf9288fa1fa0d
- sha1
- f33f8109c3df3026f9cb128f5fef59bec57baba6
- sha256
- 4699f1397ee43f4bef004b2e3de6b342d079b21ba24f355e232638ecb4e5aaa5
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
<?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;
/**
* View to edit a template style.
*
* @package Joomla.Administrator
* @subpackage com_templates
* @since 1.6
*/
class TemplatesViewSource extends JViewLegacy
{
protected $form;
protected $ftp;
protected $source;
protected $state;
protected $template;
/**
* Display the view
*/
public function display($tpl = null)
{
// Initialise variables.
$this->form = $this->get('Form');
$this->ftp = JClientHelper::setCredentialsFromRequest('ftp');
$this->source = $this->get('Source');
$this->state = $this->get('State');
$this->template = $this->get('Template');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JRequest::setVar('hidemainmenu', true);
$user = JFactory::getUser();
$canDo = TemplatesHelper::getActions();
JToolBarHelper::title(JText::_('COM_TEMPLATES_MANAGER_EDIT_FILE'), 'thememanager');
// Can save the item.
if ($canDo->get('core.edit')) {
JToolBarHelper::apply('source.apply');
JToolBarHelper::save('source.save');
}
JToolBarHelper::cancel('source.cancel');
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT_SOURCE');
}
}
The same content is in 2 releases, Joomla 2.5.7 to 2.5.8. See them all, or every version of this file.