nrueckmann / smarty-php

Automatically exported from code.google.com/p/smarty-php
0 stars 0 forks source link

Custom resources: can't use symbols in uppercase #183

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've implemented custom resource, call it like this:
$smarty->fetch('module:shop/public/paymentSubmit.html')

On first page render (template compilation) it works fine. But after reloading 
it's not working (I check for file existence in particular directory).

Compilated source:
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '6f84e02249d72845fff5c8795e57d8bb6c4e5945' => 
    array (
      0 => 'module:shop/public/paymentsubmit.html',
      1 => 1395831278,
      2 => 'module',
    ),
  ),
Notice that paymentsubmit.html becomes lowercase.

Culpit is Smarty_Resource_Custom:populate 
$source->filepath = strtolower($source->type . ':' . $source->name);

To fix it just remove strtolower, it's not neccesary to do that at all, it only 
cause problems.

Original issue reported on code.google.com by var...@gmail.com on 26 Mar 2014 at 11:22

GoogleCodeExporter commented 8 years ago
This has been now fixed in the SVN trunk and will later be included in 3.1.18

Original comment by Uwe.Tews@googlemail.com on 26 Mar 2014 at 8:33