From eba4d7aa0ee5ea1bcb29e8254c28a272023ea54f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 21 Apr 2020 18:57:18 +0200 Subject: correct warning psr 12 : 120 characters lines --- app/class/Medialist.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'app/class/Medialist.php') diff --git a/app/class/Medialist.php b/app/class/Medialist.php index 35ea991..c597505 100644 --- a/app/class/Medialist.php +++ b/app/class/Medialist.php @@ -28,7 +28,7 @@ class Medialist extends Item /** @var int display download links*/ protected $links = 0; - /** @var string display the file name of the file */ + /** @var int display the file name of the file */ protected $filename = 0; public const TYPES = ['image', 'sound', 'video', 'other']; @@ -56,7 +56,6 @@ class Medialist extends Item $mediamanager = new Modelmedia(); $medialist = $mediamanager->getlistermedia($this->dir(), $this->type); if (!$medialist) { - $this->content = 'RENDERING ERROR : path : ' . Model::MEDIA_DIR . $this->path . '/ does not exist'; return false; } else { $mediamanager->medialistsort($medialist, $this->sortby, $this->order); @@ -67,14 +66,19 @@ class Medialist extends Item foreach ($medialist as $media) { $div .= '
'; + $id = 'id="media_' . $media->id() . '"'; + $path = $media->getincludepath(); + $ext = $media->extension(); if ($media->type() == 'image') { - $div .= '' . $media->id() . ''; + $div .= '' . $media->id() . ''; } elseif ($media->type() == 'sound') { - $div .= '
' . PHP_EOL; } -- cgit v1.2.3