diff --git a/administrator/components/com_postinstall/src/Controller/MessageController.php b/administrator/components/com_postinstall/src/Controller/MessageController.php index ff2fc8e82453e..51029cd8cee5f 100644 --- a/administrator/components/com_postinstall/src/Controller/MessageController.php +++ b/administrator/components/com_postinstall/src/Controller/MessageController.php @@ -35,7 +35,7 @@ public function reset() $this->checkToken('get'); /** @var MessagesModel $model */ - $model = $this->getModel('Messages', '', array('ignore_request' => true)); + $model = $this->getModel('Messages', '', ['ignore_request' => true]); $eid = $this->input->getInt('eid'); if (empty($eid)) @@ -57,7 +57,7 @@ public function reset() */ public function unpublish() { - $model = $this->getModel('Messages', '', array('ignore_request' => true)); + $model = $this->getModel('Messages', '', ['ignore_request' => true]); $id = $this->input->get('id'); @@ -83,7 +83,7 @@ public function unpublish() */ public function republish() { - $model = $this->getModel('Messages', '', array('ignore_request' => true)); + $model = $this->getModel('Messages', '', ['ignore_request' => true]); $id = $this->input->get('id'); @@ -109,7 +109,7 @@ public function republish() */ public function archive() { - $model = $this->getModel('Messages', '', array('ignore_request' => true)); + $model = $this->getModel('Messages', '', ['ignore_request' => true]); $id = $this->input->get('id'); @@ -137,7 +137,7 @@ public function action() { $this->checkToken('get'); - $model = $this->getModel('Messages', '', array('ignore_request' => true)); + $model = $this->getModel('Messages', '', ['ignore_request' => true]); $id = $this->input->get('id'); @@ -178,7 +178,7 @@ public function hideAll() $this->checkToken(); /** @var MessagesModel $model */ - $model = $this->getModel('Messages', '', array('ignore_request' => true)); + $model = $this->getModel('Messages', '', ['ignore_request' => true]); $eid = $this->input->getInt('eid'); if (empty($eid)) diff --git a/administrator/components/com_postinstall/src/Model/MessagesModel.php b/administrator/components/com_postinstall/src/Model/MessagesModel.php index 99fcfd0218c02..e2c3355d4df70 100644 --- a/administrator/components/com_postinstall/src/Model/MessagesModel.php +++ b/administrator/components/com_postinstall/src/Model/MessagesModel.php @@ -131,7 +131,7 @@ public function unpublishMessage($id) */ public function archiveMessage($id) { - $db = $this->getDbo(); + $db = $this->getDatabase(); $id = (int) $id; $query = $db->getQuery(true); @@ -156,7 +156,7 @@ public function archiveMessage($id) */ public function republishMessage($id) { - $db = $this->getDbo(); + $db = $this->getDatabase(); $id = (int) $id; $query = $db->getQuery(true); @@ -210,7 +210,7 @@ public function getItems() ->bind(':eid', $eid, ParameterType::INTEGER); // Force filter only enabled messages - $query->where($db->quoteName('enabled') . ' IN (1,2)'); + $query->whereIn($db->quoteName('enabled'), [1, 2]); $db->setQuery($query); try