* @param string $publicUpload
* @param string $expireDate
* @param string $note
+ * @param string $label
* @param string $hideDownload
* @return DataResponse
* @throws LockedException
string $publicUpload = null,
string $expireDate = null,
string $note = null,
+ string $label = null,
string $hideDownload = null
): DataResponse {
try {
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist'));
}
- if ($permissions === null && $password === null && $sendPasswordByTalk === null && $publicUpload === null && $expireDate === null && $note === null && $hideDownload === null) {
+ if ($permissions === null &&
+ $password === null &&
+ $sendPasswordByTalk === null &&
+ $publicUpload === null &&
+ $expireDate === null &&
+ $note === null &&
+ $label === null &&
+ $hideDownload === null
+ ) {
throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
}
$share->setPassword($password);
}
+ if ($label !== null) {
+ $share->setLabel($label);
+ }
+
} else {
if ($permissions !== null) {
$permissions = (int)$permissions;
->set('token', $qb->createNamedParameter($share->getToken()))
->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE))
->set('note', $qb->createNamedParameter($share->getNote()))
+ ->set('label', $qb->createNamedParameter($share->getLabel()))
->set('hide_download', $qb->createNamedParameter($share->getHideDownload() ? 1 : 0), IQueryBuilder::PARAM_INT)
->execute();
}