Skip to content

Commit

Permalink
Fix transfer of LO's to a new owner in the management page
Browse files Browse the repository at this point in the history
 - The folderrights table was not filled correctly
  • Loading branch information
torinfo committed Jul 26, 2022
1 parent cb636c8 commit eea374a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions website_code/php/management/do_transfer_user_templates.php
Expand Up @@ -210,6 +210,11 @@ function createGetFolderId($folder_structure, $newuserid, $old_folder_id)
$params = array($newuserid, $parent_folder_id, $folder_structure[$i]['folder_name'], date('Y-m-d'));
$folder_id = db_query($q, $params);
$folder_structure[$i]['newid'] = $folder_id;
if ($folder_id !== false){
$query = "INSERT INTO {$prefix}folderrights (folder_id, login_id, folder_parent, role) values (?,?,?,?)";
$params = array($folder_id, $newuserid, $parent_folder_id, "creator");
$ok = db_query($query, $params);
}
return $folder_id;
}
}
Expand Down

0 comments on commit eea374a

Please sign in to comment.