From d42c0041d27bfe079a7691ddea046c1fe1e8432c Mon Sep 17 00:00:00 2001 From: Niklas Forsdahl Date: Thu, 13 Dec 2012 16:31:19 +0200 Subject: [PATCH] BUG: Fixed pagination functionality on root assets folder Moving to another page in the GridField for the root assets folder in AssetAdmin caused all files to be displayed. This was caused by the functionality that tries to fix some edge cases for detail view kicked in and didn't filter the list properly. Fixed by making the edge case detection a little more specific (i.e. checking if a numeric ID was sent as a request variable). --- code/controllers/AssetAdmin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index eff6eb03..58e15a05 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -95,7 +95,7 @@ JS // Don't filter list when a detail view is requested, // to avoid edge cases where the filtered list wouldn't contain the requested // record due to faulty session state (current folder not always encoded in URL, see #7408). - if(!$folder->ID && ($this->request->param('ID') == 'field')) { + if(!$folder->ID && $this->request->requestVar('ID') === null && ($this->request->param('ID') == 'field')) { return $list; }