Empty string is returned as null, but empty string in file cache is the root and exists
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b6ce689e25
commit
97b0402984
|
@ -998,7 +998,11 @@ class Cache implements ICache {
|
||||||
$path = $result->fetchColumn();
|
$path = $result->fetchColumn();
|
||||||
$result->closeCursor();
|
$result->closeCursor();
|
||||||
|
|
||||||
return $path === false ? null : $path;
|
if ($path === false) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (string) $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -874,6 +874,11 @@ class DefaultShareProvider implements IShareProvider {
|
||||||
$cursor = $qb->execute();
|
$cursor = $qb->execute();
|
||||||
|
|
||||||
while ($data = $cursor->fetch()) {
|
while ($data = $cursor->fetch()) {
|
||||||
|
if ($data['fileid'] && $data['path'] === null) {
|
||||||
|
$data['path'] = (string) $data['path'];
|
||||||
|
$data['name'] = (string) $data['name'];
|
||||||
|
$data['checksum'] = (string) $data['checksum'];
|
||||||
|
}
|
||||||
if ($this->isAccessibleResult($data)) {
|
if ($this->isAccessibleResult($data)) {
|
||||||
$shares[] = $this->createShare($data);
|
$shares[] = $this->createShare($data);
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1009,7 @@ class DefaultShareProvider implements IShareProvider {
|
||||||
->setShareType((int)$data['share_type'])
|
->setShareType((int)$data['share_type'])
|
||||||
->setPermissions((int)$data['permissions'])
|
->setPermissions((int)$data['permissions'])
|
||||||
->setTarget($data['file_target'])
|
->setTarget($data['file_target'])
|
||||||
->setNote($data['note'])
|
->setNote((string)$data['note'])
|
||||||
->setMailSend((bool)$data['mail_send'])
|
->setMailSend((bool)$data['mail_send'])
|
||||||
->setStatus((int)$data['accepted'])
|
->setStatus((int)$data['accepted'])
|
||||||
->setLabel($data['label']);
|
->setLabel($data['label']);
|
||||||
|
|
Loading…
Reference in New Issue