30
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-05-29 04:30:46 +00:00

JArrayHelper => ArrayHelper (#221)

* cs and arrayhelper

* cs and arrayhelper
This commit is contained in:
zero-24 2016-06-25 23:23:16 +02:00 committed by Chris Davenport
parent 3514f29bda
commit 0af518e0f3
3 changed files with 23 additions and 22 deletions

View File

@ -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)

View File

@ -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);
}
}