Browse Source

Finished the removing of the old permalinks styles; sanitize RSS feed

pecesama 16 years ago
parent
commit
03def6f6fb
2 changed files with 11 additions and 6 deletions
  1. 5 3
      classes/pagination.class.php
  2. 6 3
      rss.php

+ 5 - 3
classes/pagination.class.php View File

@@ -75,13 +75,15 @@ Author URI: http://www.mis-algoritmos.com
75 75
 						echo "<div class=\"$this->className\">$this->pagination</div>";
76 76
 			}
77 77
 		function get_pagenum_link($id){
78
-				if(strpos($this->target,'?')===false)
78
+				//if(strpos($this->target,'?')===false)
79 79
 						if($this->urlF)
80 80
 								return str_replace($this->urlF,$id,$this->target);
81
+								
81 82
 							else
82 83
 								return "$this->target?$this->parameterName=$id";
83
-					else
84
-						return "$this->target&$this->parameterName=$id";
84
+					//else 
85
+						//return "$this->target&$this->parameterName=$id";
86
+						
85 87
 			}
86 88
 		
87 89
 		function calculate(){

+ 6 - 3
rss.php View File

@@ -79,15 +79,18 @@
79 79
 					$desc = $tumble->getMp3Player($register["url"]);
80 80
 					break;
81 81
 			}
82
-			$url = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php/post/").$register["id_post"]."/";
83
-			$formatedDate = gmdate("D, d M Y H:i:s \G\M\T", strtotime($register["date"]));
82
+			$tit = htmlspecialchars($tit);
83
+			$url = htmlspecialchars($url);
84
+			$strEnd=($conf->urlFriendly) ? "/" : "";
85
+			$url = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
86
+			$formatedDate = date("r", strtotime($register["date"])+transform_offset($conf->offsetTime));
84 87
 ?>
85 88
 
86 89
 			<item>
87 90
 				<title><?php echo $tit;?></title>
88 91
 				<description><![CDATA[<?php echo $desc;?>]]></description>
89 92
 				<link><?php echo $url;?></link>
90
-				<guid isPermaLink="true"><?php echo $conf->urlGelato."/index.php/post/".$register["id_post"]."/";?></guid>				
93
+				<guid isPermaLink="true"><?php echo $url;?></guid>				
91 94
 				<pubDate><?php echo $formatedDate;?></pubDate>				
92 95
 			</item>
93 96