Changeset:
0445f066667b
https://sourceforge.net/p/mrbs/hg-code/ci/0445f066667b08c69a56c0a11fb45469327cb810
Author:
Campbell Morrison <[email protected]>
Date:
Wed Feb 22 17:30:38 2017 +0000
Log message:
Restructured - got rid of $user_list_link global
diffstat:
web/auth/auth_db.inc | 4 ----
web/session/session_cookie.inc | 6 +++---
web/session/session_http.inc | 8 ++++----
web/session/session_joomla.inc | 6 +++---
web/session/session_php.inc | 6 +++---
web/session/session_remote_user.inc | 11 +++++------
web/session/session_wordpress.inc | 6 +++---
7 files changed, 21 insertions(+), 26 deletions(-)
diffs (163 lines):
diff -r 63bb7e90a300 -r 0445f066667b web/auth/auth_db.inc
--- a/web/auth/auth_db.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/auth/auth_db.inc Wed Feb 22 17:30:38 2017 +0000
@@ -15,10 +15,6 @@
*
******************************************************************************/
-/* session_php.inc and session_cookie.inc will add a link to the user list
- in the logon box, if the value $user_list_link is set. */
-$user_list_link = "edit_users.php";
-
function rehash($password_hash, $column_name, $column_value)
{
diff -r 63bb7e90a300 -r 0445f066667b web/session/session_cookie.inc
--- a/web/session/session_cookie.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/session/session_cookie.inc Wed Feb 22 17:30:38 2017 +0000
@@ -259,7 +259,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $user_list_link, $day, $month, $year;
+ global $QUERY_STRING, $auth, $day, $month, $year;
$target_url = this_page();
if (isset($url_base) && ($url_base !== ''))
@@ -310,9 +310,9 @@
</form>
<?php
}
- if (isset($user_list_link))
+ if ($auth['type'] == 'db')
{
- print "<a id=\"user_list_link\" href=\"$user_list_link\">" .
get_vocab('user_list') . "</a>\n";
+ print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
}
}
diff -r 63bb7e90a300 -r 0445f066667b web/session/session_http.inc
--- a/web/session/session_http.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/session/session_http.inc Wed Feb 22 17:30:38 2017 +0000
@@ -73,7 +73,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $PHP_SELF, $QUERY_STRING, $user_list_link, $day, $month, $year;
+ global $PHP_SELF, $QUERY_STRING, $auth, $day, $month, $year;
$target_url = this_page();
if (isset($url_base) && ($url_base !== ''))
@@ -116,9 +116,9 @@
</form>
<?php
}
- if (isset($user_list_link))
+ if ($auth['type'] == 'db')
{
- print "<a id=\"user_list_link\" href=\"$user_list_link\">" .
get_vocab('user_list') . "</a>\n" ;
- }
+ print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
+ }
}
diff -r 63bb7e90a300 -r 0445f066667b web/session/session_joomla.inc
--- a/web/session/session_joomla.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/session/session_joomla.inc Wed Feb 22 17:30:38 2017 +0000
@@ -120,7 +120,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $user_list_link, $day, $month, $year;
+ global $QUERY_STRING, $auth, $day, $month, $year;
$target_url = this_page();
if (isset($url_base) && ($url_base !== ''))
@@ -169,9 +169,9 @@
</form>
<?php
}
- if (isset($user_list_link))
+ if ($auth['type'] == 'db')
{
- print "<a id=\"user_list_link\" href=\"$user_list_link\">" .
get_vocab('user_list') . "</a>\n";
+ print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
}
}
diff -r 63bb7e90a300 -r 0445f066667b web/session/session_php.inc
--- a/web/session/session_php.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/session/session_php.inc Wed Feb 22 17:30:38 2017 +0000
@@ -190,7 +190,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $user_list_link, $day, $month, $year;
+ global $QUERY_STRING, $auth, $day, $month, $year;
$target_url = this_page();
if (isset($url_base) && ($url_base !== ''))
@@ -239,9 +239,9 @@
</form>
<?php
}
- if (isset($user_list_link))
+ if ($auth['type'] == 'db')
{
- print "<a id=\"user_list_link\" href=\"$user_list_link\">" .
get_vocab('user_list') . "</a>\n";
+ print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
}
}
diff -r 63bb7e90a300 -r 0445f066667b web/session/session_remote_user.inc
--- a/web/session/session_remote_user.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/session/session_remote_user.inc Wed Feb 22 17:30:38 2017 +0000
@@ -49,8 +49,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $user_list_link, $day, $month, $year;
- global $auth;
+ global $auth, $day, $month, $year;
$user = getUserName();
@@ -68,10 +67,10 @@
. get_vocab('show_my_entries') . "\">" . get_vocab('you_are')." "
. htmlspecialchars($user) ?></a>
<?php
- if (isset($user_list_link))
- {
- print "<a id=\"user_list_link\" href=\"$user_list_link\">" .
get_vocab('user_list') . "</a>\n" ;
- }
+ if ($auth['type'] == 'db')
+ {
+ print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
+ }
// Retrieve logout link from configuration, if specified
if (isset($auth['remote_user']['logout_link']) &&
diff -r 63bb7e90a300 -r 0445f066667b web/session/session_wordpress.inc
--- a/web/session/session_wordpress.inc Wed Feb 22 17:12:05 2017 +0000
+++ b/web/session/session_wordpress.inc Wed Feb 22 17:30:38 2017 +0000
@@ -125,7 +125,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $user_list_link, $day, $month, $year;
+ global $QUERY_STRING, $auth, $day, $month, $year;
$target_url = this_page();
if (isset($url_base) && ($url_base !== ''))
@@ -174,9 +174,9 @@
</form>
<?php
}
- if (isset($user_list_link))
+ if ($auth['type'] == 'db')
{
- print "<a id=\"user_list_link\" href=\"$user_list_link\">" .
get_vocab('user_list') . "</a>\n";
+ print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
}
}
------------------------------------------------------------------------------
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