Skip to content

Commit

Permalink
Fixd #1268 - Database prefix not handled for properties and shared fo…
Browse files Browse the repository at this point in the history
…lders
  • Loading branch information
torinfo committed Jan 5, 2024
1 parent 8259c85 commit bf9bbb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions website_code/php/folder_status.php
Expand Up @@ -266,8 +266,8 @@ function get_implicit_folder_role($login_id, $folder_id, $group_id=-1){
$result = null;
if ($group_id == -1){
//selects original parent and this user's role (if it exists) of this folder
$query = "select fr.folder_parent, fr2.role from folderrights fr " .
"LEFT JOIN folderrights fr2 ON fr2.folder_id=fr.folder_id and fr2.login_id = ? " .
$query = "select fr.folder_parent, fr2.role from {$pre}folderrights fr " .
"LEFT JOIN {$pre}folderrights fr2 ON fr2.folder_id=fr.folder_id and fr2.login_id = ? " .
"where fr.folder_id=? and fr.role='creator'";
$result = db_query_one($query, array($login_id, $folder_id));
}else{ // check in group rights
Expand Down
2 changes: 1 addition & 1 deletion website_code/php/properties/properties_library.php
Expand Up @@ -479,7 +479,7 @@ function project_info($template_id){

$prefix = $xerte_toolkits_site->database_table_prefix;

$query_for_names = "select {$prefix}td.template_name as project_name, td.template_id, otd.template_framework, otd.template_name, otd.display_name, otd.parent_template, otd2.display_name as parent_display_name, td.date_created, td.date_modified, td.extra_flags from "
$query_for_names = "select td.template_name as project_name, td.template_id, otd.template_framework, otd.template_name, otd.display_name, otd.parent_template, otd2.display_name as parent_display_name, td.date_created, td.date_modified, td.extra_flags from "
. "{$prefix}templatedetails td, {$prefix}originaltemplatesdetails otd, {$prefix}originaltemplatesdetails otd2 where td.template_id= ? and otd.template_type_id = td.template_type_id and otd.parent_template = otd2.template_name";

$params = array($template_id);
Expand Down

0 comments on commit bf9bbb9

Please sign in to comment.