Browse Source

Fix permalink processing for pois

master
Léo Serre 5 months ago
parent
commit
da27362fd5
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      controllers/d.poi.php

+ 6
- 5
controllers/d.poi.php 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";
}
}


Loading…
Cancel
Save