瀏覽代碼

Fixing the permalinks

vbracco 16 年之前
父節點
當前提交
8af4b15114
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      admin/index.php

+ 2 - 3
admin/index.php 查看文件

@@ -223,7 +223,7 @@ if ($user->isAuthenticated()) {
223 223
 					$row['postType'] = type2Text($tumble->getType($register["id_post"]));
224 224
 
225 225
 					$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
226
-					$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
226
+					$permalink = $tumble->getPermalink($register["id_post"]);
227 227
 
228 228
 					$register["title"] = stripslashes($register["title"]);
229 229
 					$register["description"] = stripslashes($register["description"]);
@@ -297,8 +297,7 @@ if ($user->isAuthenticated()) {
297 297
 					if ($tumble->contarRegistros()>0) {				
298 298
 						while($register = mysql_fetch_array($rs)) {			
299 299
 							$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
300
-							$strEnd=($conf->urlFriendly) ? "/" : "";
301
-							$permalink = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
300
+							$permalink = $tumble->getPermalink($register["id_post"]);
302 301
 							$register["title"] = stripslashes($register["title"]);
303 302
 							$register["description"] = stripslashes($register["description"]);
304 303