From: Jason Woofenden Date: Sat, 20 Jun 2009 23:48:49 +0000 (-0400) Subject: metaform: allow spaces in display names (singular and plural) X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=commitdiff_plain;h=bec27c6cdc0ac4b18024d82a4fdefd6708b59ba6 metaform: allow spaces in display names (singular and plural) --- diff --git a/metaform.php b/metaform.php index 19e2168..c5c8189 100644 --- a/metaform.php +++ b/metaform.php @@ -70,7 +70,7 @@ function metaform() { if(isset($_REQUEST['singular'])) { $GLOBALS['file_name'] = format_varname($_REQUEST['file_name']); $GLOBALS['table_name'] = format_varname($_REQUEST['table_name']); - $GLOBALS['plural'] = format_varname($_REQUEST['plural']); + $GLOBALS['plural'] = format_oneline($_REQUEST['plural']); # backwards compatibility: if(isset($_REQUEST['form_name'])) { $GLOBALS['file_name'] = $GLOBALS['table_name'] = $GLOBALS['plural'] = format_varname($_REQUEST['form_name']); @@ -79,7 +79,7 @@ function metaform() { tem_set('table_name', $GLOBALS['table_name']); tem_set('plural', $GLOBALS['plural']); - $GLOBALS['singular'] = format_varname($_REQUEST['singular']); + $GLOBALS['singular'] = format_oneline($_REQUEST['singular']); tem_set('singular', $GLOBALS['singular']); $GLOBALS['opt_email'] = format_yesno($_REQUEST['opt_email']); tem_set('opt_email', $GLOBALS['opt_email']); @@ -529,7 +529,7 @@ function download_tar() { $name = $GLOBALS['file_name']; $data = array( ".htaccess" => make_htaccess(), - "run.php ->" => 'code/wfpl/run.php', + #"run.php ->" => 'code/wfpl/run.php', "style.css" => read_whole_file('code/wfpl/metaform/style.css'), "$name.html" => make_html(), "$name.php" => make_php());