Skip to content
GitLab
Menu
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
c97bca23
Commit
c97bca23
authored
Jul 01, 2016
by
Son Nguyen
Committed by
Gerrit Code Review
Jul 01, 2016
Browse files
Merge "Bug 1027739: Allow tagged post blocks to be copied"
parents
20771da7
61ad4da8
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/blocktype/taggedposts/lib.php
View file @
c97bca23
...
...
@@ -493,7 +493,7 @@ EOF;
}
public
static
function
default_copy_type
()
{
return
'
nocopy
'
;
return
'
shallow
'
;
}
/**
...
...
htdocs/blocktype/lib.php
View file @
c97bca23
...
...
@@ -1605,6 +1605,19 @@ class BlockInstance {
$newblock
->
set
(
'configdata'
,
$configdata
);
$newblock
->
commit
();
$viewid
=
$template
->
get
(
'id'
);
$bid
=
get_record
(
'block_instance'
,
'view'
,
$viewid
,
'blocktype'
,
'taggedposts'
);
if
(
$bid
&&
$this
->
id
==
$bid
->
id
)
{
$tagrecords
=
get_records_array
(
'blocktype_taggedposts_tags'
,
'block_instance'
,
$bid
->
id
,
'tagtype desc, tag'
,
'tag, tagtype'
);
$newid
=
$newblock
->
get
(
'id'
);
foreach
(
$tagrecords
as
$k
=>
$v
)
{
$o
=
new
stdClass
();
$o
->
block_instance
=
$newid
;
$o
->
tag
=
$v
->
tag
;
$o
->
tagtype
=
1
;
insert_record
(
'blocktype_taggedposts_tags'
,
$o
);
}
}
return
true
;
}
...
...
Write
Preview
Supports
Markdown
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