From 3d5e634b20c59110cfa31918b5f4ed10b966fdfc Mon Sep 17 00:00:00 2001 From: paritshivani <58217306+paritshivani@users.noreply.github.com> Date: Tue, 18 Feb 2020 14:08:27 +0530 Subject: [PATCH] Bug #19 fix: Remove delete functionality from backhand users list view. (#20) * Bug #157765 fix: Remove delete functionality from backhand users list view. * Bug #157765 fix: Remove delete functionality from backhand users list view. * Bug #157765 fix: Remove delete functionality from backhand users list view. --- src/components/com_tc/administrator/models/usertcs.php | 3 ++- src/components/com_tc/administrator/tables/usertcs.php | 3 ++- .../com_tc/administrator/views/usertcs/view.html.php | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/com_tc/administrator/models/usertcs.php b/src/components/com_tc/administrator/models/usertcs.php index ac9d78c..25b4336 100755 --- a/src/components/com_tc/administrator/models/usertcs.php +++ b/src/components/com_tc/administrator/models/usertcs.php @@ -198,6 +198,7 @@ public function getTable($type = 'usertcs', $prefix = 'TcTable', $config = array * * @since 1.0.0 */ + /** public function delete($cid) { $db = JFactory::getDbo(); @@ -228,7 +229,7 @@ public function delete($cid) return true; } - + */ /** * Method to save the user T&C acceptance entry. * diff --git a/src/components/com_tc/administrator/tables/usertcs.php b/src/components/com_tc/administrator/tables/usertcs.php index 5a9ef68..56e3cbc 100755 --- a/src/components/com_tc/administrator/tables/usertcs.php +++ b/src/components/com_tc/administrator/tables/usertcs.php @@ -51,6 +51,7 @@ public function check() * * @return bool */ + /** public function delete($pk = null) { $this->load($pk); @@ -58,7 +59,7 @@ public function delete($pk = null) return $result; } - + */ /** * Method to load a row from the database by primary key and bind the fields to the JTable instance properties. * diff --git a/src/components/com_tc/administrator/views/usertcs/view.html.php b/src/components/com_tc/administrator/views/usertcs/view.html.php index 507a259..ab1e2fa 100755 --- a/src/components/com_tc/administrator/views/usertcs/view.html.php +++ b/src/components/com_tc/administrator/views/usertcs/view.html.php @@ -82,8 +82,13 @@ protected function addToolbar() if (isset($this->items[0])) { // If this component does not use state then show a direct delete button as we can not trash - JToolBarHelper::deleteList('', 'usertcs.delete', 'JTOOLBAR_DELETE'); + //JToolBarHelper::deleteList('', 'usertcs.delete', 'JTOOLBAR_DELETE'); } } + + if ($canDo->get('core.admin')) + { + JToolBarHelper::preferences('com_tc'); + } } }