Грешка при модул на Joomla

kenwelo

Registered
Вижте каква грешка ми дава...

Warning: Invalid argument supplied for foreach() in /www/music-area.info/www/root/components/com_eventlist/helpers/route.php on line 87

Warning: Invalid argument supplied for foreach() in /www/music-area.info/www/root/components/com_eventlist/helpers/route.php on line 96

Ето кода и на самият файл


Код:
<?php
/**
 * @version 1.0 $Id: route.php 958 2009-02-02 17:23:05Z julienv $
 * @package Joomla
 * @subpackage EventList
 * @copyright (C) 2005 - 2009 Christoph Lukes
 * @license GNU/GPL, see LICENSE.php
 * EventList is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.

 * EventList is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with EventList; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

defined('_JEXEC') or die('Restricted access');

// Component Helper
jimport('joomla.application.component.helper');

/**
 * EventList Component Route Helper
 * based on Joomla ContentHelperRoute
 *
 * @static
 * @package		Joomla
 * @subpackage	EventList
 * @since 0.9
 */
class EventListHelperRoute
{
	/**
	 * Determines an EventList Link
	 *
	 * @param int The id of an EventList item
	 * @param string The view
	 * @since 0.9
	 *
	 * @return string determined Link
	 */
	function getRoute($id, $view = 'details')
	{
		//Not needed currently but kept because of a possible hierarchic link structure in future
		$needles = array(
			$view  => (int) $id
		);

		//Create the link
		$link = 'index.php?option=com_eventlist&view='.$view.'&id='. $id;

		if($item = EventListHelperRoute::_findItem($needles)) {
			$link .= '&Itemid='.$item->id;
		};

		return $link;
	}

	/**
	 * Determines the Itemid
	 *
	 * searches if a menuitem for this item exists
	 * if not the first match will be returned
	 *
	 * @param array The id and view
	 * @since 0.9
	 *
	 * @return int Itemid
	 */
	function _findItem($needles)
	{
		$component =& JComponentHelper::getComponent('com_eventlist');

		$menus	= & JSite::getMenu();
		$items	= $menus->getItems('componentid', $component->id);
		$user 	= & JFactory::getUser();
		$access = (int)$user->get('aid');

		//Not needed currently but kept because of a possible hierarchic link structure in future
		foreach($needles as $needle => $id)
		{
			foreach($items as $item)
			{

				if ((@$item->query['view'] == $needle) && (@$item->query['id'] == $id) && ($item->published == 1) && ($item->access <= $access)) {
					return $item;
				}
			}

			//no menuitem exists -> return first possible match
			foreach($items as $item)
			{
				if ($item->published == 1 && $item->access <= $access) {
					return $item;
				}
			}

		}

		return false;
	}
}
?>

Ето и самият сайт да видите за какво става въпрос :

http://music-area.info
 

Back
Горе