Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
590c4aa7
Commit
590c4aa7
authored
12 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
search display name instead of uid; fix key/value order for array access
parent
c00b66fe
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/ajax/share.php
+1
-1
1 addition, 1 deletion
core/ajax/share.php
lib/user/database.php
+1
-1
1 addition, 1 deletion
lib/user/database.php
with
2 additions
and
2 deletions
core/ajax/share.php
+
1
−
1
View file @
590c4aa7
...
...
@@ -164,7 +164,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
$users
=
OC_User
::
getDisplayNames
(
$_GET
[
'search'
],
$limit
,
$offset
);
}
$offset
+=
$limit
;
foreach
(
$users
as
$displayName
=>
$uid
)
{
foreach
(
$users
as
$uid
=>
$displayName
)
{
if
((
!
isset
(
$_GET
[
'itemShares'
])
||
!
is_array
(
$_GET
[
'itemShares'
][
OCP\Share
::
SHARE_TYPE_USER
])
||
!
in_array
(
$uid
,
$_GET
[
'itemShares'
][
OCP\Share
::
SHARE_TYPE_USER
]))
&&
$uid
!=
OC_User
::
getUser
())
{
$shareWith
[]
=
array
(
'label'
=>
$displayName
,
'value'
=>
array
(
'shareType'
=>
OCP\Share
::
SHARE_TYPE_USER
,
'shareWith'
=>
$uid
));
$count
++
;
...
...
This diff is collapsed.
Click to expand it.
lib/user/database.php
+
1
−
1
View file @
590c4aa7
...
...
@@ -155,7 +155,7 @@ class OC_User_Database extends OC_User_Backend {
*/
public
function
getDisplayNames
(
$search
=
''
,
$limit
=
null
,
$offset
=
null
)
{
$displayNames
=
array
();
$query
=
OC_DB
::
prepare
(
'SELECT `uid`, `displayname` FROM `*PREFIX*users` WHERE LOWER(`
uid
`) LIKE LOWER(?)'
,
$limit
,
$offset
);
$query
=
OC_DB
::
prepare
(
'SELECT `uid`, `displayname` FROM `*PREFIX*users` WHERE LOWER(`
displayname
`) LIKE LOWER(?)'
,
$limit
,
$offset
);
$result
=
$query
->
execute
(
array
(
$search
.
'%'
));
$users
=
array
();
while
(
$row
=
$result
->
fetchRow
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment