Changeset:
        18e45693368d
        
https://sourceforge.net/p/mrbs/hg-code/ci/18e45693368d60f33492a70c35f44a3f0ca6401d
Author:
        Campbell Morrison <[email protected]>
Date:
        Tue Feb 21 10:07:44 2017 +0000
Log message:

Restructured - made the login form action attribute value a parameter

diffstat:

 web/session/session_php.inc |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r 4dfbb32fd68b -r 18e45693368d web/session/session_php.inc
--- a/web/session/session_php.inc       Tue Feb 21 09:44:36 2017 +0000
+++ b/web/session/session_php.inc       Tue Feb 21 10:07:44 2017 +0000
@@ -101,7 +101,7 @@
       {
         print_header(0, 0, 0, 0, "");
         echo "<p>".get_vocab('unknown_user')."</p>\n";
-        printLoginForm($target_url);
+        printLoginForm(this_page(), $target_url);
         exit();
       }
     }
@@ -140,15 +140,15 @@
   Display the login form. Used by two routines below.
   Will eventually return to $target_url.
 */
-function printLoginForm($target_url)
+function printLoginForm($action, $target_url)
 {
   global $HTTP_REFERER;
   global $returl;
   
   $html = '';
 
-  $html .= "<form class=\"form_general\" id=\"logon\" method=\"post\" 
action=\"" .
-           htmlspecialchars(this_page()) . "\">\n";
+  $html .= "<form class=\"form_general\" id=\"logon\" method=\"post\"".
+           " action=\"" . htmlspecialchars($action) . "\">\n";
   $html .= "<fieldset>\n";
   $html .= "<legend>" . get_vocab("please_login") . "</legend>\n";
   
@@ -203,7 +203,7 @@
 if (isset($Action) && ($Action == "QueryName"))
 {
   print_header(0, 0, 0, 0, "");
-  printLoginForm($target_url);
+  printLoginForm(this_page(), $target_url);
   exit();
 }
 
@@ -226,7 +226,7 @@
   {
     $target_url = $target_url . "?" . $QUERY_STRING;
   }
-  printLoginForm($target_url);
+  printLoginForm(this_page(), $target_url);
 
   exit();
 }

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to