Fix class autoloading to find DirEnumeration class.
authorNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Fri, 1 Nov 2013 11:42:44 +0000 (12:42 +0100)
committerNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Sun, 3 Nov 2013 16:11:24 +0000 (17:11 +0100)
Fix following bug:
PHP Fatal error:  Class 'DirEnumeration' not found in /home/web/prod/platal/modules/search.php on line 300, referer: https://www.polytechnique.org/search/adv

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
include/common.inc.php

index d26f8f2..9beca6f 100644 (file)
@@ -31,7 +31,7 @@ function xorg_autoload($cls)
                 || substr($cls, 0, 8) == 'plfilter') {
             xorg_autoload('plfilter');
             return;
-        } else if (substr($cls, 0, 3) == 'de_') {
+        } else if ($cls == 'direnumeration' || substr($cls, 0, 3) == 'de_') {
             xorg_autoload('direnum');
             return;
         } else if ($cls == 'validate' || substr($cls, -3, 3) == 'req'