Skip to content
Snippets Groups Projects
Commit d4271ed9 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Use original source when resharing a file, fixes bug oc-210

parent 954d4e52
Branches
No related tags found
No related merge requests found
......@@ -41,6 +41,10 @@ class OC_Share {
public function __construct($source, $uid_shared_with, $permissions) {
$uid_owner = OCP\USER::getUser();
$query = OCP\DB::prepare("INSERT INTO *PREFIX*sharing VALUES(?,?,?,?,?)");
// Check if this is a reshare and use the original source
if ($result = OC_Share::getSource($source)) {
$source = $result;
}
if ($uid_shared_with == self::PUBLICLINK) {
$token = sha1("$uid_shared_with-$source");
$query->execute(array($uid_owner, self::PUBLICLINK, $source, $token, $permissions));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment