Skip to content

Commit

Permalink
prevent false positive zip download button show
Browse files Browse the repository at this point in the history
  • Loading branch information
ikenfin committed Feb 21, 2019
1 parent 0ea89f1 commit 24ae45c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions upload/admin/controller/extension/module/foc_csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,14 @@ public function exportPart () {

$position = $offset + $limit;

$this->sendOk(array(
$response = array(
'key' => $key,
'position' => $position,
'errors' => $errors
));
'errors' => $errors,
'collected_images' => $this->model_extension_module_foc_csv_exporter->getCollectedImagesCount()
);

$this->sendOk($response);
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion upload/admin/model/extension/module/foc_csv_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ public function addCollectedImage ($path) {
}

public function hasCollectedImages () {
return count(self::$foundImages) > 0;
return $this->getCollectedImagesCount() > 0;
}

public function getCollectedImagesCount () {
return count(self::$foundImages);
}

public function getCollectedImages () {
Expand Down

0 comments on commit 24ae45c

Please sign in to comment.