Permalink
Browse files

Merge pull request #2496 from LukeTowers/patch-7

Pass current model to RelationController view & manage scopes
2 parents dba4f37 + 05ab8bd commit 97b0bc481f948045f96a420bb54ab48628bfdddc @daftspunk daftspunk committed on GitHub Nov 17, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/backend/behaviors/RelationController.php
@@ -645,7 +645,7 @@ protected function makeViewWidget()
}
elseif ($scopeMethod = $this->getConfig('view[scope]')) {
$widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) {
- $query->$scopeMethod();
+ $query->$scopeMethod($this->model);
});
}
else {
@@ -775,7 +775,7 @@ protected function makeManageWidget()
}
elseif ($scopeMethod = $this->getConfig('manage[scope]')) {
$widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) {
- $query->$scopeMethod();
+ $query->$scopeMethod($this->model);
});
}
else {

0 comments on commit 97b0bc4

Please sign in to comment.