@@ -40,7 +40,7 @@ |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | function createDirectory($name) { |
| 43 | - throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); |
|
| 43 | + throw new Forbidden('Permission denied to create file (filename '.$name.')'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | function getChild($name) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | function createFile($name, $data = null) { |
| 42 | - throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); |
|
| 42 | + throw new Forbidden('Permission denied to create file (filename '.$name.')'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | function createDirectory($name) { |
@@ -83,10 +83,10 @@ discard block |
||
| 83 | 83 | $rootView = new View(); |
| 84 | 84 | $user = \OC::$server->getUserSession()->getUser(); |
| 85 | 85 | Filesystem::initMountPoints($user->getUID()); |
| 86 | - if (!$rootView->file_exists('/' . $user->getUID() . '/uploads')) { |
|
| 87 | - $rootView->mkdir('/' . $user->getUID() . '/uploads'); |
|
| 86 | + if (!$rootView->file_exists('/'.$user->getUID().'/uploads')) { |
|
| 87 | + $rootView->mkdir('/'.$user->getUID().'/uploads'); |
|
| 88 | 88 | } |
| 89 | - $view = new View('/' . $user->getUID() . '/uploads'); |
|
| 89 | + $view = new View('/'.$user->getUID().'/uploads'); |
|
| 90 | 90 | $rootInfo = $view->getFileInfo(''); |
| 91 | 91 | $impl = new Directory($view, $rootInfo); |
| 92 | 92 | return $impl; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | protected function setSubjects(IEvent $event, $subject, array $parameters) { |
| 50 | 50 | $placeholders = $replacements = []; |
| 51 | 51 | foreach ($parameters as $placeholder => $parameter) { |
| 52 | - $placeholders[] = '{' . $placeholder . '}'; |
|
| 52 | + $placeholders[] = '{'.$placeholder.'}'; |
|
| 53 | 53 | $replacements[] = $parameter['name']; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) { |
| 72 | 72 | if ($node instanceof IPrincipal) { |
| 73 | - $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function() use ($node) { |
|
| 73 | + $propFind->handle('{'.self::NS_CALDAV.'}schedule-default-calendar-URL', function() use ($node) { |
|
| 74 | 74 | /** @var \OCA\DAV\CalDAV\Plugin $caldavPlugin */ |
| 75 | 75 | $caldavPlugin = $this->server->getPlugin('caldav'); |
| 76 | 76 | $principalUrl = $node->getPrincipalUrl(); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | ]); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $result = $this->server->getPropertiesForPath($calendarHomePath . '/' . CalDavBackend::PERSONAL_CALENDAR_URI, [], 1); |
|
| 92 | + $result = $this->server->getPropertiesForPath($calendarHomePath.'/'.CalDavBackend::PERSONAL_CALENDAR_URI, [], 1); |
|
| 93 | 93 | if (empty($result)) { |
| 94 | 94 | return null; |
| 95 | 95 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return string |
| 91 | 91 | */ |
| 92 | - public function getPluginName() { |
|
| 92 | + public function getPluginName() { |
|
| 93 | 93 | return 'oc-calendar-publishing'; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -107,12 +107,12 @@ discard block |
||
| 107 | 107 | $this->server = $server; |
| 108 | 108 | |
| 109 | 109 | $this->server->on('method:POST', [$this, 'httpPost']); |
| 110 | - $this->server->on('propFind', [$this, 'propFind']); |
|
| 110 | + $this->server->on('propFind', [$this, 'propFind']); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | public function propFind(PropFind $propFind, INode $node) { |
| 114 | 114 | if ($node instanceof Calendar) { |
| 115 | - $propFind->handle('{'.self::NS_CALENDARSERVER.'}publish-url', function () use ($node) { |
|
| 115 | + $propFind->handle('{'.self::NS_CALENDARSERVER.'}publish-url', function() use ($node) { |
|
| 116 | 116 | if ($node->getPublishStatus()) { |
| 117 | 117 | // We return the publish-url only if the calendar is published. |
| 118 | 118 | $token = $node->getPublishStatus(); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $update = false; |
| 112 | 112 | if (!isset($properties['URI'])) { // create a new contact |
| 113 | 113 | $uid = $this->createUid(); |
| 114 | - $uri = $uid . '.vcf'; |
|
| 114 | + $uri = $uid.'.vcf'; |
|
| 115 | 115 | $vCard = $this->createEmptyVCard($uid); |
| 116 | 116 | } else { // update existing contact |
| 117 | 117 | $uri = $properties['URI']; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $permissions = $this->addressBook->getACL(); |
| 143 | 143 | $result = 0; |
| 144 | 144 | foreach ($permissions as $permission) { |
| 145 | - switch($permission['privilege']) { |
|
| 145 | + switch ($permission['privilege']) { |
|
| 146 | 146 | case '{DAV:}read': |
| 147 | 147 | $result |= Constants::PERMISSION_READ; |
| 148 | 148 | break; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | protected function createUid() { |
| 188 | 188 | do { |
| 189 | 189 | $uid = $this->getUid(); |
| 190 | - $contact = $this->backend->getContact($this->getKey(), $uid . '.vcf'); |
|
| 190 | + $contact = $this->backend->getContact($this->getKey(), $uid.'.vcf'); |
|
| 191 | 191 | } while (!empty($contact)); |
| 192 | 192 | |
| 193 | 193 | return $uid; |
@@ -227,15 +227,15 @@ discard block |
||
| 227 | 227 | foreach ($vCard->children() as $property) { |
| 228 | 228 | if ($property->name === 'PHOTO' && $property->getValueType() === 'BINARY') { |
| 229 | 229 | $url = $this->urlGenerator->getAbsoluteURL( |
| 230 | - $this->urlGenerator->linkTo('', 'remote.php') . '/dav/'); |
|
| 230 | + $this->urlGenerator->linkTo('', 'remote.php').'/dav/'); |
|
| 231 | 231 | $url .= implode('/', [ |
| 232 | 232 | 'addressbooks', |
| 233 | 233 | substr($this->addressBookInfo['principaluri'], 11), //cut off 'principals/' |
| 234 | 234 | $this->addressBookInfo['uri'], |
| 235 | 235 | $uri |
| 236 | - ]) . '?photo'; |
|
| 236 | + ]).'?photo'; |
|
| 237 | 237 | |
| 238 | - $result['PHOTO'] = 'VALUE=uri:' . $url; |
|
| 238 | + $result['PHOTO'] = 'VALUE=uri:'.$url; |
|
| 239 | 239 | |
| 240 | 240 | } else if ($property->name === 'X-SOCIALPROFILE') { |
| 241 | 241 | $type = $this->getTypeFromProperty($property); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | function xmlSerialize(Writer $writer) { |
| 42 | 42 | foreach ($this->groups as $group) { |
| 43 | - $writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group); |
|
| 43 | + $writer->writeElement('{'.self::NS_OWNCLOUD.'}group', $group); |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | $addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri); |
| 42 | 42 | $objects = []; |
| 43 | - foreach($addressBooks as $addressBook) { |
|
| 43 | + foreach ($addressBooks as $addressBook) { |
|
| 44 | 44 | $objects[] = new AddressBook($this->carddavBackend, $addressBook, $this->l10n); |
| 45 | 45 | } |
| 46 | 46 | return $objects; |
@@ -95,20 +95,20 @@ discard block |
||
| 95 | 95 | public function preDeleteUser($params) { |
| 96 | 96 | $uid = $params['uid']; |
| 97 | 97 | $this->usersToDelete[$uid] = $this->userManager->get($uid); |
| 98 | - $this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/' . $uid); |
|
| 99 | - $this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/' . $uid); |
|
| 98 | + $this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/'.$uid); |
|
| 99 | + $this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/'.$uid); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | public function postDeleteUser($params) { |
| 103 | 103 | $uid = $params['uid']; |
| 104 | - if (isset($this->usersToDelete[$uid])){ |
|
| 104 | + if (isset($this->usersToDelete[$uid])) { |
|
| 105 | 105 | $this->syncService->deleteUser($this->usersToDelete[$uid]); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | foreach ($this->calendarsToDelete as $calendar) { |
| 109 | 109 | $this->calDav->deleteCalendar($calendar['id']); |
| 110 | 110 | } |
| 111 | - $this->calDav->deleteAllSharesByUser('principals/users/' . $uid); |
|
| 111 | + $this->calDav->deleteAllSharesByUser('principals/users/'.$uid); |
|
| 112 | 112 | |
| 113 | 113 | foreach ($this->addressBooksToDelete as $addressBook) { |
| 114 | 114 | $this->cardDav->deleteAddressBook($addressBook['id']); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | public function firstLogin(IUser $user = null) { |
| 124 | 124 | if (!is_null($user)) { |
| 125 | - $principal = 'principals/users/' . $user->getUID(); |
|
| 125 | + $principal = 'principals/users/'.$user->getUID(); |
|
| 126 | 126 | if ($this->calDav->getCalendarsForUserCount($principal) === 0) { |
| 127 | 127 | try { |
| 128 | 128 | $this->calDav->createCalendar($principal, CalDavBackend::PERSONAL_CALENDAR_URI, [ |