From 23320f01a21b09b966931209116dc427b0bdd42e Mon Sep 17 00:00:00 2001 From: Izhar Aazmi Date: Mon, 30 May 2016 14:50:16 +0530 Subject: [PATCH] (2) Remove usage of deprecated JArrayHelper - com_menus --- .../components/com_menus/controllers/items.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_menus/controllers/items.php b/administrator/components/com_menus/controllers/items.php index 420f9b8da488b..6cca36ba32f18 100644 --- a/administrator/components/com_menus/controllers/items.php +++ b/administrator/components/com_menus/controllers/items.php @@ -9,6 +9,8 @@ defined('_JEXEC') or die; +use Joomla\Utilities\ArrayHelper; + /** * The Menu Item Controller * @@ -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)) { @@ -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)) @@ -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)) { @@ -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