Это фрагмент кода, на который ругается. Из файла level.php
class UsersControllerLevel extends JControllerForm
{
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_USERS_LEVEL';
/**
* Method to check if you can save a new or existing record.
*
* Overrides JControllerForm::allowSave to check the core.admin permission.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowSave($data, $key = 'id')
{
return (JFactory::getUser()->authorise('core.admin', $this->option) && parent::allowSave($data, $key));
}
/**
* Removes an item.
*
* Overrides JControllerAdmin::delete to check the core.admin permission.
*
* @return boolean Returns true on success, false on failure.
*
* @since 1.6
*/
public function delete()
{
А это фрагмент из второго файла notes.php (только в двух файлах угроза обнаружена):
class UsersModelNotes extends JModelList
{
/**
* Class constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @since 2.5
*/
public function __construct($config = array())
{
// Set the list ordering fields.
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'id', 'a.id',
'user_id', 'a.user_id',
'u.name',
'subject', 'a.subject',
'catid', 'a.catid', 'category_id',
'state', 'a.state', 'published',
'c.title',
'review_time', 'a.review_time',
'publish_up', 'a.publish_up',
'publish_down', 'a.publish_down',
'level', 'c.level',
);
}
parent::__construct($config);
}
/**
* Build an SQL query to load the list data.
*
* @return JDatabaseQuery A JDatabaseQuery object to retrieve the data set.
*
* @since 2.5
*/
protected function getListQuery()
{
$db = $this->getDbo();
$query = $db->getQuery(true);
// Select the required fields from the table.
$query->select(
$this->getState('list.select',
'a.id, a.subject, a.checked_out, a.checked_out_time,' .
'a.catid, a.created_time, a.review_time,' .
'a.state, a.publish_up, a.publish_down'
)
);
$query->from('#__user_notes AS a');
// Join over the category
$query->select('c.title AS category_title, c.params AS category_params')
->join('LEFT', '#__categories AS c ON c.id = a.catid');
// Join over the users for the note user.
$query->select('u.name AS user_name')
->join('LEFT', '#__users AS u ON u.id = a.user_id');
// Join over the users for the checked out user.
$query->select('uc.name AS editor')
->join('LEFT', '#__users AS uc ON uc.id = a.checked_out');
// Filter by search in title
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}
elseif (stripos($search, 'uid:') === 0)
{
$query->where('a.user_id = ' . (int) substr($search, 4));
}
else
{
$search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true). '%'));
$query->where('((a.subject LIKE ' . $search . ') OR (u.name LIKE ' . $search . ') OR (u.username LIKE ' . $search . '))');
}
}
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.state = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.state IN (0, 1))');
}
// Filter by a single or group of categories.
$categoryId = $this->getState('filter.category_id');
if ($categoryId && is_scalar($categoryId))
{
$query->where('a.catid = ' . $categoryId);
}