Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Controller/InternalBookmarkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function exportBookmark() {

/**
*
* @param int $id The id of the bookmark whose favicon shoudl be returned
* @param int $id The id of the bookmark whose favicon should be returned
*
* @return Http\DataDisplayResponse|Http\NotFoundResponse|Http\RedirectResponse|Http\DataResponse
*
Expand All @@ -184,7 +184,7 @@ public function getBookmarkImage($id) {
}

/**
* @param int $id The id of the bookmark whose image shoudl be returned
* @param int $id The id of the bookmark whose image should be returned
*
* @return Http\DataDisplayResponse|Http\NotFoundResponse|Http\RedirectResponse|Http\DataResponse
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/BookmarkMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public function generateCTE(int $folderId, bool $withSoftDeleted) : array {
->from('*PREFIX*bookmarks_tree', 'tr')
->join('tr', 'folder_tree', 'e', 'e.item_id = tr.parent_folder AND e.type = ' . $secondRecursiveCase->createPositionalParameter(TreeMapper::TYPE_FOLDER) . (!$withSoftDeleted ? ' AND e.soft_deleted_at is NULL' : ''));

// First the base case together with the normal recurisve case
// First the base case together with the normal recursive case
// Then the second helper base case together with the recursive shares case
// then we need another instance of the first recursive case, duplicated here as secondRecursive case
// to recurse into child folders of shared folders
Expand Down
6 changes: 3 additions & 3 deletions lib/Service/BookmarksParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private function getAttributes(DOMNode $node): array {
if (isset($attributes['add_date'])) {
$added = new DateTime();
if ((int)$attributes['add_date'] > self::THOUSAND_YEARS) {
// Google exports dates in miliseconds. This way we only lose the first year of UNIX Epoch.
// Google exports dates in milliseconds. This way we only lose the first year of UNIX Epoch.
// This is invalid once we hit 2970. So, quite a long time.
$added->setTimestamp(((int)($attributes['add_date']) / 1000));
} else {
Expand All @@ -266,7 +266,7 @@ private function getAttributes(DOMNode $node): array {
} else {
if (isset($attributes['add_date'])) {
if ((int)$attributes['add_date'] > self::THOUSAND_YEARS) {
// Google exports dates in miliseconds. This way we only lose the first year of UNIX Epoch.
// Google exports dates in milliseconds. This way we only lose the first year of UNIX Epoch.
// This is invalid once we hit 2970. So, quite a long time.
$attributes['add_date'] = ((int)($attributes['add_date']) / 1000);
} else {
Expand All @@ -276,7 +276,7 @@ private function getAttributes(DOMNode $node): array {
if (isset($attributes['last_modified'])) {
$attributes['last_modified'] = $attributes['last_modified'] instanceof DateTime ? $attributes['last_modified']->getTimestamp() : (int)$attributes['last_modified'];
if ((int)$attributes['last_modified'] > self::THOUSAND_YEARS) {
// Google exports dates in miliseconds. This way we only lose the first year of UNIX Epoch.
// Google exports dates in milliseconds. This way we only lose the first year of UNIX Epoch.
// This is invalid once we hit 2970. So, quite a long time.
$attributes['last_modified'] = ((int)($attributes['last_modified']) / 1000);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/FaviconPreviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected function fetchImage(string $url): ?Image {
$body = $response->getBody();
$contentType = $response->getHeader('Content-Type');

// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Previewers/DefaultBookmarkPreviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function fetchImage($url): ?Image {
$body = $response->getBody();
$contentType = $response->getHeader('Content-Type');

// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Previewers/GenericUrlBookmarkPreviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function fetchImage($url): ?Image {
return null;
}

// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Previewers/ScreeenlyBookmarkPreviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function fetchImage($url): ?Image {
return null;
}

// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function fetchImage($url): ?Image {
'timeout' => self::HTTP_TIMEOUT,
]
);
// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Service/Previewers/WebshotBookmarkPreviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ public function fetchImage($url): ?Image {
],
'timeout' => self::HTTP_TIMEOUT,
]);
// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
$data = json_decode($response->getBody(), true, 512, JSON_THROW_ON_ERROR);

// get it
$response = $this->client->get($this->apiUrl . $data->id);
// Some HTPP Error occured :/
// Some HTTP Error occurred :/
if ($response->getStatusCode() !== 200) {
return null;
}
Expand Down