Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
The href is converted to path.
  • Loading branch information
glubsy committed Jan 25, 2021
1 parent 8f5410c commit db110d2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/_h5ai/private/php/core/class-context.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,16 @@ public function get_thumbs($requests) {
$hrefs = [];
$thumbs = [];
foreach ($requests as $req) {
$href = $this->to_path($req['href']);
if (!array_key_exists($href, $thumbs)) {
$thumbs[$href] = new Thumb($this, $href, $req['type']);
$path = $this->to_path($req['href']);
if (!array_key_exists($path, $thumbs)) {
$thumbs[$path] = new Thumb($this, $path, $req['type']);
}
else if ($thumbs[$href]->type === 'file') {
else if ($thumbs[$path]->type === 'file') {
// File has already been mime tested and cannot have a thumbnail
$hrefs[] = null;
continue;
}
$hrefs[] = $thumbs[$href]->thumb($this->thumbnail_width, $this->thumbnail_height);
$hrefs[] = $thumbs[$path]->thumb($this->thumbnail_width, $this->thumbnail_height);
}
return $hrefs;
}
Expand Down

0 comments on commit db110d2

Please sign in to comment.