/** * save style sheet */ function saveObject() { if (!trim($_POST["style_title"])) { $this->ctrl->redirect($this, "create"); } //echo "HH"; exit; $class_name = "ilObjStyleSheet"; require_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $newObj = new ilObjStyleSheet(); $newObj->setTitle("-"); $newObj->create(); $newObj->setTitle(ilUtil::stripSlashes($_POST["style_title"])); $newObj->setDescription(ilUtil::stripSlashes($_POST["style_description"])); $newObj->update(); // assign style to style sheet folder, // if parent is style sheet folder if ($_GET["ref_id"] > 0) { $fold =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]); if ($fold->getType() == "stys") { $fold->addStyle($newObj->getId()); $fold->update(); ilObjStyleSheet::_writeStandard($newObj->getId(), "1"); $this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles"); } } return $newObj->getId(); }