Switch to Smarty 3

11 views
Skip to first unread message

Tom Leese

unread,
Nov 19, 2014, 1:37:41 PM11/19/14
to srobo...@googlegroups.com
Hi all,

The various patches which update srweb to use Smarty 3 have gone live as a
result of the doing activity today. The website itself is also now running on
Smarty 3 since Apache was restarted a few moments ago.

Anyone who has their own Apache instances to test srweb will need to be aware
of this change. You will need to install Smart 3 and change the srweb
configuration file to point to the correct location.

Anyone who has a Badger/Saffron clone should make sure to apply puppet and
everything should just work.

Tom

Rob Spanton

unread,
Nov 19, 2014, 8:11:06 PM11/19/14
to srobo...@googlegroups.com
On Wed, 2014-11-19 at 18:37 +0000, Tom Leese wrote:
> The various patches which update srweb to use Smarty 3 have gone live as a
> result of the doing activity today. The website itself is also now running on
> Smarty 3 since Apache was restarted a few moments ago.

Excellent! Good to see that my patch from April 2013 finally got
merged!

R
signature.asc

Peter Law

unread,
Nov 21, 2014, 6:26:09 PM11/21/14
to Student Robotics
Tom wrote:
> The various patches which update srweb to use Smarty 3 have gone live as a
> result of the doing activity today. The website itself is also now running on
> Smarty 3 since Apache was restarted a few moments ago.
>
> Anyone who has their own Apache instances to test srweb will need to be aware
> of this change. You will need to install Smart 3 and change the srweb
> configuration file to point to the correct location.

It should be noted that there will, for a while, be some patches which
are still based on the older Smarty 2. Just as Smarty 3 is not
compatible with v2 (at least in the configuration we've deployed), v2
is not compatible with v3.

As a result, users may need to keep both versions around for the
moment. Thankfully some git history magic can be done to automatically
pick up the right one. For example, I'm now running with this in my
local.config.inc.php:

$__revs_ahead = shell_exec("git rev-list 1e38e1c7c38a902fd2..HEAD | wc -l");
if ($__revs_ahead == 0) {
define('SMARTY_DIR', '/home/peter/public_html/sr/Smarty-2.6.28/libs/');
} else {
define('SMARTY_DIR', '/usr/share/php/smarty3/');
}

Yes, it's a massive hack, but hopefully it can go away shortly anyway.

Peter

Andrew Cottrell

unread,
Nov 21, 2014, 6:48:14 PM11/21/14
to Student Robotics
Hi Peter

If Saffron is now life on Smarty 3, why would we want to test things against smarty 2?

Cheers,
Andy

--
You received this message because you are subscribed to the Google Groups "Student Robotics Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to srobo-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Law

unread,
Nov 21, 2014, 6:55:03 PM11/21/14
to Student Robotics
Andy wrote:
> If Saffron is now life on Smarty 3, why would we want to test things against
> smarty 2?

We probably don't want to use it for proper validation, but it's
useful to ensure that a patch has rebased properly. I also expect
there are a number of older branches which contain useful things that
this could be useful for.

P
>> email to srobo-devel...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Student Robotics Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to srobo-devel...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages