From: Jason Woofenden Date: Thu, 14 Jun 2007 04:05:44 +0000 (-0400) Subject: Oh yeah, and now hyphens are allowed in filenames (just not at the beginning) X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=9a9b08360777629b46e7b83bd4f5f091a249be21;hp=3e4ada79d7082b23e1a4710758b951b609b8c9ed;p=wfpl.git Oh yeah, and now hyphens are allowed in filenames (just not at the beginning) --- diff --git a/dwt.php b/dwt.php index 49fac82..6cd2d66 100644 --- a/dwt.php +++ b/dwt.php @@ -61,15 +61,19 @@ function dwt_find($name) { return dwt_find_raw(""); } -function dwt_append($name, $value) { - $index = dwt_find($name); +function dwt_append_raw($name, $value) { + $index = dwt_find_raw($name); if($index !== null) { $GLOBALS['_dwt_values'][$index] .= $value; } else { - dwt_set($name, $value); + dwt_set_raw($name, $value); } } +function dwt_append($name, $value) { + dwt_append_raw("", $value); +} + function dwt_output($filename = null) { if($filename !== null) { dwt_load($filename); diff --git a/format.php b/format.php index cf59504..055e66d 100644 --- a/format.php +++ b/format.php @@ -32,8 +32,8 @@ function format_zip($str) { function format_filename($str) { $str = strtolower($str); - $str = ereg_replace('[^a-z0-9_.]', '_', $str); - return ereg_replace('^[.]*', '', $str); + $str = ereg_replace('[^a-z0-9_.-]', '_', $str); + return ereg_replace('^[.-]', '_', $str); } function format_varname($str) { diff --git a/messages.php b/messages.php index 8d8196d..326ed16 100644 --- a/messages.php +++ b/messages.php @@ -43,12 +43,12 @@ # Full-featured example: # # -#
+#
# # #
# -#

~message_text.html~

+#

~message_text.html~

# #
#