mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -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();
|
||||
$adv = $advModel->newQuery()->find($id);
|
||||
if (!$adv->cover_photo) {
|
||||
$adv->cover_photo = $this->image->make('visiosoft.theme.base::images/no-image.png', 'path')->url();
|
||||
} else if (
|
||||
!empty($adv->cover_photo) &&
|
||||
substr($adv->cover_photo, 0, strlen('/')) !== '/'
|
||||
) {
|
||||
$adv->cover_photo = '/' . $adv->cover_photo;
|
||||
if ($adv) {
|
||||
if (!$adv->cover_photo) {
|
||||
$adv->cover_photo = $this->image->make('visiosoft.theme.base::images/no-image.png', 'path')->url();
|
||||
} else if (
|
||||
!empty($adv->cover_photo) &&
|
||||
substr($adv->cover_photo, 0, strlen('/')) !== '/'
|
||||
) {
|
||||
$adv->cover_photo = '/' . $adv->cover_photo;
|
||||
}
|
||||
}
|
||||
return $adv;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user