Skip to content

Commit b7cd314

Browse files
authored
[6.0] Remove deprecated db object from views (joomla#42962)
1 parent c7dc02c commit b7cd314

File tree

3 files changed

+0
-41
lines changed

3 files changed

+0
-41
lines changed

administrator/components/com_users/src/View/Users/HtmlView.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010

1111
namespace Joomla\Component\Users\Administrator\View\Users;
1212

13-
use Joomla\CMS\Factory;
1413
use Joomla\CMS\Helper\ContentHelper;
1514
use Joomla\CMS\Language\Text;
1615
use Joomla\CMS\MVC\View\GenericDataException;
1716
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
1817
use Joomla\CMS\Toolbar\Button\DropdownButton;
1918
use Joomla\CMS\Toolbar\ToolbarHelper;
2019
use Joomla\Component\Users\Administrator\Model\UsersModel;
21-
use Joomla\Database\DatabaseDriver;
2220

2321
// phpcs:disable PSR1.Files.SideEffects
2422
\defined('_JEXEC') or die;
@@ -80,18 +78,6 @@ class HtmlView extends BaseHtmlView
8078
*/
8179
protected $canDo;
8280

83-
/**
84-
* An instance of DatabaseDriver.
85-
*
86-
* @var DatabaseDriver
87-
* @since 3.6.3
88-
*
89-
* @deprecated 4.3 will be removed in 6.0
90-
* Will be removed without replacement use database from the container instead
91-
* Example: Factory::getContainer()->get(DatabaseInterface::class);
92-
*/
93-
protected $db;
94-
9581
/**
9682
* Display the view
9783
*
@@ -110,7 +96,6 @@ public function display($tpl = null)
11096
$this->filterForm = $model->getFilterForm();
11197
$this->activeFilters = $model->getActiveFilters();
11298
$this->canDo = ContentHelper::getActions('com_users');
113-
$this->db = Factory::getDbo();
11499

115100
// Check for errors.
116101
if (\count($errors = $model->getErrors())) {

components/com_content/src/View/Featured/HtmlView.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,6 @@ class HtmlView extends BaseHtmlView
7171
*/
7272
protected $link_items = [];
7373

74-
/**
75-
* @var \Joomla\Database\DatabaseDriver
76-
*
77-
* @since 3.6.3
78-
*
79-
* @deprecated 4.3 will be removed in 6.0
80-
* Will be removed without replacement use database from the container instead
81-
* Example: Factory::getContainer()->get(DatabaseInterface::class);
82-
*/
83-
protected $db;
84-
8574
/**
8675
* The user object
8776
*
@@ -205,7 +194,6 @@ public function display($tpl = null)
205194
$this->items = &$items;
206195
$this->pagination = &$pagination;
207196
$this->user = &$user;
208-
$this->db = Factory::getDbo();
209197

210198
$this->_prepareDocument();
211199

components/com_users/src/View/Profile/HtmlView.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Joomla\CMS\User\User;
2020
use Joomla\Component\Users\Administrator\Helper\Mfa;
2121
use Joomla\Component\Users\Site\Model\ProfileModel;
22-
use Joomla\Database\DatabaseDriver;
2322

2423
// phpcs:disable PSR1.Files.SideEffects
2524
\defined('_JEXEC') or die;
@@ -60,18 +59,6 @@ class HtmlView extends BaseHtmlView
6059
*/
6160
protected $state;
6261

63-
/**
64-
* An instance of DatabaseDriver.
65-
*
66-
* @var DatabaseDriver
67-
* @since 3.6.3
68-
*
69-
* @deprecated 4.3 will be removed in 6.0
70-
* Will be removed without replacement use database from the container instead
71-
* Example: Factory::getContainer()->get(DatabaseInterface::class);
72-
*/
73-
protected $db;
74-
7562
/**
7663
* The page class suffix
7764
*
@@ -109,7 +96,6 @@ public function display($tpl = null)
10996
$this->state = $model->getState();
11097
$this->params = $this->state->get('params');
11198
$this->mfaConfigurationUI = Mfa::getConfigurationInterface($user);
112-
$this->db = Factory::getDbo();
11399

114100
// Check for errors.
115101
if (\count($errors = $model->getErrors())) {

0 commit comments

Comments
 (0)