diff --git a/libraries/legacy/model/admin.php b/libraries/legacy/model/admin.php index 4b05e0a809855..2b6bcf5480efc 100644 --- a/libraries/legacy/model/admin.php +++ b/libraries/legacy/model/admin.php @@ -10,6 +10,7 @@ defined('JPATH_PLATFORM') or die; use Joomla\Registry\Registry; +use Joomla\Utilities\ArrayHelper; /** * Prototype admin model. @@ -185,7 +186,7 @@ public function batch($commands, $pks, $contexts) { // Sanitize ids. $pks = array_unique($pks); - JArrayHelper::toInteger($pks); + ArrayHelper::toInteger($pks); // Remove any values of zero. if (array_search(0, $pks, true)) @@ -220,7 +221,7 @@ public function batch($commands, $pks, $contexts) if ($this->batch_copymove && !empty($commands[$this->batch_copymove])) { - $cmd = JArrayHelper::getValue($commands, 'move_copy', 'c'); + $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); if ($cmd == 'c') { @@ -871,7 +872,7 @@ public function getItem($pk = null) // Convert to the JObject before adding other data. $properties = $table->getProperties(1); - $item = JArrayHelper::toObject($properties, 'JObject'); + $item = ArrayHelper::toObject($properties, 'JObject'); if (property_exists($item, 'params')) { @@ -1185,7 +1186,7 @@ public function saveorder($pks = null, $order = null) if (empty($pks)) { - return JError::raiseWarning(500, JText::_($this->text_prefix . '_ERROR_NO_ITEMS_SELECTED')); + return JFactory::getApplication()->enqueueMessage(JText::_($this->text_prefix . '_ERROR_NO_ITEMS_SELECTED'), 'warning'); } // Update ordering values