From d41111a065e532f3f65e4eee7fed189ef949ade3 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Fri, 14 Dec 2012 12:16:27 -0500
Subject: [PATCH] Fixed: Sorting as client can lead to sql errors due to amigious column sys_userid (JOINs)

---
 interface/lib/classes/listform_actions.inc.php |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php
index 9c3e4b3..ed689eb 100644
--- a/interface/lib/classes/listform_actions.inc.php
+++ b/interface/lib/classes/listform_actions.inc.php
@@ -142,7 +142,8 @@
 			if($_SESSION['s']['user']['typ'] == "admin") {
 				$sql_where = '';
 			} else {
-				$sql_where = $app->tform->getAuthSQL('r').' and';
+				$sql_where = $app->tform->getAuthSQL('r', $app->listform->listDef['table']).' and'; 
+                //$sql_where = $app->tform->getAuthSQL('r').' and';
 			}
 		}		
 		if($this->SQLExtWhere != '') {

--
Gitblit v1.9.1