Changeset:
39262931e0ea
https://sourceforge.net/p/mrbs/hg-code/ci/39262931e0ea8505ba4092e8af870dbc0c3959e1
Author:
Campbell Morrison <[email protected]>
Date:
Thu Mar 02 12:27:53 2017 +0000
Log message:
Moved generation of user list link out into a function.
diffstat:
web/session/functions_session.inc | 11 +++++++++++
web/session/session_cookie.inc | 7 ++-----
web/session/session_http.inc | 7 ++-----
web/session/session_joomla.inc | 7 ++-----
web/session/session_php.inc | 7 ++-----
web/session/session_remote_user.inc | 5 +----
web/session/session_wordpress.inc | 7 ++-----
7 files changed, 22 insertions(+), 29 deletions(-)
diffs (148 lines):
diff -r d09bdabf670d -r 39262931e0ea web/session/functions_session.inc
--- a/web/session/functions_session.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/functions_session.inc Thu Mar 02 12:27:53 2017 +0000
@@ -108,3 +108,14 @@
echo $html;
}
+
+
+function print_userlist_link()
+{
+ global $auth;
+
+ if ($auth['type'] == 'db')
+ {
+ echo "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
+ }
+}
diff -r d09bdabf670d -r 39262931e0ea web/session/session_cookie.inc
--- a/web/session/session_cookie.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/session_cookie.inc Thu Mar 02 12:27:53 2017 +0000
@@ -259,7 +259,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $auth;
+ global $QUERY_STRING;
$target_url = this_page();
@@ -281,9 +281,6 @@
print_logon_button($target_url);
}
- if ($auth['type'] == 'db')
- {
- print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
- }
+ print_userlist_link();
}
diff -r d09bdabf670d -r 39262931e0ea web/session/session_http.inc
--- a/web/session/session_http.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/session_http.inc Thu Mar 02 12:27:53 2017 +0000
@@ -73,7 +73,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $auth;
+ global $QUERY_STRING;
$target_url = this_page();
@@ -94,9 +94,6 @@
print_logon_button($target_url);
}
- if ($auth['type'] == 'db')
- {
- print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
- }
+ print_userlist_link();
}
diff -r d09bdabf670d -r 39262931e0ea web/session/session_joomla.inc
--- a/web/session/session_joomla.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/session_joomla.inc Thu Mar 02 12:27:53 2017 +0000
@@ -120,7 +120,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $auth;
+ global $QUERY_STRING;
$target_url = this_page();
@@ -142,9 +142,6 @@
print_logon_button($target_url);
}
- if ($auth['type'] == 'db')
- {
- print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
- }
+ print_userlist_link();
}
diff -r d09bdabf670d -r 39262931e0ea web/session/session_php.inc
--- a/web/session/session_php.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/session_php.inc Thu Mar 02 12:27:53 2017 +0000
@@ -190,7 +190,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $auth;
+ global $QUERY_STRING;
$target_url = this_page();
@@ -212,9 +212,6 @@
print_logon_button($target_url);
}
- if ($auth['type'] == 'db')
- {
- print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
- }
+ print_userlist_link();
}
diff -r d09bdabf670d -r 39262931e0ea web/session/session_remote_user.inc
--- a/web/session/session_remote_user.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/session_remote_user.inc Thu Mar 02 12:27:53 2017 +0000
@@ -57,10 +57,7 @@
{
print_report_link($user);
- if ($auth['type'] == 'db')
- {
- print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
- }
+ print_userlist_link();
// Retrieve logout link from configuration, if specified
if (isset($auth['remote_user']['logout_link']) &&
diff -r d09bdabf670d -r 39262931e0ea web/session/session_wordpress.inc
--- a/web/session/session_wordpress.inc Thu Mar 02 12:15:46 2017 +0000
+++ b/web/session/session_wordpress.inc Thu Mar 02 12:27:53 2017 +0000
@@ -126,7 +126,7 @@
// Print the logon entry on the top banner.
function print_logon_box()
{
- global $QUERY_STRING, $auth;
+ global $QUERY_STRING;
$target_url = this_page();
@@ -148,9 +148,6 @@
print_logon_button($target_url);
}
- if ($auth['type'] == 'db')
- {
- print "<a id=\"user_list_link\" href=\"edit_users.php\">" .
get_vocab('user_list') . "</a>\n";
- }
+ print_userlist_link();
}
------------------------------------------------------------------------------
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