/** * get content style path * * static (to avoid full reading) */ function getContentStylePath($a_style_id) { global $ilias; $rand = rand(1, 999999); // check global fixed content style $fixed_style = $ilias->getSetting("fixed_content_style_id"); if ($fixed_style > 0) { $a_style_id = $fixed_style; } // check global default style if ($a_style_id <= 0) { $a_style_id = $ilias->getSetting("default_content_style_id"); } if ($a_style_id > 0 && ilObject::_exists($a_style_id)) { // check whether file is up to date if (!ilObjStyleSheet::_lookupUpToDate($a_style_id)) { $style = new ilObjStyleSheet($a_style_id); $style->writeCSSFile(); } return ilUtil::getWebspaceDir("output") . "/css/style_" . $a_style_id . ".css?dummy={$rand}"; } else { return "./Services/COPage/css/content.css"; } }