Checking url-friendly when redirect
parent
13b89106cc
commit
178101dc04
|
|
@ -44,8 +44,12 @@ if(isset($_POST["btnAdd"])) {
|
|||
$_POST["spam"] = ($comment->isSpam($_POST)) ? "1" : "0";
|
||||
$_POST["ip_user"] = $_SERVER["REMOTE_ADDR"];
|
||||
|
||||
$strEnd=($conf->urlFriendly) ? "/" : "";
|
||||
if ($comment->addComment($_POST)) {
|
||||
header("Location: ".$conf->urlGelato."/index.php/post/".$_POST["id_post"]);
|
||||
header("Location: ".$conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$_POST["id_post"].$strEnd);
|
||||
die();
|
||||
} else {
|
||||
header("Location: ".$conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$_POST["id_post"].$strEnd);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,8 +365,8 @@ if ($user->isAuthenticated()) {
|
|||
if ($tumble->contarRegistros()>0) {
|
||||
while($register = mysql_fetch_array($rs)) {
|
||||
$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
|
||||
$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
||||
|
||||
$strEnd=($conf->urlFriendly) ? "/" : "";
|
||||
$permalink = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
|
||||
$register["title"] = stripslashes($register["title"]);
|
||||
$register["description"] = stripslashes($register["description"]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue