Fix permalink processing for pois

This commit is contained in:
Léo Serre 2021-06-04 21:36:10 +02:00
parent f0b82ddb3d
commit da27362fd5

View File

@ -18,13 +18,14 @@ switch ($controller->splitted_url[1]) {
$poi->lon = $_POST['lon'];
$poi->ele = $_POST['ele'];
$poi->author = $user->id;
if(!$blogArticle->checkPermalink($_POST['permalink'],1)) {
$blogArticle->permalink = $_POST['permalink'];
$blogArticle->insert();
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
$poi->source = "k";
if(!$poi->checkPermalink($_POST['permalink'],1)) {
$poi->permalink = $_POST['permalink'];
$poi->insert();
header('Location: '.$config['rel_root_folder']."blog/".$poi->permalink);
}
else {
$head['title'] = $blogArticle->name;
$head['title'] = $poi->name;
$error = "permalink";
}
}