Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
23bd7b4a
Commit
23bd7b4a
authored
Feb 07, 2008
by
Clare Lenihan
Committed by
Clare Lenihan
Feb 07, 2008
Browse files
changing friend control sideblock to return to find or myfriends as appropriate
parent
eb7cb737
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/user.php
View file @
23bd7b4a
...
...
@@ -919,7 +919,7 @@ function get_users_data($userlist) {
return
$ordereddata
;
}
function
friends_control_sideblock
()
{
function
friends_control_sideblock
(
$returnto
=
'myfriends'
)
{
global
$USER
;
$form
=
array
(
'name'
=>
'friendscontrol'
,
...
...
@@ -944,6 +944,10 @@ function friends_control_sideblock() {
'type'
=>
'submit'
,
'value'
=>
get_string
(
'save'
)
),
'returnto'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$returnto
)
)
);
// Make a sideblock to put the friendscontrol block in
...
...
@@ -958,7 +962,7 @@ function friendscontrol_submit(Pieform $form, $values) {
global
$USER
,
$SESSION
;
$USER
->
set_account_preference
(
'friendscontrol'
,
$values
[
'friendscontrol'
]);
$SESSION
->
add_ok_msg
(
get_string
(
'updatedfriendcontrolsetting'
,
'account'
));
redirect
(
'/user/myfriends.php'
);
redirect
(
$values
[
'returnto'
]
==
'find'
?
'/user/find.php'
:
'/user/myfriends.php'
);
}
function
acceptfriend_submit
(
Pieform
$form
,
$values
)
{
...
...
htdocs/user/find.php
View file @
23bd7b4a
...
...
@@ -67,7 +67,7 @@ $pagination = build_pagination(array(
'resultcounttextplural'
=>
get_string
(
'users'
,
'group'
),
));
$smarty
=
smarty
(
array
(),
array
(),
array
(),
array
(
'sideblocks'
=>
array
(
friends_control_sideblock
())));
$smarty
=
smarty
(
array
(),
array
(),
array
(),
array
(
'sideblocks'
=>
array
(
friends_control_sideblock
(
'find'
))));
$smarty
->
assign
(
'heading'
,
TITLE
);
$smarty
->
assign
(
'users'
,
$data
[
'data'
]);
$smarty
->
assign
(
'form'
,
$searchform
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment