瀏覽代碼

Problème lcliip

feature/export_comptable
Guillaume 4 年之前
父節點
當前提交
37c0bfddb2
共有 1 個檔案被更改,包括 6 行新增8 行删除
  1. +6
    -8
      ShopBundle/Twig/FrontendTwigExtension.php

+ 6
- 8
ShopBundle/Twig/FrontendTwigExtension.php 查看文件

@@ -67,23 +67,21 @@ class FrontendTwigExtension extends AbstractExtension

public function lcLiip($path, $thumb = 'tile', $default = 'default.jpg')
{
die('a') ;
if (substr($path, 0, 1) === '/') $path = substr($path, 1);

if ($path) {
$fileManagerFolder = substr($this->getFileManagerFolder(), 1);
$fileManagerFolder = substr($this->getFileManagerFolder(), 1) ;

if (strpos($path, $fileManagerFolder) === false) {
$path = $fileManagerFolder . '/' . $path;
}
//dump(file_exists($path));
if (file_exists($path)) {
return $this->liipCacheHelper->getBrowserPath($path, $thumb);
}

}

return $this->liipCacheHelper->getBrowserPath($this->getFileManagerFolder() . '/' . $default, $thumb);
return $this->liipCacheHelper->getBrowserPath($path, $thumb);
} else {

return $this->liipCacheHelper->getBrowserPath($this->getFileManagerFolder() . '/' . $default, $thumb);
}
}

/**

Loading…
取消
儲存