Skip to content

Commit

Permalink
(2) Remove usage of deprecated JArrayHelper - com_menus
Browse files Browse the repository at this point in the history
  • Loading branch information
izharaazmi committed May 30, 2016
1 parent 30b11e9 commit 23320f0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions administrator/components/com_menus/controllers/items.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

/**
* The Menu Item Controller
*
Expand Down Expand Up @@ -126,7 +128,7 @@ public function setDefault()
$cid = $this->input->get('cid', array(), 'array');
$data = array('setDefault' => 1, 'unsetDefault' => 0);
$task = $this->getTask();
$value = JArrayHelper::getValue($data, $task, 0, 'int');
$value = ArrayHelper::getValue($data, $task, 0, 'int');

if (empty($cid))
{
Expand All @@ -138,7 +140,7 @@ public function setDefault()
$model = $this->getModel();

// Make sure the item ids are integers
JArrayHelper::toInteger($cid);
$cid = ArrayHelper::toInteger($cid);

// Publish the items.
if (!$model->setHome($cid, $value))
Expand Down Expand Up @@ -184,7 +186,7 @@ public function publish()
$cid = JFactory::getApplication()->input->get('cid', array(), 'array');
$data = array('publish' => 1, 'unpublish' => 0, 'trash' => -2, 'report' => -3);
$task = $this->getTask();
$value = JArrayHelper::getValue($data, $task, 0, 'int');
$value = ArrayHelper::getValue($data, $task, 0, 'int');

if (empty($cid))
{
Expand All @@ -196,7 +198,7 @@ public function publish()
$model = $this->getModel();

// Make sure the item ids are integers
JArrayHelper::toInteger($cid);
$cid = ArrayHelper::toInteger($cid);

// Publish the items.
try
Expand Down

0 comments on commit 23320f0

Please sign in to comment.