X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fdirenum.php;h=567f4de1314bac4c22dc3953be246691e691a384;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=138201984eb6b571e7862ba878f2c9e821b22133;hpb=3ac45f10c6b54e4db4bfeb0aeb5eef0f5ee5d1b2;p=platal.git diff --git a/classes/direnum.php b/classes/direnum.php index 1382019..567f4de 100644 --- a/classes/direnum.php +++ b/classes/direnum.php @@ -61,13 +61,14 @@ class DirEnum static private function init($type) { - if (S::has('__DE_' . $type)) { + if (Platal::globals()->cacheEnabled() && S::has('__DE_' . $type)) { self::$enumerations[$type] = S::v('__DE_' . $type); } else { $cls = "DE_" . ucfirst($type); $obj = new $cls(); self::$enumerations[$type] = $obj; - if ($obj->capabilities & DirEnumeration::SAVE_IN_SESSION) { + if (Platal::globals()->cacheEnabled() + && $obj->capabilities & DirEnumeration::SAVE_IN_SESSION) { S::set('__DE_' . $type, $obj); } }