diff --git a/lib/CalDAV/Calendar.php b/lib/CalDAV/Calendar.php index 3d063feb7d..6c0bf54115 100644 --- a/lib/CalDAV/Calendar.php +++ b/lib/CalDAV/Calendar.php @@ -186,17 +186,17 @@ public function createDirectory($name) * The contents of the new file must be a valid ICalendar string. * * @param string $name - * @param resource $calendarData + * @param resource $data * * @return string|null */ - public function createFile($name, $calendarData = null) + public function createFile($name, $data = null) { - if (is_resource($calendarData)) { - $calendarData = stream_get_contents($calendarData); + if (is_resource($data)) { + $data = stream_get_contents($data); } - return $this->caldavBackend->createCalendarObject($this->calendarInfo['id'], $name, $calendarData); + return $this->caldavBackend->createCalendarObject($this->calendarInfo['id'], $name, $data); } /** diff --git a/lib/CalDAV/CalendarHome.php b/lib/CalDAV/CalendarHome.php index 159ddcc67c..49c54a37a7 100644 --- a/lib/CalDAV/CalendarHome.php +++ b/lib/CalDAV/CalendarHome.php @@ -96,10 +96,10 @@ public function getLastModified() * * This is currently not allowed * - * @param string $filename + * @param string $name * @param resource $data */ - public function createFile($filename, $data = null) + public function createFile($name, $data = null) { throw new DAV\Exception\MethodNotAllowed('Creating new files in this collection is not supported'); } diff --git a/lib/CardDAV/AddressBook.php b/lib/CardDAV/AddressBook.php index 8487d4c3f8..f5744f644b 100644 --- a/lib/CardDAV/AddressBook.php +++ b/lib/CardDAV/AddressBook.php @@ -129,19 +129,19 @@ public function createDirectory($name) * This method may return an ETag. * * @param string $name - * @param resource $vcardData + * @param resource $data * * @return string|null */ - public function createFile($name, $vcardData = null) + public function createFile($name, $data = null) { - if (is_resource($vcardData)) { - $vcardData = stream_get_contents($vcardData); + if (is_resource($data)) { + $data = stream_get_contents($data); } // Converting to UTF-8, if needed - $vcardData = DAV\StringUtil::ensureUTF8($vcardData); + $data = DAV\StringUtil::ensureUTF8($data); - return $this->carddavBackend->createCard($this->addressBookInfo['id'], $name, $vcardData); + return $this->carddavBackend->createCard($this->addressBookInfo['id'], $name, $data); } /** diff --git a/lib/CardDAV/AddressBookHome.php b/lib/CardDAV/AddressBookHome.php index 884e9b24e0..d7365fbe82 100644 --- a/lib/CardDAV/AddressBookHome.php +++ b/lib/CardDAV/AddressBookHome.php @@ -92,10 +92,10 @@ public function getLastModified() * * This is currently not allowed * - * @param string $filename + * @param string $name * @param resource $data */ - public function createFile($filename, $data = null) + public function createFile($name, $data = null) { throw new DAV\Exception\MethodNotAllowed('Creating new files in this collection is not supported'); }