Changeset:
        4dfbb32fd68b
        
https://sourceforge.net/p/mrbs/hg-code/ci/4dfbb32fd68b2f3129ac4029e258897975ca2b97
Author:
        Campbell Morrison <[email protected]>
Date:
        Tue Feb 21 09:44:36 2017 +0000
Log message:

Started restructuring session code

diffstat:

 web/session/session_cookie.inc    |  46 +++++++++++++++++++-------------------
 web/session/session_http.inc      |   8 +++---
 web/session/session_joomla.inc    |  44 ++++++++++++++++++------------------
 web/session/session_php.inc       |  44 ++++++++++++++++++------------------
 web/session/session_wordpress.inc |  44 ++++++++++++++++++------------------
 5 files changed, 93 insertions(+), 93 deletions(-)

diffs (truncated from 657 to 300 lines):

diff -r bb3e245e3beb -r 4dfbb32fd68b web/session/session_cookie.inc
--- a/web/session/session_cookie.inc    Mon Feb 20 16:29:39 2017 +0000
+++ b/web/session/session_cookie.inc    Tue Feb 21 09:44:36 2017 +0000
@@ -9,7 +9,7 @@
 *                                                                            *
 *   URL arguments  UserName       The user name                              *
 *                  UserPassword   His password                               *
-*                  TargetURL      Where we were going before login.          *
+*                  target_url      Where we were going before login.          *
 *                                                                            *
 *   Notes          To use this session mechanism, set in config.inc.php:     *
 *                  $auth["session"]  = "cookie";                             *
@@ -20,7 +20,7 @@
 $Action = get_form_var('Action', 'string');
 $NewUserName = get_form_var('NewUserName', 'string');
 $NewUserPassword = get_form_var('NewUserPassword', 'string');
-$TargetURL = get_form_var('TargetURL', 'string');
+$target_url = get_form_var('target_url', 'string');
 $returl = get_form_var('returl', 'string');
 
 if (isset($cookie_path_override))
@@ -42,7 +42,7 @@
 
 /*
   Target of the form with sets the URL argument "Action=SetName".
-  Will eventually return to URL argument "TargetURL=whatever".
+  Will eventually return to URL argument "target_url=whatever".
 */
 if (isset($Action) && ($Action == "SetName"))
 {
@@ -63,7 +63,7 @@
     {
       print_header(0, 0, 0, 0, "");
       echo "<p>".get_vocab('unknown_user')."</p>\n";
-      printLoginForm($TargetURL);
+      printLoginForm($target_url);
       exit();
     }
     else
@@ -110,21 +110,21 @@
     if (!empty($returl))
     {
       // check to see whether there's a query string already
-      if (strpos($TargetURL, '?') === false)
+      if (strpos($target_url, '?') === false)
       {
-        $TargetURL .= "?returl=" . urlencode($returl);
+        $target_url .= "?returl=" . urlencode($returl);
       }
       else
       {
-        $TargetURL .= "&returl=" . urlencode($returl);
+        $target_url .= "&returl=" . urlencode($returl);
       }
     }
-    header ("Location: $TargetURL"); /* Redirect browser to initial page */
+    header ("Location: $target_url"); /* Redirect browser to initial page */
     /* Note HTTP 1.1 mandates an absolute URL. Most modern browsers support 
relative URLs,
         which allows to work around problems with DNS inconsistencies in the 
server name.
         Anyway, if the browser cannot redirect automatically, the manual link 
below will work. */
     print_header(0, 0, 0, 0, "");
-    echo "<p>Please click <a 
href=\"".htmlspecialchars($TargetURL)."\">here</a> if you're not redirected 
automatically to the page you requested.</p>\n";
+    echo "<p>Please click <a 
href=\"".htmlspecialchars($target_url)."\">here</a> if you're not redirected 
automatically to the page you requested.</p>\n";
 
     // Print footer and exit
     print_footer(TRUE);
@@ -132,9 +132,9 @@
 
 /*
   Display the login form. Used by two routines below.
-  Will eventually return to $TargetURL.
+  Will eventually return to $target_url.
 */
-function printLoginForm($TargetURL)
+function printLoginForm($target_url)
 {
   global $HTTP_REFERER;
   global $returl;
@@ -155,7 +155,7 @@
     </div>
     <?php
     // We need to preserve the original calling page, so that it's there when 
we eventually get
-    // to the TargetURL (especially if that's edit_entry.php).  If this is the 
first time through then $HTTP_REFERER holds
+    // to the target_url (especially if that's edit_entry.php).  If this is 
the first time through then $HTTP_REFERER holds
     // the original caller.    If this is the second time through we will have 
stored it in $returl.
     if (!isset($returl))
     {
@@ -163,7 +163,7 @@
     }
     echo "<input type=\"hidden\" name=\"returl\" value=\"" . 
htmlspecialchars($returl) . "\">\n";
     ?>
-    <input type="hidden" name="TargetURL" value="<?php echo 
htmlspecialchars($TargetURL) ?>">
+    <input type="hidden" name="target_url" value="<?php echo 
htmlspecialchars($target_url) ?>">
     <input type="hidden" name="Action" value="SetName">
     <div id="logon_submit">
       <input class="submit" type="submit" value="<?php echo get_vocab('login') 
?> ">
@@ -178,12 +178,12 @@
 
 /*
   Target of the form with sets the URL argument "Action=QueryName".
-  Will eventually return to URL argument "TargetURL=whatever".
+  Will eventually return to URL argument "target_url=whatever".
 */
 if (isset($Action) && ($Action == "QueryName"))
 {
   print_header(0, 0, 0, 0, "");
-  printLoginForm($TargetURL);
+  printLoginForm($target_url);
   exit();
 }
 
@@ -201,12 +201,12 @@
 
   echo "<p>".get_vocab("norights")."</p>\n";
 
-  $TargetURL = this_page();
+  $target_url = this_page();
   if (isset($QUERY_STRING))
   {
-    $TargetURL = $TargetURL . "?" . $QUERY_STRING;
+    $target_url = $target_url . "?" . $QUERY_STRING;
   }
-  printLoginForm($TargetURL);
+  printLoginForm($target_url);
 
   exit();
 }
@@ -294,14 +294,14 @@
 {
   global $PHP_SELF, $QUERY_STRING, $user_list_link, $day, $month, $year;
   
-  $TargetURL = this_page();
+  $target_url = this_page();
   if (isset($url_base) && ($url_base !== ''))
   {
-    $TargetURL = $url_base . '/' . $TargetURL;
+    $target_url = $url_base . '/' . $target_url;
   }
   if (isset($QUERY_STRING))
   {
-    $TargetURL = $TargetURL . "?" . $QUERY_STRING;
+    $target_url = $target_url . "?" . $QUERY_STRING;
   }
   $user=getUserName();
   if ($user != "")
@@ -321,7 +321,7 @@
       </a>
       <form method="post" action="admin.php">
         <div>
-          <input type="hidden" name="TargetURL" value="<?php echo 
htmlspecialchars($TargetURL) ?>">
+          <input type="hidden" name="target_url" value="<?php echo 
htmlspecialchars($target_url) ?>">
           <input type="hidden" name="Action" value="SetName">
           <input type="hidden" name="UserName" value="">
           <input type="hidden" name="UserPassword" value="">
@@ -336,7 +336,7 @@
       <a href=""><?php echo get_vocab('unknown_user'); ?></a>
       <form method="post" action="admin.php">
         <div>
-          <input type="hidden" name="TargetURL" value="<?php echo 
htmlspecialchars($TargetURL) ?>">
+          <input type="hidden" name="target_url" value="<?php echo 
htmlspecialchars($target_url) ?>">
           <input type="hidden" name="Action" value="QueryName">
           <input type="submit" value=" <?php echo get_vocab('login') ?> ">
         </div>
diff -r bb3e245e3beb -r 4dfbb32fd68b web/session/session_http.inc
--- a/web/session/session_http.inc      Mon Feb 20 16:29:39 2017 +0000
+++ b/web/session/session_http.inc      Tue Feb 21 09:44:36 2017 +0000
@@ -75,14 +75,14 @@
 {
   global $PHP_SELF, $QUERY_STRING, $user_list_link, $day, $month, $year;
   
-  $TargetURL = this_page();
+  $target_url = this_page();
   if (isset($url_base) && ($url_base !== ''))
   {
-    $TargetURL = $url_base . '/' . $TargetURL;
+    $target_url = $url_base . '/' . $target_url;
   }
   if (isset($QUERY_STRING))
   {
-    $TargetURL = $TargetURL . "?" . $QUERY_STRING;
+    $target_url = $target_url . "?" . $QUERY_STRING;
   }
   
   $user = getUserName();
@@ -109,7 +109,7 @@
     <a href=""><?php echo get_vocab('unknown_user'); ?></a>
     <form method="post" action="admin.php">
       <div>
-        <input type="hidden" name="TargetURL" value="<?php echo 
htmlspecialchars($TargetURL) ?>">
+        <input type="hidden" name="target_url" value="<?php echo 
htmlspecialchars($target_url) ?>">
         <input type="hidden" name="Action" value="QueryName">
         <input type="submit" value=" <?php echo get_vocab('login') ?> ">
       </div>
diff -r bb3e245e3beb -r 4dfbb32fd68b web/session/session_joomla.inc
--- a/web/session/session_joomla.inc    Mon Feb 20 16:29:39 2017 +0000
+++ b/web/session/session_joomla.inc    Tue Feb 21 09:44:36 2017 +0000
@@ -13,12 +13,12 @@
 $Action = get_form_var('Action', 'string');
 $NewUserName = get_form_var('NewUserName', 'string');
 $NewUserPassword = get_form_var('NewUserPassword', 'string');
-$TargetURL = get_form_var('TargetURL', 'string');
+$target_url = get_form_var('target_url', 'string');
 $returl = get_form_var('returl', 'string');
 
 /*
   Target of the form with sets the URL argument "Action=SetName".
-  Will eventually return to URL argument "TargetURL=whatever".
+  Will eventually return to URL argument "target_url=whatever".
 */
 if (isset($Action) && ($Action == "SetName"))
 {
@@ -37,7 +37,7 @@
     {
       print_header(0, 0, 0, 0, "");
       echo "<p>".get_vocab('unknown_user')."</p>\n";
-      printLoginForm($TargetURL);
+      printLoginForm($target_url);
       exit();
     }
   }
@@ -45,23 +45,23 @@
   if (!empty($returl))
   {
     // check to see whether there's a query string already
-    if (strpos($TargetURL, '?') === false)
+    if (strpos($target_url, '?') === false)
     {
-      $TargetURL .= "?returl=" . urlencode($returl);
+      $target_url .= "?returl=" . urlencode($returl);
     }
     else
     {
-      $TargetURL .= "&returl=" . urlencode($returl);
+      $target_url .= "&returl=" . urlencode($returl);
     }
   }
 
-  header ("Location: $TargetURL"); /* Redirect browser to initial page */
+  header ("Location: $target_url"); /* Redirect browser to initial page */
   /* Note HTTP 1.1 mandates an absolute URL. Most modern browsers support 
relative URLs,
     which allows to work around problems with DNS inconsistencies in the 
server name.
     Anyway, if the browser cannot redirect automatically, the manual link 
below will work. */
   print_header(0, 0, 0, 0, "");
   echo "<br>\n";
-  echo "<p>Please click <a href=\"".htmlspecialchars($TargetURL)."\">here</a> 
if you're not redirected automatically to the page you requested.</p>\n";
+  echo "<p>Please click <a href=\"".htmlspecialchars($target_url)."\">here</a> 
if you're not redirected automatically to the page you requested.</p>\n";
 
   // Print footer and exit
   print_footer(TRUE);
@@ -69,9 +69,9 @@
 
 /*
   Display the login form. Used by two routines below.
-  Will eventually return to $TargetURL.
+  Will eventually return to $target_url.
 */
-function printLoginForm($TargetURL)
+function printLoginForm($target_url)
 {
   global $PHP_SELF, $HTTP_REFERER;
   global $returl;
@@ -89,7 +89,7 @@
     </div>
     <?php
     // We need to preserve the original calling page, so that it's there when 
we eventually get
-    // to the TargetURL (especially if that's edit_entry.php).  If this is the 
first time through then $HTTP_REFERER holds
+    // to the target_url (especially if that's edit_entry.php).  If this is 
the first time through then $HTTP_REFERER holds
     // the original caller.    If this is the second time through we will have 
stored it in $returl.
     if (!isset($returl))
     {
@@ -97,7 +97,7 @@
     }
     echo "<input type=\"hidden\" name=\"returl\" value=\"" . 
htmlspecialchars($returl) . "\">\n";
     ?>
-    <input type="hidden" name="TargetURL" value="<?php echo 
htmlspecialchars($TargetURL) ?>">
+    <input type="hidden" name="target_url" value="<?php echo 
htmlspecialchars($target_url) ?>">
     <input type="hidden" name="Action" value="SetName">
     <div id="logon_submit">
       <input class="submit" type="submit" value=" <?php echo 
get_vocab('login') ?> ">
@@ -112,12 +112,12 @@
 
 /*
   Target of the form with sets the URL argument "Action=QueryName".
-  Will eventually return to URL argument "TargetURL=whatever".
+  Will eventually return to URL argument "target_url=whatever".
 */
 if (isset($Action) && ($Action == "QueryName"))
 {
   print_header(0, 0, 0, 0, "");
-  printLoginForm($TargetURL);
+  printLoginForm($target_url);
   exit();
 }
 
@@ -135,12 +135,12 @@
 
   echo "<p>".get_vocab("norights")."</p>\n";
 
-  $TargetURL = basename($PHP_SELF);
+  $target_url = basename($PHP_SELF);

------------------------------------------------------------------------------
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