From 44e445f417efecc6ef4e6a6a43932175b3966031 Mon Sep 17 00:00:00 2001 From: JediKev <kevin@enhancesoft.com> Date: Thu, 2 Nov 2017 12:15:03 -0500 Subject: [PATCH] issue: Organization User List Pages Link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This addresses an issue where clicking on Page 2 or above in an Organization’s Users tab will bring you out of the User tab and put you in the User Directory. This was caused by the setUrl() method as it only set the URL to the User Directory. This adds a check to see if the Agent is within the Organization tab and if so it’ll set the correct URL. --- include/staff/templates/users.tmpl.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/staff/templates/users.tmpl.php b/include/staff/templates/users.tmpl.php index 7d56f26ef..b34fa6111 100644 --- a/include/staff/templates/users.tmpl.php +++ b/include/staff/templates/users.tmpl.php @@ -36,7 +36,10 @@ $pageNav=new Pagenate($total,$page,PAGE_LIMIT); $qstr = '&'. Http::build_query($qs); $qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']); -$pageNav->setURL('users.php', $qs); +if (strpos($_SERVER['REQUEST_URI'], 'orgs.php') !== false) + $pageNav->setURL('orgs.php?id='.$org->getId().'&', $qs); +else + $pageNav->setURL('users.php', $qs); //Ok..lets roll...create the actual query $qstr .= '&order='.($order=='DESC' ? 'ASC' : 'DESC'); -- GitLab