Skip to content
GitLab
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
29709b46
Commit
29709b46
authored
Jan 03, 2007
by
Penny Leach
Browse files
randomdata now also adds community memeber request and invites.
skips adding the community owner too
parent
e5a37436
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/lib/Mahara/RandomData.pm
View file @
29709b46
...
...
@@ -235,11 +235,22 @@ sub insert_random_communities {
$members
->
{
$existing_users
->
{((
keys
%$existing_users
)[
int
(
rand
(
keys
%$existing_users
))])}{
id
}}
=
1
;
}
foreach
my
$id
(
keys
%$members
)
{
next
if
$id
==
$user_id
;
$self
->
{
dbh
}
->
do
(
'
INSERT INTO
'
.
$prefix
.
'
community_member (community,member,ctime) VALUES (currval(
\'
'
.
$prefix
.
'
community_id_seq
\'
),?,current_timestamp)
',
undef
,
$id
,
);
$self
->
{
dbh
}
->
do
(
'
INSERT INTO
'
.
$prefix
.
'
community_member_invite (community,member,ctime) VALUES (currval(
\'
'
.
$prefix
.
'
community_id_seq
\'
),?,current_timestamp)
',
undef
,
$id
,
);
$self
->
{
dbh
}
->
do
(
'
INSERT INTO
'
.
$prefix
.
'
community_member_request (community,member,ctime) VALUES (currval(
\'
'
.
$prefix
.
'
community_id_seq
\'
),?,current_timestamp)
',
undef
,
$id
,
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment