mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 07:16:06 -06:00
#1293 [messages-module] Prevent users from viewing non related messages
This commit is contained in:
parent
f6d9942627
commit
c1998c6af0
@ -105,13 +105,15 @@ class AdvCriteria extends EntryCriteria
|
|||||||
{
|
{
|
||||||
$advModel = new AdvModel();
|
$advModel = new AdvModel();
|
||||||
$adv = $advModel->newQuery()->find($id);
|
$adv = $advModel->newQuery()->find($id);
|
||||||
if (!$adv->cover_photo) {
|
if ($adv) {
|
||||||
$adv->cover_photo = $this->image->make('visiosoft.theme.base::images/no-image.png', 'path')->url();
|
if (!$adv->cover_photo) {
|
||||||
} else if (
|
$adv->cover_photo = $this->image->make('visiosoft.theme.base::images/no-image.png', 'path')->url();
|
||||||
!empty($adv->cover_photo) &&
|
} else if (
|
||||||
substr($adv->cover_photo, 0, strlen('/')) !== '/'
|
!empty($adv->cover_photo) &&
|
||||||
) {
|
substr($adv->cover_photo, 0, strlen('/')) !== '/'
|
||||||
$adv->cover_photo = '/' . $adv->cover_photo;
|
) {
|
||||||
|
$adv->cover_photo = '/' . $adv->cover_photo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $adv;
|
return $adv;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user