| @@ 363-373 (lines=11) @@ | ||
| 360 | * @return void |
|
| 361 | */ |
|
| 362 | public function handleUpdateProperties($path, PropPatch $propPatch) { |
|
| 363 | $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($path) { |
|
| 364 | if (empty($time)) { |
|
| 365 | return false; |
|
| 366 | } |
|
| 367 | $node = $this->tree->getNodeForPath($path); |
|
| 368 | if (is_null($node)) { |
|
| 369 | return 404; |
|
| 370 | } |
|
| 371 | $node->touch($time); |
|
| 372 | return true; |
|
| 373 | }); |
|
| 374 | $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($path) { |
|
| 375 | if (empty($etag)) { |
|
| 376 | return false; |
|
| @@ 374-386 (lines=13) @@ | ||
| 371 | $node->touch($time); |
|
| 372 | return true; |
|
| 373 | }); |
|
| 374 | $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($path) { |
|
| 375 | if (empty($etag)) { |
|
| 376 | return false; |
|
| 377 | } |
|
| 378 | $node = $this->tree->getNodeForPath($path); |
|
| 379 | if (is_null($node)) { |
|
| 380 | return 404; |
|
| 381 | } |
|
| 382 | if ($node->setEtag($etag) !== -1) { |
|
| 383 | return true; |
|
| 384 | } |
|
| 385 | return false; |
|
| 386 | }); |
|
| 387 | } |
|
| 388 | ||
| 389 | /** |
|