Skip to content

Commit 83bbb1a

Browse files
committed
Revert "add params for put interface"
This reverts commit 6432caa.
1 parent e5940a5 commit 83bbb1a

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

lib/CalDAV/CalendarObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function get()
9595
*
9696
* @return string
9797
*/
98-
public function put($calendarData,$params=null)
98+
public function put($calendarData)
9999
{
100100
if (is_resource($calendarData)) {
101101
$calendarData = stream_get_contents($calendarData);

lib/CalDAV/Schedule/SchedulingObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function get()
6262
*
6363
* @return string
6464
*/
65-
public function put($calendarData,$params=null)
65+
public function put($calendarData)
6666
{
6767
throw new MethodNotAllowed('Updating scheduling objects is not supported');
6868
}

lib/CardDAV/Card.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function get()
8282
*
8383
* @return string|null
8484
*/
85-
public function put($cardData,$params=null)
85+
public function put($cardData)
8686
{
8787
if (is_resource($cardData)) {
8888
$cardData = stream_get_contents($cardData);

lib/DAV/CorePlugin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ public function httpPut(RequestInterface $request, ResponseInterface $response)
429429
{
430430
$body = $request->getBodyAsStream();
431431
$path = $request->getPath();
432-
$params = (object) array('versioning' => $request->getHeader('versioning'));
433432

434433
// Intercepting Content-Range
435434
if ($request->getHeader('Content-Range')) {
@@ -490,7 +489,7 @@ public function httpPut(RequestInterface $request, ResponseInterface $response)
490489
if (!($node instanceof IFile)) {
491490
throw new Exception\Conflict('PUT is not allowed on non-files.');
492491
}
493-
if (!$this->server->updateFile($path, $body, $etag,$params)) {
492+
if (!$this->server->updateFile($path, $body, $etag)) {
494493
return false;
495494
}
496495

lib/DAV/FS/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class File extends Node implements DAV\IFile
2020
*
2121
* @param resource $data
2222
*/
23-
public function put($data,$params=null)
23+
public function put($data)
2424
{
2525
file_put_contents($this->path, $data);
2626
clearstatcache(true, $this->path);

lib/DAV/FSExt/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class File extends Node implements DAV\PartialUpdate\IPatchSupport
2525
*
2626
* @return string
2727
*/
28-
public function put($data,$params=null)
28+
public function put($data)
2929
{
3030
file_put_contents($this->path, $data);
3131
clearstatcache(true, $this->path);

lib/DAV/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class File extends Node implements IFile
3737
*
3838
* @return string|null
3939
*/
40-
public function put($data,$params=null)
40+
public function put($data)
4141
{
4242
throw new Exception\Forbidden('Permission denied to change data');
4343
}

lib/DAV/IFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface IFile extends INode
3838
*
3939
* @return string|null
4040
*/
41-
public function put($data,$params=null);
41+
public function put($data);
4242

4343
/**
4444
* Returns the data.

lib/DAV/Server.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ public function createFile($uri, $data, &$etag = null)
11201120
*
11211121
* @return bool
11221122
*/
1123-
public function updateFile($uri, $data, &$etag = null,$params)
1123+
public function updateFile($uri, $data, &$etag = null)
11241124
{
11251125
$node = $this->tree->getNodeForPath($uri);
11261126

@@ -1133,7 +1133,8 @@ public function updateFile($uri, $data, &$etag = null,$params)
11331133
if (!$this->emit('beforeWriteContent', [$uri, $node, &$data, &$modified])) {
11341134
return false;
11351135
}
1136-
$etag = $node->put($data,$params);
1136+
1137+
$etag = $node->put($data);
11371138
if ($modified) {
11381139
$etag = null;
11391140
}

0 commit comments

Comments
 (0)