Changeset 1653
- Timestamp:
- 01/02/07 22:57:46 (20 months ago)
- Location:
- trunk/gregarius
- Files:
-
- 4 modified
-
cls/channels.php (modified) (1 diff)
-
constants.php (modified) (1 diff)
-
feed.php (modified) (2 diffs)
-
util.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/channels.php
r1648 r1653 88 88 89 89 if (getConfig('rss.output.usemodrewrite')) { 90 //$this->rlink = getPath().preg_replace("/[^a-zA-Z0-9_]/", "_", $title)."/";91 /* EXPERIMENTAL! */92 90 $this->rlink = getPath(rss_uri($title)) . "/"; 93 91 } else { -
trunk/gregarius/constants.php
r1525 r1653 175 175 define ('RSS_SANITIZER_URL',0x40); 176 176 177 178 // Character separating uri elements (for e.g. permalinks) 179 define('RSS_URI_SEPARATOR','_'); 180 181 177 182 // Profiling 178 183 // - The profiling information is "html commented out" at the end of every html page -
trunk/gregarius/feed.php
r1649 r1653 60 60 && !is_numeric($_REQUEST['channel']) 61 61 ) { 62 $sqlid = sanitize($_REQUEST['channel'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES); 62 $sqlid = preg_replace('#'.RSS_URI_SEPARATOR.'#','_', 63 sanitize($_REQUEST['channel'] , RSS_SANITIZER_SIMPLE_SQL ) 64 ); 63 65 64 66 $sql = "select id from " . getTable("channels") ." where title like '$sqlid'"; … … 70 72 // $sql .= " and not(mode & " . RSS_MODE_DELETED_STATE . ") "; 71 73 74 // die($sql); 72 75 $res = rss_query( $sql ); 73 76 //echo $sql; -
trunk/gregarius/util.php
r1649 r1653 1156 1156 } 1157 1157 1158 function rss_uri($title, $sep= '_') {1159 return utf8_uri_encode(preg_replace('#[ \#%\s&/\+\'"\?]#',$sep,$title));1158 function rss_uri($title, $sep=RSS_URI_SEPARATOR) { 1159 return utf8_uri_encode(preg_replace('#[ \#%&/\+\'"\?]#',$sep,$title)); 1160 1160 } 1161 1161 ?>
