Skip to content

Commit

Permalink
Merge pull request #49 from eldertek/nightly
Browse files Browse the repository at this point in the history
v1.1.6
  • Loading branch information
eldertek authored Feb 17, 2024
2 parents b685c7d + 6ab8607 commit 541cb31
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.6 - 2024-02-17
### Fixed
- Fix an issue where the same duplicate was displayed multiple times

## 1.1.5 - 2024-02-12
### Added
- Limit number of errors/success messages to 2
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<summary lang="fr">Économisez de l’espace en trouvant vos fichiers en doublon</summary>
<description>Are you tired of sifting through piles of files and folders, only to discover multiple copies of the same content cluttering your storage space?</description>
<description lang="fr">Vous en avez assez de passer au crible des piles de fichiers et de dossiers pour découvrir que plusieurs copies du même contenu encombrent votre espace de stockage ?</description>
<version>1.1.5</version>
<version>1.1.6</version>
<licence>agpl</licence>
<author mail="[email protected]" >André Théo LAURET</author>
<namespace>DuplicateFinder</namespace>
Expand Down
2 changes: 1 addition & 1 deletion js/duplicatefinder-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/duplicatefinder-settings.js

Large diffs are not rendered by default.

28 changes: 13 additions & 15 deletions lib/Db/FileDuplicateMapper.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace OCA\DuplicateFinder\Db;

use OCP\IDBConnection;
Expand Down Expand Up @@ -45,25 +46,22 @@ public function findAll(
?array $orderBy = [['hash'], ['type']]
): array {
$qb = $this->db->getQueryBuilder();
$qb->select('d.*')
->from($this->getTableName(), 'd')
->leftJoin('d', 'duplicatefinder_finfo', 'f', 'd.hash = f.file_hash');

if (!is_null($user)) {
$qb->andWhere($qb->expr()->eq('f.owner', $qb->createNamedParameter($user)));
}

$qb->select('d.id as id', 'd.type', 'd.hash', 'd.acknowledged')
->from($this->getTableName(), 'd');

if ($limit !== null) {
$qb->setMaxResults($limit);
$qb->setMaxResults($limit); // Set the limit of rows to fetch
}
if ($offset !== null) {
$qb->setFirstResult($offset);
$qb->setFirstResult($offset); // Set the offset to start fetching rows
}

foreach ($orderBy as $order) {
$qb->addOrderBy($order[0], $order[1] ?? 'ASC');

if ($orderBy !== null) {
foreach ($orderBy as $order) {
$qb->addOrderBy($order[0], isset($order[1]) ? $order[1] : null);
}
unset($order);
}

return $this->findEntities($qb);
}

Expand Down Expand Up @@ -148,4 +146,4 @@ public function getTotalCount(string $type = 'unacknowledged'): int
// Return the count result as an integer
return (int) ($row ? $row['total_count'] : 0);
}
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "duplicatefinder",
"description": "Save some space by finding your duplicate files",
"version": "1.1.5",
"version": "1.1.6",
"author": "André Théo LAURET <[email protected]>",
"contributors": [],
"bugs": {
Expand Down

0 comments on commit 541cb31

Please sign in to comment.