From: Florent Bruneau Date: Fri, 11 Jul 2008 17:06:49 +0000 (+0200) Subject: Hum, I should have test before pushing. X-Git-Tag: xorg/0.10.0~175 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=26b2d9a02b92a5c65c6f1041a55bff45f579ac37;p=platal.git Hum, I should have test before pushing. Signed-off-by: Florent Bruneau --- diff --git a/include/common.inc.php b/include/common.inc.php index 3b6932e..35296b4 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -19,11 +19,20 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -function smarty_function_xsrf_token_field($params, &$smarty) { - if (S::has('xsrf_token')) { - return '
'; +function __autoload($cls) +{ + if (!pl_autoload($cls)) { + $cls = strtolower($cls); + if (substr($cls, -3, 3) == 'req') { + @include 'validations.inc.php'; + return; + } else if (substr($cls, 0, 6) == 'banana') { + require_once 'banana/banana.inc.php'; + Banana::load(substr($cls, 6)); + return; + } + @include "$cls.inc.php"; } - return ''; } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: