Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
08c94fc3
authored
2011-05-18 20:26:42 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merging json user find search into cbv live (244:245)
1 parent
7e549b89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
lib/UserSearch.php
lib/UserSearch.php
View file @
08c94fc
...
...
@@ -179,7 +179,11 @@ class UserSearch implements ArrayAccess, Iterator, Countable {
}
list
(
$user_id
,
$user_string
)
=
mysql_fetch_row
(
$this
->
result
);
$data
=
array_merge
(
array_map
(
function
()
{
return
''
;
},
array_flip
(
$this
->
fields
)),
json_decode
(
$user_string
,
true
));
$json_data
=
json_decode
(
$user_string
,
true
);
if
(
json_last_error
()
!=
JSON_ERROR_NONE
)
{
return
false
;
}
$data
=
array_merge
(
array_map
(
function
()
{
return
''
;
},
array_flip
(
$this
->
fields
)),
$json_data
);
foreach
(
$data
as
$key
=>
&
$val
)
{
$val
=
maybe_unserialize
(
$val
);
}
...
...
Please
register
or
sign in
to post a comment