From 26b2d9a02b92a5c65c6f1041a55bff45f579ac37 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Fri, 11 Jul 2008 19:06:49 +0200 Subject: [PATCH] Hum, I should have test before pushing. Signed-off-by: Florent Bruneau --- include/common.inc.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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: -- 2.1.4