Commit cd959b13acc58aa41422002bf403e3f4e57b80a7

Authored by nbm
1 parent 7f9fafb2

Database portability fixes


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3310 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/listUsersUI.inc
@@ -31,7 +31,7 @@ function getGroupDisplay($iGroupID) { @@ -31,7 +31,7 @@ function getGroupDisplay($iGroupID) {
31 $oPatternListBox = & new PatternListBox($default->groups_table, "name", "id", "fGroupID"); 31 $oPatternListBox = & new PatternListBox($default->groups_table, "name", "id", "fGroupID");
32 $oPatternListBox->setFromClause("LEFT OUTER JOIN groups_units_link GUL on ST.id=GUL.group_id " . 32 $oPatternListBox->setFromClause("LEFT OUTER JOIN groups_units_link GUL on ST.id=GUL.group_id " .
33 "LEFT OUTER JOIN units_lookup UL on GUL.unit_id=UL.id"); 33 "LEFT OUTER JOIN units_lookup UL on GUL.unit_id=UL.id");
34 - $oPatternListBox->setCompositeDisplayName("DISTINCT COALESCE(CONCAT(CONCAT(UL.name, '-'),ST.name),ST.name)"); 34 + $oPatternListBox->setCompositeDisplayName("COALESCE(CONCAT(CONCAT(UL.name, '-'),ST.name),ST.name)");
35 } else if (Permission::userIsUnitAdministrator()) { 35 } else if (Permission::userIsUnitAdministrator()) {
36 // else if this is a unit administrator, only display the groups in your unit 36 // else if this is a unit administrator, only display the groups in your unit
37 $oPatternListBox = & new PatternListBox($default->groups_table, "name", "id", "fGroupID"); 37 $oPatternListBox = & new PatternListBox($default->groups_table, "name", "id", "fGroupID");
@@ -56,7 +56,7 @@ function getUsers($iGroupID, $sName) { @@ -56,7 +56,7 @@ function getUsers($iGroupID, $sName) {
56 // changed from inner to outer joins to include users that aren't in any groups (Stefano Ciancio [s.ciancio@pisa.iol.it]) 56 // changed from inner to outer joins to include users that aren't in any groups (Stefano Ciancio [s.ciancio@pisa.iol.it])
57 $aParam = array(); 57 $aParam = array();
58 /*ok*/ $sQuery = "SELECT DISTINCT U.id as userID, U.name as name, U.username, " . 58 /*ok*/ $sQuery = "SELECT DISTINCT U.id as userID, U.name as name, U.username, " .
59 - "'Edit', 'Delete', 'Edit Groups' " . 59 + "'Edit' AS \"Edit\", 'Delete' AS \"Delete\", 'Edit Groups' AS \"Edit Groups\" " .
60 "FROM $default->users_table U " . 60 "FROM $default->users_table U " .
61 "LEFT OUTER JOIN $default->users_groups_table UGL ON U.id = UGL.user_id " . 61 "LEFT OUTER JOIN $default->users_groups_table UGL ON U.id = UGL.user_id " .
62 "LEFT OUTER JOIN $default->groups_table GL ON UGL.group_id = GL.id "; 62 "LEFT OUTER JOIN $default->groups_table GL ON UGL.group_id = GL.id ";