@@ -744,6 +744,7 @@ public function getShares(
744744 * @param string $publicUpload
745745 * @param string $expireDate
746746 * @param string $note
747+ * @param string $label
747748 * @return DataResponse
748749 * @throws LockedException
749750 * @throws NotFoundException
@@ -758,7 +759,8 @@ public function updateShare(
758759 string $ sendPasswordByTalk = null ,
759760 string $ publicUpload = null ,
760761 string $ expireDate = null ,
761- string $ note = null
762+ string $ note = null ,
763+ string $ label = null
762764 ): DataResponse {
763765 try {
764766 $ share = $ this ->getShareById ($ id );
@@ -772,7 +774,14 @@ public function updateShare(
772774 throw new OCSNotFoundException ($ this ->l ->t ('Wrong share ID, share doesn \'t exist ' ));
773775 }
774776
775- if ($ permissions === null && $ password === null && $ sendPasswordByTalk === null && $ publicUpload === null && $ expireDate === null && $ note === null ) {
777+ if ($ permissions === null &&
778+ $ password === null &&
779+ $ sendPasswordByTalk === null &&
780+ $ publicUpload === null &&
781+ $ expireDate === null &&
782+ $ note === null &&
783+ $ label === null
784+ ) {
776785 throw new OCSBadRequestException ($ this ->l ->t ('Wrong or no update parameter given ' ));
777786 }
778787
@@ -849,6 +858,10 @@ public function updateShare(
849858 $ share ->setPassword ($ password );
850859 }
851860
861+ if ($ label !== null ) {
862+ $ share ->setLabel ($ label );
863+ }
864+
852865 } else {
853866 if ($ permissions !== null ) {
854867 $ permissions = (int )$ permissions ;
0 commit comments