Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20532
Modified Files:
Tag: branch_0_6
serendipity_config.inc.php serendipity_functions.inc.php
Log Message:
MFH
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.248.4.4
retrieving revision 1.248.4.5
diff -u -d -r1.248.4.4 -r1.248.4.5
--- serendipity_functions.inc.php 17 Apr 2004 11:27:12 -0000 1.248.4.4
+++ serendipity_functions.inc.php 3 May 2004 08:01:31 -0000 1.248.4.5
@@ -728,15 +728,80 @@
* Creates a filename that consists of [a-zA-z0-9_] (with some custom adjustments (space -> _, ä -> ae and such)
**/
function serendipity_makeFilename($str) {
- $str = str_replace('Ä', 'AE', $str);
- $str = str_replace('ä', 'ae', $str);
- $str = str_replace('Ö', 'OE', $str);
- $str = str_replace('ö', 'oe', $str);
- $str = str_replace('Ü', 'UE', $str);
- $str = str_replace('ü', 'ue', $str);
- $str = str_replace('ß', 'sz', $str);
- $str = str_replace(' ', '_' , $str);
- return preg_replace('#[^\w]#', '', $str);
+ static $from = array(
+ 'Ä',
+ 'ä',
+
+ 'Ö',
+ 'ö',
+
+ 'Ü',
+ 'ü',
+
+ 'ß',
+
+ 'é',
+ 'è',
+ 'ê',
+
+ 'í',
+ 'ì',
+ 'î',
+
+ 'á',
+ 'à',
+ 'â',
+
+ 'ó',
+ 'ò',
+ 'ô',
+
+ 'ú',
+ 'ù',
+ 'û',
+
+ 'ý',
+
+ ' ');
+
+ static $to = array(
+ 'AE',
+ 'ae',
+
+ 'OE',
+ 'oe',
+
+ 'UE',
+ 'ue',
+
+ 'ss',
+
+ 'e',
+ 'e',
+ 'e',
+
+ 'i',
+ 'i',
+ 'i',
+
+ 'a',
+ 'a',
+ 'a',
+
+ 'o',
+ 'o',
+ 'o',
+
+ 'u',
+ 'u',
+ 'u',
+
+ 'y',
+
+ '_');
+
+ $str = str_replace($from, $to, $str);
+ return preg_replace('#[^' . PAT_FILENAME . ']#i', '', $str);
}
/** Print a footer below the list of entries
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.63.2.3
retrieving revision 1.63.2.4
diff -u -d -r1.63.2.3 -r1.63.2.4
--- serendipity_config.inc.php 26 Apr 2004 10:56:42 -0000 1.63.2.3
+++ serendipity_config.inc.php 3 May 2004 08:01:31 -0000 1.63.2.4
@@ -15,7 +15,7 @@
include_once(S9Y_INCLUDE_PATH . 'compat.php');
ini_set('session.use_trans_sid', 0);
-$serendipity['version'] = '0.6-rc2';
+$serendipity['version'] = '0.6';
$serendipity['production'] = 1;
$serendipity['rewrite'] = 'none';
$serendipity['messagestack'] = array();
@@ -53,10 +53,11 @@
/* URI patterns
* Note that it's important to use @ as the pattern delimiter.
*/
+@define('PAT_FILENAME', '0-9a-z\.\_!%;,\+-');
@define('PAT_UNSUBSCRIBE', '@/'.PATH_UNSUBSCRIBE.'/(.*)/([0-9]+)@');
@define('PAT_ARCHIVES', '@/'.PATH_ARCHIVES.'/(\d+)\.html@');
@define('PAT_ARCHIVES_SHORT', '@/'.PATH_ARCHIVES.'/(\d+)_short\.html@');
-@define('PAT_COMMENTSUB', '@/(\d+)_[\w%]*\.html@i');
+@define('PAT_COMMENTSUB', '@/(\d+)_[' . PAT_FILENAME . ']*\.html@i');
@define('PAT_FEEDS', '@/'.PATH_FEEDS.'/@');
@define('PAT_FEED', '@/(index|atom|rss|b2rss|b2rdf).(rss|rdf|rss2|xml)$@');
@define('PAT_ADMIN', '@/'.PATH_ADMIN.'$@');
|