Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7386
Modified Files:
serendipity_functions.inc.php
Log Message:
back out previous commit. Replacing '_' with '+' also changed permanent
URIs, and those shouldn't. Will make a better solution later.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -d -r1.312 -r1.313
--- serendipity_functions.inc.php 5 Jul 2004 08:25:49 -0000 1.312
+++ serendipity_functions.inc.php 5 Jul 2004 09:31:27 -0000 1.313
@@ -922,7 +922,7 @@
/**
* Creates a filename that consists of [a-zA-z0-9_] (with some custom adjustments (space -> _, ä -> ae and such)
**/
-function serendipity_makeFilename($str) {
+function serendipity_makeFilename($str, $compat = true) {
static $from = array(
'Ä',
'ä',
@@ -993,7 +993,7 @@
'y',
- '+');
+ '_');
$str = str_replace($from, $to, $str);
return preg_replace('#[^' . PAT_FILENAME . ']#i', '', $str);
@@ -2210,10 +2210,10 @@
/**
* return a fully qualified URL
*/
-function serendipity_archiveURL($id, $title, $key = 'baseURL') {
+function serendipity_archiveURL($id, $title, $key = 'baseURL', $compat = true) {
global $serendipity;
- return $serendipity[$key] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . PATH_ARCHIVES . '/' . $id . '_' . serendipity_makeFilename($title) . '.html';
+ return $serendipity[$key] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . PATH_ARCHIVES . '/' . $id . '_' . serendipity_makeFilename($title, $compat) . '.html';
}
/**
|