| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Administrator 4 * @subpackage com_media 5 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 */ 8 9 // no direct access 10 defined('_JEXEC') or die; 11 12 // Access check. 13 14 $user = JFactory::getUser(); 15 $asset = JRequest::getCmd('asset'); 16 $author = JRequest::getCmd('author'); 17 18 if ( !$user->authorise('core.manage', 'com_media') 19 && (!$asset or ( 20 !$user->authorise('core.edit', $asset) 21 && !$user->authorise('core.create', $asset) 22 && count($user->getAuthorisedCategories($asset, 'core.create')) == 0) 23 && !($user->id==$author && $user->authorise('core.edit.own', $asset)))) 24 { 25 return JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); 26 } 27 28 $params = JComponentHelper::getParams('com_media'); 29 30 // Load the admin HTML view 31 require_once JPATH_COMPONENT.'/helpers/media.php'; 32 33 // Set the path definitions 34 $popup_upload = JRequest::getCmd('pop_up', null); 35 $path = "file_path"; 36 37 $view = JRequest::getCmd('view'); 38 if (substr(strtolower($view), 0, 6) == "images" || $popup_upload == 1) { 39 $path = "image_path"; 40 } 41 42 define('COM_MEDIA_BASE', JPATH_ROOT.'/'.$params->get($path, 'images')); 43 define('COM_MEDIA_BASEURL', JURI::root().$params->get($path, 'images')); 44 45 // Include dependancies 46 jimport('joomla.application.component.controller'); 47 48 $controller = JController::getInstance('Media'); 49 $controller->execute(JRequest::getCmd('task')); 50 $controller->redirect();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |