$this->_commonPuma();
}
- protected function _commonPuma(){
+ protected function _commonPuma()
+ {
$this->addJsLib('parsley', 'js/libs/parsley.min.js');
$this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js');
if ($fname !== '') {
$fname = str_replace(' ', '-', $fname);
$wfile = $this->wdir . 'commerce/' . $fname;
+
if (file_exists($wfile)) {
- $fname = 'data/commerce/' . $fname;
+ $s = getimagesize($wfile);
+ $fname = '<img src="data/commerce/' . $fname . '" style="background:white;" data-width="' . $s[0] . '" data-height="' . $s[1] . '" />';
$this->vdir->copy($wfile, $fname);
} else {
$fname = '';
$legend = (string)$child;
$caption = $legend ? '<figcaption>' . $legend . '</figcaption>' : '';
if (file_exists($filepath)) {
- $dim = getimagesize($filepath);
+ $dim = CubeIT_Image::getimagesize($filepath);
} else {
$dim = [0 => 1024, 1 => 10];
}