Change tag routines, articles saving is ok

This commit is contained in:
Ludovic CANDELLIER
2020-06-14 23:30:33 +02:00
parent 927e68223b
commit abc1510284
35 changed files with 703 additions and 141 deletions

View File

@@ -79,11 +79,15 @@ class Varieties
public static function getImages($id)
{
$variety = self::get($id);
$variety->getMedia();
foreach ($variety->media as $key => $media) {
$variety->media[$key]['url'] = $media->getUrl();
if ($variety) {
$variety->getMedia();
foreach ($variety->media as $key => $media) {
$variety->media[$key]['url'] = $media->getUrl();
}
return $variety->media;
} else {
return false;
}
return $variety->media;
}
public static function deleteImage($id, $index)