We should probably see if we can eliminate eval all together however
replacing eval with create_function is probably not a good idea as
create_function has significant performance issues on all but the
latest versions of PHP.
>> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>
> --
> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
>>> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> For more options, visit this group at
>>> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
>> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
>> To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Joomla! CMS Development" group.
>>>> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Joomla! CMS Development" group.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msg/joomla-dev-cms/-/vs5TVzDxJxAJ.
>>
>> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>
> --
> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-dev-cms@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/HovsxKAyUtwJ.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
Yes you often want to count multiple positions when making a collapse decision.
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/-J2bk0YR4i0J.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
Whilst it would be possible to shift the expression evaluation out of countModules and put in the template PHP code, this would be an API change that would break backwards compatibility for all templates that make use of it. Although I would be quite comfortable making such a change, I think that many, many template "users" are not PHP coders and might well struggle.
My preferred approach would be to write some PHP code to exactly replace the functionality currently provided by the eval call. The behaviour of countModules is well-specified here: http://docs.joomla.org/Operators_for_use_with_the_countModules_function so a first step would be to write unit tests that cover that specification. Then you will have the tests available to ensure that whatever new code is used to replace the eval, it will be 100% backwards compatible and templates would not need to be changed.
Chris.
On 21 June 2012 19:20, Rouven Weßling <m...@rouvenwessling.de> wrote:
create_function isn't much better than eval, many hosts disable that one as well.
The check for only one parameter would be nice thou, that should eliminate the need for eval on most sites.
Rouven
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.