Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
c59dc181
Commit
c59dc181
authored
Apr 11, 2016
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use old array syntax
parent
1a6bd589
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
external-users-joomla.php
qa-include/util/external-users-joomla.php
+4
-4
qa-joomla-helper.php
qa-include/util/qa-joomla-helper.php
+6
-6
No files found.
qa-include/util/external-users-joomla.php
View file @
c59dc181
...
@@ -70,12 +70,12 @@ function qa_get_logged_in_user()
...
@@ -70,12 +70,12 @@ function qa_get_logged_in_user()
$teamGroup
=
$jhelper
->
trigger_team_group_event
(
$user
);
$teamGroup
=
$jhelper
->
trigger_team_group_event
(
$user
);
return
[
return
array
(
'userid'
=>
$user
->
id
,
'userid'
=>
$user
->
id
,
'publicusername'
=>
$user
->
name
.
(
$teamGroup
?
" (
{
$teamGroup
}
)"
:
''
),
'publicusername'
=>
$user
->
name
.
(
$teamGroup
?
" (
{
$teamGroup
}
)"
:
''
),
'email'
=>
$user
->
email
,
'email'
=>
$user
->
email
,
'level'
=>
$level
,
'level'
=>
$level
,
]
;
)
;
}
}
return
null
;
return
null
;
...
@@ -95,7 +95,7 @@ function qa_get_user_email($userid)
...
@@ -95,7 +95,7 @@ function qa_get_user_email($userid)
function
qa_get_userids_from_public
(
$publicusernames
)
function
qa_get_userids_from_public
(
$publicusernames
)
{
{
$output
=
[]
;
$output
=
array
()
;
if
(
count
(
$publicusernames
))
{
if
(
count
(
$publicusernames
))
{
$jhelper
=
new
qa_joomla_helper
();
$jhelper
=
new
qa_joomla_helper
();
foreach
(
$publicusernames
as
$username
)
{
foreach
(
$publicusernames
as
$username
)
{
...
@@ -107,7 +107,7 @@ function qa_get_userids_from_public($publicusernames)
...
@@ -107,7 +107,7 @@ function qa_get_userids_from_public($publicusernames)
function
qa_get_public_from_userids
(
$userids
)
function
qa_get_public_from_userids
(
$userids
)
{
{
$output
=
[]
;
$output
=
array
()
;
if
(
count
(
$userids
))
{
if
(
count
(
$userids
))
{
$jhelper
=
new
qa_joomla_helper
();
$jhelper
=
new
qa_joomla_helper
();
foreach
(
$userids
as
$userID
)
{
foreach
(
$userids
as
$userID
)
{
...
...
qa-include/util/qa-joomla-helper.php
View file @
c59dc181
...
@@ -74,26 +74,26 @@ class qa_joomla_helper {
...
@@ -74,26 +74,26 @@ class qa_joomla_helper {
function
trigger_access_event
(
$user
)
function
trigger_access_event
(
$user
)
{
{
return
$this
->
trigger_joomla_event
(
'onQnaAccess'
,
[
$user
]
);
return
$this
->
trigger_joomla_event
(
'onQnaAccess'
,
array
(
$user
)
);
}
}
function
trigger_team_group_event
(
$user
)
function
trigger_team_group_event
(
$user
)
{
{
return
$this
->
trigger_joomla_event
(
'onTeamGroup'
,
[
$user
]
);
return
$this
->
trigger_joomla_event
(
'onTeamGroup'
,
array
(
$user
)
);
}
}
function
trigger_get_urls_event
()
function
trigger_get_urls_event
()
{
{
return
$this
->
trigger_joomla_event
(
'onGetURLs'
,
[]
);
return
$this
->
trigger_joomla_event
(
'onGetURLs'
,
array
()
);
}
}
function
trigger_get_avatar_event
(
$userid
,
$size
)
function
trigger_get_avatar_event
(
$userid
,
$size
)
{
{
return
$this
->
trigger_joomla_event
(
'onGetAvatar'
,
[
$userid
,
$size
]
);
return
$this
->
trigger_joomla_event
(
'onGetAvatar'
,
array
(
$userid
,
$size
)
);
}
}
function
trigger_log_event
(
$userid
,
$action
)
function
trigger_log_event
(
$userid
,
$action
)
{
{
return
$this
->
trigger_joomla_event
(
'onWriteLog'
,
[
$userid
,
$action
]
,
false
);
return
$this
->
trigger_joomla_event
(
'onWriteLog'
,
array
(
$userid
,
$action
)
,
false
);
}
}
private
function
trigger_joomla_event
(
$event
,
$args
=
[]
,
$expectResponse
=
true
)
private
function
trigger_joomla_event
(
$event
,
$args
=
array
()
,
$expectResponse
=
true
)
{
{
JPluginHelper
::
importPlugin
(
'q2a'
);
JPluginHelper
::
importPlugin
(
'q2a'
);
$dispatcher
=
JEventDispatcher
::
getInstance
();
$dispatcher
=
JEventDispatcher
::
getInstance
();
...
...
Write
Preview
Markdown
is supported
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