Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
Make sure the correct sequence is used for new images.
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterSioen committed Nov 10, 2015
1 parent c40add1 commit 1019984
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@
true
);

$photoId = Backend{$camel_case_name}Model::insertImage(
$sequence = 0;
foreach ($images as $image) {
if ($image->uploadName == $sImage['uploadName']) {
$sequence = $image->sequence;
}
}

Backend{$camel_case_name}Model::insertImage(
array(
'{$underscored_name}_id' => $item['id'],
'name' => $sImage['uploadName'],
'sequence' => $sImage['Index']
'sequence' => $sequence,
)
);
}
Expand Down

0 comments on commit 1019984

Please sign in to comment.