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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
external-users-joomla.php
qa-include/util/external-users-joomla.php
+4
-4
qa-joomla-helper.php
qa-include/util/qa-joomla-helper.php
+7
-7
No files found.
qa-include/util/external-users-joomla.php
View file @
c59dc181
...
...
@@ -70,12 +70,12 @@ function qa_get_logged_in_user()
$teamGroup
=
$jhelper
->
trigger_team_group_event
(
$user
);
return
[
return
array
(
'userid'
=>
$user
->
id
,
'publicusername'
=>
$user
->
name
.
(
$teamGroup
?
" (
{
$teamGroup
}
)"
:
''
),
'email'
=>
$user
->
email
,
'level'
=>
$level
,
]
;
)
;
}
return
null
;
...
...
@@ -95,7 +95,7 @@ function qa_get_user_email($userid)
function
qa_get_userids_from_public
(
$publicusernames
)
{
$output
=
[]
;
$output
=
array
()
;
if
(
count
(
$publicusernames
))
{
$jhelper
=
new
qa_joomla_helper
();
foreach
(
$publicusernames
as
$username
)
{
...
...
@@ -107,7 +107,7 @@ function qa_get_userids_from_public($publicusernames)
function
qa_get_public_from_userids
(
$userids
)
{
$output
=
[]
;
$output
=
array
()
;
if
(
count
(
$userids
))
{
$jhelper
=
new
qa_joomla_helper
();
foreach
(
$userids
as
$userID
)
{
...
...
qa-include/util/qa-joomla-helper.php
View file @
c59dc181
...
...
@@ -33,7 +33,7 @@ class qa_joomla_helper {
$this
->
load_joomla_app
();
}
/*
/*
* If your Q2A installation is in a subfolder of your Joomla, then this file should be in joomla-root/qa-root/qa-include/util/
* We can use this info to track back up the tree to find the Joomla root.
* If your Q2A installation is in a different folder structure, then you should define JOOMLA_PATH_BASE manually in your qa-config file.
...
...
@@ -74,26 +74,26 @@ class qa_joomla_helper {
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
)
{
return
$this
->
trigger_joomla_event
(
'onTeamGroup'
,
[
$user
]
);
return
$this
->
trigger_joomla_event
(
'onTeamGroup'
,
array
(
$user
)
);
}
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
)
{
return
$this
->
trigger_joomla_event
(
'onGetAvatar'
,
[
$userid
,
$size
]
);
return
$this
->
trigger_joomla_event
(
'onGetAvatar'
,
array
(
$userid
,
$size
)
);
}
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'
);
$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