Mercurial > hg > fapweb
changeset 771:cd8a29647c09
Change the API of stGetFormStart().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 20 Nov 2014 13:54:18 +0200 |
parents | d891c0ce2a16 |
children | 3901bb443119 |
files | msitegen.inc.php pages/register.inc.php |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/msitegen.inc.php Thu Nov 20 12:52:47 2014 +0200 +++ b/msitegen.inc.php Thu Nov 20 13:54:18 2014 +0200 @@ -264,12 +264,13 @@ } -function stGetFormStart($name, $action = "", $method = "post", $extra = "") +function stGetFormStart($name, $action = FALSE, $method = FALSE, $extra = FALSE) { $str = - "<form name=\"".$name."\" action=\"". - ($action != "" ? $action : $name). - "\" method=\"".$method."\"".$extra.">\n"; + "<form name=\"".$name."\"". + ($action !== FALSE ? " action=\"".$action."\"" : ""). + " method=\"".($method !== FALSE ? $method : "post")."\"". + ($extra !== FALSE ? " ".$extra : "").">\n"; if (($csrfID = stGetSessionItem("csrfID", FALSE)) !== FALSE) $str .= stGetFormHiddenInput("csrfID", $csrfID)."\n";
--- a/pages/register.inc.php Thu Nov 20 12:52:47 2014 +0200 +++ b/pages/register.inc.php Thu Nov 20 13:54:18 2014 +0200 @@ -40,7 +40,7 @@ global $formFields; echo - stGetFormStart("register"). + stGetFormStart("register", "register"). " ".stGetFormSubmitInput("continue", $button)."\n"; stPrintFormHiddenInput("mode", $mode); @@ -147,7 +147,7 @@ echo stGetSetting("registerPageBlurb"). - stGetFormStart("register"). + stGetFormStart("register", "register"). " ".stGetFormHiddenInput("mode", "check")."\n". " ".stGetFormHiddenInput("hash", $botCheckHash)."\n". " <table class=\"register\">\n";