Skip to content

Commit

Permalink
Fix missing $prefix in group share related queries
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Nov 24, 2021
1 parent 74d2fce commit 58d7f79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions website_code/php/properties/group_sharing_status_template.php
Expand Up @@ -57,9 +57,9 @@

$user_groups = db_query($sql, array($template_id));

$sql = "SELECT user_groups.group_id, group_name, role FROM " .
"{$prefix}user_groups, {$prefix}template_group_rights WHERE " .
"{$prefix}user_groups.group_id = {$prefix}template_group_rights.group_id and template_id= ? ORDER BY group_name";
$sql = "SELECT ug.group_id, ug.group_name, tgr.role FROM " .
"{$prefix}user_groups ug, {$prefix}template_group_rights tgr WHERE " .
"ug.group_id = tgr.group_id and tgr.template_id= ? ORDER BY ug.group_name";

$query_sharing_rows = db_query($sql, array($template_id));

Expand Down
4 changes: 3 additions & 1 deletion website_code/php/properties/properties_library.php
Expand Up @@ -815,8 +815,10 @@ function sharing_info($template_id)

function nr_user_groups()
{
global $xerte_toolkits_site;

$count = 0;
$sql = "select count(*) as count from user_groups";
$sql = "select count(*) as count from {$xerte_toolkits_site->database_table_prefix}user_groups";
$res = db_query($sql);

if ($res !== false && $res != null)
Expand Down

0 comments on commit 58d7f79

Please sign in to comment.