Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
Merge pull request #836 from owncloud/fix-shared-calendars-webdav-8.1
Browse files Browse the repository at this point in the history
back port of #834
  • Loading branch information
georgehrke committed Jul 7, 2015
2 parents 0c4723a + d90b069 commit c863789
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/sabre/usercalendars.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
use Sabre\CalDAV\Calendar;

/**
* This class overrides \Sabre\CalDAV\UserCalendars::getChildren()
Expand All @@ -27,6 +28,24 @@
class OC_Connector_Sabre_CalDAV_UserCalendars extends \Sabre\CalDAV\UserCalendars {

/**
* Returns a single calendar, by name
*
* @param string $name
* @return Calendar
*/
function getChild($name) {
$children = $this->getChildren();

foreach($children as $child) {
if ($child->getName() === $name) {
return $child;
}
}

return parent::getChild($name);
}

/**
* Returns a list of calendars
*
* @return array
Expand Down

0 comments on commit c863789

Please sign in to comment.