Commit 5c684362 authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon

Strip out unnecessary $form and $element. Bug 1427027

Change-Id: I07615cbbee5914b2affb5b26edc69d64539f6a2c
parent 0e091386
......@@ -57,8 +57,10 @@ class EmbeddedImage {
if ($foundmatch) {
foreach ($matches[1] as $imgid) {
$file = artefact_instance_from_id($imgid);
if (!($file instanceof ArtefactTypeImage) || !$USER->can_publish_artefact($file)) {
return $form->i18n('rule', 'wysiwygimagerights', 'wysiwygimagerights', $element);
if (!($file instanceof ArtefactTypeImage)
|| !$USER->can_publish_artefact($file)
) {
return $fieldvalue;
}
else {
$publicimages[] = $imgid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment