Dodaj widok błędu dla nieistniejących ofert pracy oraz walidację w metodzie szczegółów ogłoszenia
This commit is contained in:
@@ -97,6 +97,14 @@ class GlobelusAdverts
|
||||
|
||||
$page['language']['canonical'] = $base . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
||||
|
||||
if ( !$advert_details['id'] )
|
||||
{
|
||||
return \Tpl::view( 'globelus/adverts/advert-not-found', [
|
||||
'g_user' => $g_user,
|
||||
'advert_id' => \S::get( 'advert_id' )
|
||||
] );
|
||||
}
|
||||
|
||||
if ( ( !$advert_details['visible'] or $advert_details['old'] ) and $advert_details['user_id'] != $g_user['id'] ) {
|
||||
header( 'Location: /' );
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user