X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fcommon.inc.php;h=f524ec876075851e38434556b821589ed88d4243;hb=1f58ccb1e75eca08fbd04971d617ea372bc77b5a;hp=3b6932ef98f3da7578bab3ec9e240897fe8d94b1;hpb=2925df1bd6cb08c1f29822019fcb82e59f63f8a3;p=platal.git diff --git a/include/common.inc.php b/include/common.inc.php index 3b6932e..f524ec8 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -1,6 +1,6 @@ '; +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: