Skip to content

Commit

Permalink
Remove deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 20, 2024
1 parent bfb57d2 commit 8840bc2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
7 changes: 3 additions & 4 deletions src/Controller/Admin/TranslateDomainsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ class TranslateDomainsController extends TranslateAppController {
* @return \Cake\Http\Response|null|void
*/
public function index() {
$this->paginate = [
'contain' => ['TranslateProjects'],
];
$translateDomains = $this->paginate();
$query = $this->TranslateDomains->find()
->contain(['TranslateProjects']);
$translateDomains = $this->paginate($query);

$this->set(compact('translateDomains'));
//$this->set('_serialize', ['translateDomains']);
Expand Down
4 changes: 0 additions & 4 deletions src/Controller/Admin/TranslateStringsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ public function initialize(): void {
* @return \Cake\Http\Response|null|void
*/
public function index() {
$this->paginate = [
'contain' => [],
];

$query = $this->TranslateStrings->find('search', ['search' => $this->request->getQuery()]);
$translateStrings = $this->paginate($query);

Expand Down
7 changes: 2 additions & 5 deletions src/Controller/Admin/TranslateTermsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ public function initialize(): void {
* @return \Cake\Http\Response|null|void
*/
public function index() {
$this->paginate = [
'contain' => ['TranslateStrings', 'TranslateLanguages'],
];

$query = $this->TranslateTerms->find('search', ['search' => $this->request->getQuery()]);
$query = $this->TranslateTerms->find('search', ['search' => $this->request->getQuery()])
->contain(['TranslateStrings', 'TranslateLanguages']);
$translateTerms = $this->paginate($query);

$this->set(compact('translateTerms'));
Expand Down

0 comments on commit 8840bc2

Please sign in to comment.