#1293 [messages-module] Prevent users from viewing non related messages

This commit is contained in:
Diatrex 2020-04-23 14:36:52 +03:00
parent f6d9942627
commit c1998c6af0

View File

@ -105,6 +105,7 @@ class AdvCriteria extends EntryCriteria
{ {
$advModel = new AdvModel(); $advModel = new AdvModel();
$adv = $advModel->newQuery()->find($id); $adv = $advModel->newQuery()->find($id);
if ($adv) {
if (!$adv->cover_photo) { if (!$adv->cover_photo) {
$adv->cover_photo = $this->image->make('visiosoft.theme.base::images/no-image.png', 'path')->url(); $adv->cover_photo = $this->image->make('visiosoft.theme.base::images/no-image.png', 'path')->url();
} else if ( } else if (
@ -113,6 +114,7 @@ class AdvCriteria extends EntryCriteria
) { ) {
$adv->cover_photo = '/' . $adv->cover_photo; $adv->cover_photo = '/' . $adv->cover_photo;
} }
}
return $adv; return $adv;
} }