Commit 36076e62 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch...

Merge branch 'vselvamuthukumar/fd-Make-sure-each-ImageAttribute-is-set-in-different-session-variables' into 5815-several-imageattribute-on-the-same-page-does-not-work

See issue #5815
parents b80e3b46 cc842a54
No related merge requests found
Showing with 4 additions and 3 deletions
+4 -3
......@@ -354,9 +354,10 @@ class ImageAttribute extends FileAttribute
$id = $this->getHtmlId();
// Just to be sure the image is not cached
srand((double)microtime() * 1000000);
$key = $this->getLdapName().rand(0,10000);
$display = '<img id="'.$id.'_img"'.
($this->disabled ? 'disabled="disabled"' : '').
' src="getbin.php?rand='.rand(0, 10000).'"'.
' src="getbin.php?key='.$key.'"'.
' style="border:1px solid black;"'.
' alt="'.$this->getDescription().'"'.
' title="'.$this->getDescription().'"'.
......@@ -383,9 +384,9 @@ class ImageAttribute extends FileAttribute
);
}
if (($this->getValue() == '') && ($this->placeholder != '')) {
session::set('binary', $this->placeholder);
session::set('binary'.$key, $this->placeholder);
} else {
session::set('binary', $this->getValue());
session::set('binary'.$key, $this->getValue());
}
session::set('binarytype', 'image/'.$this->format);
return $this->renderAcl($display);
......
Supports Markdown
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