Skip to content

Commit

Permalink
Misc fixes...
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasdelellis committed May 16, 2024
1 parent 9c676bb commit 2fa9b08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/Command/SyncAlbumsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {

$users = array();
$userId = $input->getOption('user_id');
$personNames = array();
$person_name = $input->getOption('person_name');
$mode = $input->getOption('mode');

Expand Down
2 changes: 1 addition & 1 deletion lib/Helper/Imaginary.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getUrl(): ?string {
return rtrim($imaginaryUrl, '/');
}

public function hasKey(): ?string {
public function hasKey(): bool {
$imaginaryKey = $this->config->getSystemValueString('preview_imaginary_key', 'invalid');
return ($imaginaryKey !== 'invalid');
}
Expand Down
12 changes: 7 additions & 5 deletions lib/Helper/PhotoAlbums.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,14 @@ private function getMultiPersonsImages(string $userId, int $modelId, array $pers
}
array_push($multiPersonImages, $images);
}

$noPersons = count($multiPersonImages);
$multiPersonMatchingImages = array();
for ( $i = 1 ; $i < count($multiPersonImages) ; ++$i){
if ( $i === 1 ){
$multiPersonMatchingImages = array_intersect($multiPersonImages[$i-1],$multiPersonImages[$i]);
}else{
$multiPersonMatchingImages = array_intersect($multiPersonMatchingImages,$multiPersonImages[$i]);
for ($i = 1 ; $i < $noPersons ; ++$i) {
if ($i === 1) {
$multiPersonMatchingImages = array_intersect($multiPersonImages[$i-1], $multiPersonImages[$i]);
} else {
$multiPersonMatchingImages = array_intersect($multiPersonMatchingImages, $multiPersonImages[$i]);
}
}
return array_unique($multiPersonMatchingImages);
Expand Down

0 comments on commit 2fa9b08

Please sign in to comment.