diff --git a/include/simpleplugin/attributes/class_FileAttribute.inc b/include/simpleplugin/attributes/class_FileAttribute.inc index a1dfc899fb75955d6beb62f05fdbe24e32b79cc4..8fad4071c3a212ceccdcc02e9e90a46269219dd4 100644 --- a/include/simpleplugin/attributes/class_FileAttribute.inc +++ b/include/simpleplugin/attributes/class_FileAttribute.inc @@ -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);