- md5
- a5e846d70b23bc0e27525920588ee9e4
- sha1
- 2d16501b9ec86ec7cdf79f35134b480b277001c0
- sha256
- 7921af077510fc884889a5df6c09505cb090c63879f8bddd56d4b95805eada5a
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
<?php
/**
* @version $Id: controller.php 20196 2011-01-09 02:40:25Z ian $
* @package Joomla.Site
* @subpackage Massmail
* @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.controller');
/**
* Media Manager Component Controller
*
* @package Joomla.Site
* @subpackage Media
* @version 1.5
*/
class MediaController extends JController
{
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
JPluginHelper::importPlugin('content');
$vName = JRequest::getCmd('view', 'images');
switch ($vName)
{
case 'imagesList':
$mName = 'list';
$vLayout = JRequest::getCmd('layout', 'default');
break;
case 'images':
default:
$vLayout = JRequest::getCmd('layout', 'default');
$mName = 'manager';
$vName = 'images';
break;
}
$document = JFactory::getDocument();
$vType = $document->getType();
// Get/Create the view
$view = $this->getView($vName, $vType);
$view->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.'/views/'.strtolower($vName).'/tmpl');
// Get/Create the model
if ($model = $this->getModel($mName)) {
// Push the model into the view (as default)
$view->setModel($model, true);
}
// Set the layout
$view->setLayout($vLayout);
// Display the view
$view->display();
return $this;
}
function ftpValidate()
{
// Set FTP credentials, if given
jimport('joomla.client.helper');
JClientHelper::setCredentialsFromRequest('ftp');
}
}
The same content is in 2 releases, Joomla 1.6.0 to 1.6.1. See them all, or every version of this file.