You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by "Thomas Vandahl (JIRA)" <ji...@apache.org> on 2011/08/04 13:31:27 UTC

[jira] [Updated] (TRB-82) template file name can't contain "."

     [ https://issues.apache.org/jira/browse/TRB-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl updated TRB-82:
------------------------------

         Priority: Minor  (was: Critical)
    Fix Version/s:     (was: Core 2.3.3)
                   Core 4.0-M2
         Assignee: Thomas Vandahl

> template file name can't contain "."
> ------------------------------------
>
>                 Key: TRB-82
>                 URL: https://issues.apache.org/jira/browse/TRB-82
>             Project: Turbine
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: Core 2.3.3
>            Reporter: kxlzx
>            Assignee: Thomas Vandahl
>            Priority: Minor
>             Fix For: Core 4.0-M2
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> I wan't template file name like "user.money.vm".
> but TurbineTemplateService getExtension function use "indexof()" get the file extension.
> It should be "lastindexof()"....
> can you do it?
> org.apache.turbine.services.template.TurbineTemplateService{
>     public String getExtension(String template)
>     {
>         if (StringUtils.isEmpty(template))
>         {
>             return getDefaultExtension();
>         }
>         //at here ,change to  int dotIndex = template.lastindexOf(EXTENSION_SEPARATOR);
>         int dotIndex = template.indexOf(EXTENSION_SEPARATOR);
>         return (dotIndex < 0) ? getDefaultExtension() : template.substring(dotIndex + 1);
>     }   
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira