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
f310c84a
Commit
f310c84a
authored
Jan 18, 2007
by
Richard Mansfield
Browse files
Merge with
git+ssh://git.catalyst.net.nz/var/git/mahara.git
parents
27dee023
8dcf8e5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/contacts/index.json.php
View file @
f310c84a
...
...
@@ -31,10 +31,10 @@ require(dirname(dirname(__FILE__)) . '/init.php');
json_headers
();
$pending
=
param_boolean
(
'pending'
,
false
);
$pending
=
param_boolean
(
'pending'
);
$limit
=
param_integer
(
'limit'
,
10
);
$offset
=
param_integer
(
'offset'
,
0
);
$control
=
param_boolean
(
'control'
,
false
);
$control
=
param_boolean
(
'control'
);
$prefix
=
get_config
(
'dbprefix'
);
$userid
=
$USER
->
get
(
'id'
);
...
...
@@ -53,7 +53,7 @@ if ($control) {
json_reply
(
true
,
$e
->
getMessage
());
}
$user
=
get_record
(
'usr'
,
'id'
,
$values
[
'id'
]);
friend_submit
(
$values
);
friend_submit
(
null
,
$values
);
exit
;
}
...
...
htdocs/lib/user.php
View file @
f310c84a
...
...
@@ -481,7 +481,7 @@ function suspend_user($suspendeduserid, $reason, $suspendinguserid=null) {
* handle the add/remove/approve/reject friend form
* @param array $values from pieforms.
*/
function
friend_submit
(
Pieform
$form
,
$values
)
{
function
friend_submit
(
$form
,
$values
)
{
global
$user
,
$USER
;
log_debug
(
$values
);
...
...
@@ -556,7 +556,13 @@ function friend_submit(Pieform $form, $values) {
break
;
}
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