public static function can_do_advanced() { if (self::$_can_do_advanced < 0) { $filemod = cms_utils::get_module('FileManager'); $config = cmsms()->GetConfig(); if (startswith($config['uploads_path'], $config['root_path']) && $filemod->AdvancedAccessAllowed()) { self::$_can_do_advanced = 1; } else { self::$_can_do_advanced = 0; } } return self::$_can_do_advanced; }