Allow parenthesis before hasPerm in smarty templates
authorNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Mon, 26 May 2014 21:14:00 +0000 (23:14 +0200)
committerNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Sun, 1 Jun 2014 19:27:29 +0000 (21:27 +0200)
commitad274e6db6423a279524c0c8120db041720c4177
tree6fa1828099ee660e243f59a224cfed9285b3b899
parentc16ab9ce3537fad8a05ecba1cdb25268440aec29
Allow parenthesis before hasPerm in smarty templates

In smarty templates, this syntax works fine:

    {if !hasPerm('directory_private') && other_test() }

... but not this one:

    {if (!hasPerm('directory_private') || test1()) && test2()}

... because the regexp which handle hasPerm "function" in smarty does
not support parenthesis.

Fix this bug by explicitly allowing space and open parenthesis before
hasPerm().
ChangeLog
classes/plpage.php