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
58217f73
Commit
58217f73
authored
Feb 27, 2015
by
Peter Hough
Browse files
Bug1415183 Adding date/time of a pending friend requests.
Change-Id: Ia2355da8bee087659c068d30e0776c6010daa701
parent
87c4ad2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/lang/en.utf8/group.php
View file @
58217f73
...
...
@@ -286,6 +286,7 @@ $string['whymakemeyourfriend'] = 'This is why you should make me your friend:';
$string
[
'approverequest'
]
=
'Approve request'
;
$string
[
'denyrequest'
]
=
'Deny request'
;
$string
[
'pending'
]
=
'pending'
;
$string
[
'pendingsince'
]
=
'pending since %s'
;
$string
[
'trysearchingforfriends'
]
=
'Try %ssearching for new friends%s to grow your network.'
;
$string
[
'nobodyawaitsfriendapproval'
]
=
'Nobody is awaiting your approval to become your friend.'
;
$string
[
'sendfriendrequest'
]
=
'Send friend request'
;
...
...
htdocs/lib/user.php
View file @
58217f73
...
...
@@ -1811,6 +1811,7 @@ function get_users_data($userids, $getviews=true) {
$sql
=
'SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
u.profileicon, u.email, u.urlid,
fp.requester AS pending,
fp.ctime AS pending_time,
ap.value AS hidenamepref,
COALESCE((SELECT ap.value FROM {usr_account_preference} ap WHERE ap.usr = u.id AND ap.field = \'messages\'), \'allow\') AS messages,
COALESCE((SELECT ap.value FROM {usr_account_preference} ap WHERE ap.usr = u.id AND ap.field = \'friendscontrol\'), \'auth\') AS friendscontrol,
...
...
@@ -1829,6 +1830,7 @@ function get_users_data($userids, $getviews=true) {
$institutionstrings
=
get_institution_strings_for_users
(
$userids
);
foreach
(
$data
as
&
$record
)
{
$record
->
pending_time
=
format_date
(
strtotime
(
$record
->
pending_time
),
'strftimedaydate'
);
$record
->
messages
=
(
$record
->
messages
==
'allow'
||
$record
->
friend
&&
$record
->
messages
==
'friends'
||
$USER
->
get
(
'admin'
))
?
1
:
0
;
if
(
isset
(
$institutionstrings
[
$record
->
id
]))
{
$record
->
institutions
=
$institutionstrings
[
$record
->
id
];
...
...
htdocs/theme/raw/templates/user/user.tpl
View file @
58217f73
...
...
@@ -7,7 +7,7 @@
<div
class=
"rightdiv"
>
<h3
class=
"title"
><a
href=
"
{
profile_url
(
$user
)
}
"
>
{
$user
->
display_name
}
</a>
{
if
$user
->
pending
}
<span
class=
"pendingfriend"
>
-
{
str
tag
=
'pending'
section
=
'group'
}
</span>
<span
class=
"pendingfriend"
>
-
{
str
tag
=
'pending
since
'
section
=
'group'
arg1
=
$user
->
pending_time
}
</span>
{
elseif
$user
->
friend
&&
$page
==
'find'
}
<span
class=
"existingfriend"
>
-
{
str
tag
=
'existingfriend'
section
=
'group'
}
</span>
{/
if
}
...
...
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