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
8dcf8e5e
Commit
8dcf8e5e
authored
Jan 18, 2007
by
Martyn Smith
Committed by
Martyn Smith
Jan 18, 2007
Browse files
Fixed "removing a friend"
parent
7b2c8eb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/contacts/index.json.php
View file @
8dcf8e5e
...
@@ -53,7 +53,7 @@ if ($control) {
...
@@ -53,7 +53,7 @@ if ($control) {
json_reply
(
true
,
$e
->
getMessage
());
json_reply
(
true
,
$e
->
getMessage
());
}
}
$user
=
get_record
(
'usr'
,
'id'
,
$values
[
'id'
]);
$user
=
get_record
(
'usr'
,
'id'
,
$values
[
'id'
]);
friend_submit
(
$values
);
friend_submit
(
null
,
$values
);
exit
;
exit
;
}
}
...
...
htdocs/lib/user.php
View file @
8dcf8e5e
...
@@ -481,7 +481,7 @@ function suspend_user($suspendeduserid, $reason, $suspendinguserid=null) {
...
@@ -481,7 +481,7 @@ function suspend_user($suspendeduserid, $reason, $suspendinguserid=null) {
* handle the add/remove/approve/reject friend form
* handle the add/remove/approve/reject friend form
* @param array $values from pieforms.
* @param array $values from pieforms.
*/
*/
function
friend_submit
(
Pieform
$form
,
$values
)
{
function
friend_submit
(
$form
,
$values
)
{
global
$user
,
$USER
;
global
$user
,
$USER
;
log_debug
(
$values
);
log_debug
(
$values
);
...
@@ -556,7 +556,13 @@ function friend_submit(Pieform $form, $values) {
...
@@ -556,7 +556,13 @@ function friend_submit(Pieform $form, $values) {
break
;
break
;
}
}
activity_occurred
(
'maharamessage'
,
$n
);
activity_occurred
(
'maharamessage'
,
$n
);
$form
->
json_reply
(
PIEFORM_OK
,
get_string
(
'friendform'
.
$values
[
'type'
]
.
'success'
,
'mahara'
,
display_name
(
$user
)));
if
(
$form
instanceof
Pieform
)
{
$form
->
json_reply
(
PIEFORM_OK
,
get_string
(
'friendform'
.
$values
[
'type'
]
.
'success'
,
'mahara'
,
display_name
(
$user
)));
}
else
{
json_reply
(
false
,
get_string
(
'friendform'
.
$values
[
'type'
]
.
'success'
,
'mahara'
,
display_name
(
$user
)));
}
}
}
/**
/**
...
...
Write
Preview
Supports
Markdown
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