X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=metaform.php;h=4217a5537d41fd0332d75172c49ce50652a41867;hb=912bdab05d6262ab07e7ea6664192f97239db3e1;hp=a0dce787236395b62f496b16a86a01a6eac764ba;hpb=f6fdd9deec6c7815f5877270e746e1bd1201a726;p=wfpl.git diff --git a/metaform.php b/metaform.php index a0dce78..4217a55 100644 --- a/metaform.php +++ b/metaform.php @@ -1,19 +1,9 @@ . +# This program is in the public domain within the United States. Additionally, +# we waive copyright and related rights in the work worldwide through the CC0 +# 1.0 Universal public domain dedication, which can be found at +# http://creativecommons.org/publicdomain/zero/1.0/ # This file writes the code for you (sql, php, html, email) to handle a form. @@ -251,7 +241,7 @@ function get_fields() { # this one, that you're using to create forms function set_form_action() { - $action = ereg_replace('.*/', '', $_SERVER['REQUEST_URI']); + $action = preg_replace('|.*/|', '', $_SERVER['REQUEST_URI']); if($action == '') $action = './'; tem_set('form_action', $action); } @@ -552,9 +542,9 @@ function make_php() { # make a URL for the edit page with all the fields filled in function edit_url() { $url = this_url(); - $url = ereg_replace('view_php=[^&]*', 'edit=yes', $url); - $url = ereg_replace('download_tar=[^&]*', 'edit=yes', $url); - $url = ereg_replace('/[a-z0-9_.]*\?', '/?', $url); + $url = preg_replace('|view_php=[^&]*|', 'edit=yes', $url); + $url = preg_replace('|download_tar=[^&]*|', 'edit=yes', $url); + $url = preg_replace('|/[a-z0-9_.]*\?|', '/?', $url); return $url; } @@ -611,7 +601,7 @@ function preview() { } $preview = $preview_tem->run(); unset($preview_tem); - $preview = ereg_replace('type="submit"', 'type="submit" disabled="disabled"', $preview); + $preview = preg_replace('|type="submit"|', 'type="submit" disabled="disabled"', $preview); tem_set('preview', $preview); tem_show('hiddens'); set_form_action();