mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-02-05 02:38:24 +00:00
JArrayHelper => ArrayHelper (#221)
* cs and arrayhelper * cs and arrayhelper
This commit is contained in:
parent
3514f29bda
commit
0af518e0f3
@ -9,6 +9,8 @@
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Weblink controller class.
|
||||
*
|
||||
@ -27,14 +29,13 @@ class WeblinksControllerWeblink extends JControllerForm
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$categoryId = JArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int');
|
||||
$categoryId = ArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int');
|
||||
$allow = null;
|
||||
|
||||
if ($categoryId)
|
||||
{
|
||||
// If the category has been passed in the URL check it.
|
||||
$allow = $user->authorise('core.create', $this->option . '.category.' . $categoryId);
|
||||
$allow = JFactory::getUser()->authorise('core.create', $this->option . '.category.' . $categoryId);
|
||||
}
|
||||
|
||||
if ($allow !== null)
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables');
|
||||
|
||||
/**
|
||||
@ -80,7 +82,7 @@ class WeblinksModelWeblink extends JModelItem
|
||||
|
||||
// Convert the JTable to a clean JObject.
|
||||
$properties = $table->getProperties(1);
|
||||
$this->_item = JArrayHelper::toObject($properties, 'JObject');
|
||||
$this->_item = ArrayHelper::toObject($properties, 'JObject');
|
||||
}
|
||||
elseif ($error = $table->getError())
|
||||
{
|
||||
@ -121,8 +123,6 @@ class WeblinksModelWeblink extends JModelItem
|
||||
$id = $this->getState('weblink.id');
|
||||
}
|
||||
|
||||
$weblink = $this->getTable('Weblink', 'WeblinksTable');
|
||||
|
||||
return $weblink->hit($id);
|
||||
return $this->getTable('Weblink', 'WeblinksTable')->hit($id);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user