Changeset:
        df3e77c185ba
        
https://sourceforge.net/p/mrbs/hg-code/ci/df3e77c185bad8b2ea1004ccc59e99951b6ce693
Author:
        Campbell Morrison <cimorri...@hg.code.sf.net>
Date:
        Thu Mar 16 13:57:37 2017 +0000
Log message:

Restructured

diffstat:

 web/js/general.js.php             |   4 ++--
 web/session/functions_session.inc |  18 +++++++++---------
 web/session/session_cookie.inc    |  24 ++++++++++++------------
 web/session/session_joomla.inc    |  20 ++++++++++----------
 web/session/session_php.inc       |  18 +++++++++---------
 web/session/session_wordpress.inc |  20 ++++++++++----------
 6 files changed, 52 insertions(+), 52 deletions(-)

diffs (truncated from 303 to 300 lines):

diff -r 9fe6d6ffe075 -r df3e77c185ba web/js/general.js.php
--- a/web/js/general.js.php     Thu Mar 16 13:47:06 2017 +0000
+++ b/web/js/general.js.php     Thu Mar 16 13:57:37 2017 +0000
@@ -151,9 +151,9 @@
   // if there's a logon box, set the username input field in focus
   ?>
   var logonForm = document.getElementById('logon');
-  if (logonForm && logonForm.NewUserName)
+  if (logonForm && logonForm.username)
   {
-    logonForm.NewUserName.focus();
+    logonForm.username.focus();
   }
   
   <?php
diff -r 9fe6d6ffe075 -r df3e77c185ba web/session/functions_session.inc
--- a/web/session/functions_session.inc Thu Mar 16 13:47:06 2017 +0000
+++ b/web/session/functions_session.inc Thu Mar 16 13:57:37 2017 +0000
@@ -33,21 +33,21 @@
     $placeholder = get_vocab("users.name");
   }
   
-  $html .= "<label for=\"NewUserName\" title=\"$placeholder\">" . 
+  $html .= "<label for=\"username\" title=\"$placeholder\">" . 
            get_vocab("user") . "</label>\n";
-  $html .= "<input type=\"text\" id=\"NewUserName\" name=\"NewUserName\" " .
+  $html .= "<input type=\"text\" id=\"username\" name=\"username\" " .
            " placeholder=\"$placeholder\">\n";
   $html .= "</div>\n";
   
   $html .= "<div>\n";
-  $html .= "<label for=\"NewUserPassword\">" . get_vocab("users.password") . 
"</label>\n";
-  $html .= "<input type=\"password\" id=\"NewUserPassword\" 
name=\"NewUserPassword\">\n";
+  $html .= "<label for=\"password\">" . get_vocab("users.password") . 
"</label>\n";
+  $html .= "<input type=\"password\" id=\"password\" name=\"password\">\n";
   $html .= "</div>\n";
 
 
   $html .= "<input type=\"hidden\" name=\"returl\" value=\"" . 
htmlspecialchars($returl) . "\">\n";
   $html .= "<input type=\"hidden\" name=\"target_url\" value=\"" . 
htmlspecialchars($target_url) . "\">\n";
-  $html .= "<input type=\"hidden\" name=\"Action\" value=\"SetName\">\n";
+  $html .= "<input type=\"hidden\" name=\"action\" value=\"SetName\">\n";
   
   $html .= "<div id=\"logon_submit\">\n";
   $html .= "<input class=\"submit\" type=\"submit\" value=\"" . 
get_vocab('login') . "\">\n";
@@ -90,7 +90,7 @@
   $html .= "<form method=\"post\" action=\"admin.php\">\n";
   $html .= "<div>\n";
   $html .= "<input type=\"hidden\" name=\"target_url\" value=\"" . 
htmlspecialchars($target_url) . "\">\n";
-  $html .= "<input type=\"hidden\" name=\"Action\" value=\"QueryName\">\n";
+  $html .= "<input type=\"hidden\" name=\"action\" value=\"QueryName\">\n";
   $html .= "<input type=\"submit\" value=\"" . get_vocab('login') . "\">\n";
   $html .= "</div>\n";
   $html .= "</form>\n";
@@ -106,9 +106,9 @@
   $html .= "<form method=\"post\" action=\"admin.php\">\n";
   $html .= "<div>\n";
   $html .= "<input type=\"hidden\" name=\"target_url\" value=\"" . 
htmlspecialchars($target_url) . "\">\n";
-  $html .= "<input type=\"hidden\" name=\"Action\" value=\"SetName\">\n";
-  $html .= "<input type=\"hidden\" name=\"NewUserName\" value=\"\">\n";
-  $html .= "<input type=\"hidden\" name=\"NewUserPassword\" value=\"\">";
+  $html .= "<input type=\"hidden\" name=\"action\" value=\"SetName\">\n";
+  $html .= "<input type=\"hidden\" name=\"username\" value=\"\">\n";
+  $html .= "<input type=\"hidden\" name=\"password\" value=\"\">";
   $html .= "<input type=\"submit\" value=\"" . get_vocab('logoff') . "\">\n";
   $html .= "</div>\n";
   $html .= "</form>\n";
diff -r 9fe6d6ffe075 -r df3e77c185ba web/session/session_cookie.inc
--- a/web/session/session_cookie.inc    Thu Mar 16 13:47:06 2017 +0000
+++ b/web/session/session_cookie.inc    Thu Mar 16 13:57:37 2017 +0000
@@ -22,9 +22,9 @@
 global $auth;
 
 // Get non-standard form variables
-$Action = get_form_var('Action', 'string', null, INPUT_POST);
-$NewUserName = get_form_var('NewUserName', 'string', null, INPUT_POST);
-$NewUserPassword = get_form_var('NewUserPassword', 'string', null, INPUT_POST);
+$action = get_form_var('action', 'string', null, INPUT_POST);
+$username = get_form_var('username', 'string', null, INPUT_POST);
+$password = get_form_var('password', 'string', null, INPUT_POST);
 $target_url = get_form_var('target_url', 'string', null, INPUT_POST);
 $returl = get_form_var('returl', 'string', null, INPUT_POST);
 
@@ -54,25 +54,25 @@
 }
 
 /*
-  Target of the form with sets the URL argument "Action=SetName".
+  Target of the form with sets the URL argument "action=SetName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "SetName"))
+if (isset($action) && ($action == "SetName"))
 {
   // Avoid errors with error level ALL
-  if ( !isset( $NewUserName ) )
+  if ( !isset( $username ) )
   {
-    $NewUserName = "";
+    $username = "";
   }
   /* First make sure the password is valid */
-  if ($NewUserName == "") 
+  if ($username == "") 
   {
     // Delete cookie
     setcookie("SessionToken", '', time()-42000, $cookie_path);
   }
   else
   {
-    if (($valid_username = authValidateUser($NewUserName, $NewUserPassword)) 
=== false)
+    if (($valid_username = authValidateUser($username, $password)) === false)
     {
       print_header();
       print_login_failed();
@@ -82,7 +82,7 @@
     else
     {
       $UserName     = $valid_username;
-      $UserPassword = $NewUserPassword;
+      $UserPassword = $password;
     }
 
     if ($auth['session_cookie']['session_expire_time'] == 0)
@@ -145,10 +145,10 @@
 
 
 /*
-  Target of the form with sets the URL argument "Action=QueryName".
+  Target of the form with sets the URL argument "action=QueryName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "QueryName"))
+if (isset($action) && ($action == "QueryName"))
 {
   print_header();
   print_login_form(this_page(), $target_url, $returl);
diff -r 9fe6d6ffe075 -r df3e77c185ba web/session/session_joomla.inc
--- a/web/session/session_joomla.inc    Thu Mar 16 13:47:06 2017 +0000
+++ b/web/session/session_joomla.inc    Thu Mar 16 13:57:37 2017 +0000
@@ -10,9 +10,9 @@
 global $auth;
 
 // Get non-standard form variables
-$Action = get_form_var('Action', 'string', null, INPUT_POST);
-$NewUserName = get_form_var('NewUserName', 'string', null, INPUT_POST);
-$NewUserPassword = get_form_var('NewUserPassword', 'string', null, INPUT_POST);
+$action = get_form_var('action', 'string', null, INPUT_POST);
+$username = get_form_var('username', 'string', null, INPUT_POST);
+$password = get_form_var('password', 'string', null, INPUT_POST);
 $target_url = get_form_var('target_url', 'string', null, INPUT_POST);
 $returl = get_form_var('returl', 'string', null, INPUT_POST);
 
@@ -25,21 +25,21 @@
 }
 
 /*
-  Target of the form with sets the URL argument "Action=SetName".
+  Target of the form with sets the URL argument "action=SetName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "SetName"))
+if (isset($action) && ($action == "SetName"))
 {
   /* First make sure the password is valid */
-  if ($NewUserName == "")
+  if ($username == "")
   {
     $mainframe->logout();
   }
   else
   {
     $credentials = array();
-    $credentials['username'] = $NewUserName;
-    $credentials['password'] = $NewUserPassword;
+    $credentials['username'] = $username;
+    $credentials['password'] = $password;
  
     if (!$mainframe->login($credentials))
     {
@@ -77,10 +77,10 @@
 
 
 /*
-  Target of the form with sets the URL argument "Action=QueryName".
+  Target of the form with sets the URL argument "action=QueryName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "QueryName"))
+if (isset($action) && ($action == "QueryName"))
 {
   print_header();
   print_login_form(this_page(), $target_url, $returl);
diff -r 9fe6d6ffe075 -r df3e77c185ba web/session/session_php.inc
--- a/web/session/session_php.inc       Thu Mar 16 13:47:06 2017 +0000
+++ b/web/session/session_php.inc       Thu Mar 16 13:57:37 2017 +0000
@@ -19,9 +19,9 @@
 global $auth;
 
 // Get non-standard form variables
-$Action = get_form_var('Action', 'string', null, INPUT_POST);
-$NewUserName = get_form_var('NewUserName', 'string', null, INPUT_POST);
-$NewUserPassword = get_form_var('NewUserPassword', 'string', null, INPUT_POST);
+$action = get_form_var('action', 'string', null, INPUT_POST);
+$username = get_form_var('username', 'string', null, INPUT_POST);
+$password = get_form_var('password', 'string', null, INPUT_POST);
 $target_url = get_form_var('target_url', 'string', null, INPUT_POST);
 $returl = get_form_var('returl', 'string', null, INPUT_POST);
 
@@ -85,13 +85,13 @@
 }
 
 /*
-  Target of the form with sets the URL argument "Action=SetName".
+  Target of the form with sets the URL argument "action=SetName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "SetName"))
+if (isset($action) && ($action == "SetName"))
 {
   /* First make sure the password is valid */
-  if ($NewUserName == "")
+  if ($username == "")
   {
 
     // Unset the session variables
@@ -100,7 +100,7 @@
   }
   else
   {
-    if (($valid_username = authValidateUser($NewUserName, $NewUserPassword)) 
=== false)
+    if (($valid_username = authValidateUser($username, $password)) === false)
     {
       print_header();
       print_login_failed();
@@ -139,10 +139,10 @@
 
 
 /*
-  Target of the form with sets the URL argument "Action=QueryName".
+  Target of the form with sets the URL argument "action=QueryName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "QueryName"))
+if (isset($action) && ($action == "QueryName"))
 {
   print_header();
   print_login_form(this_page(), $target_url, $returl);
diff -r 9fe6d6ffe075 -r df3e77c185ba web/session/session_wordpress.inc
--- a/web/session/session_wordpress.inc Thu Mar 16 13:47:06 2017 +0000
+++ b/web/session/session_wordpress.inc Thu Mar 16 13:57:37 2017 +0000
@@ -5,9 +5,9 @@
 require_once MRBS_ROOT . '/session/functions_session.inc';
 
 // Get non-standard form variables
-$Action = get_form_var('Action', 'string', null, INPUT_POST);
-$NewUserName = get_form_var('NewUserName', 'string', null, INPUT_POST);
-$NewUserPassword = get_form_var('NewUserPassword', 'string', null, INPUT_POST);
+$action = get_form_var('action', 'string', null, INPUT_POST);
+$username = get_form_var('username', 'string', null, INPUT_POST);
+$password = get_form_var('password', 'string', null, INPUT_POST);
 $target_url = get_form_var('target_url', 'string', null, INPUT_POST);
 $returl = get_form_var('returl', 'string', null, INPUT_POST);
 
@@ -20,10 +20,10 @@
 }
 
 /*
-  Target of the form with sets the URL argument "Action=QueryName".
+  Target of the form with sets the URL argument "action=QueryName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "QueryName"))
+if (isset($action) && ($action == "QueryName"))
 {
   print_header();
   print_login_form(this_page(), $target_url, $returl);
@@ -32,20 +32,20 @@
 
 
 /*
-  Target of the form with sets the URL argument "Action=SetName".
+  Target of the form with sets the URL argument "action=SetName".
   Will eventually return to URL argument "target_url=whatever".
 */
-if (isset($Action) && ($Action == "SetName"))
+if (isset($action) && ($action == "SetName"))
 {
-  if ($NewUserName == "")
+  if ($username == "")
   {
     wp_logout();
   }
   else
   {
     $credentials = array();
-    $credentials['user_login'] = $NewUserName;
-    $credentials['user_password'] = $NewUserPassword;
+    $credentials['user_login'] = $username;
+    $credentials['user_password'] = $password;

------------------------------------------------------------------------------
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
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to