Ejemplo n.º 1
0
 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
 {
     $res = array();
     // postings
     include_once "./Modules/Blog/classes/class.ilBlogPosting.php";
     $pg_ids = array();
     foreach ($a_ids as $id) {
         $pages = ilBlogPosting::getAllPostings($id);
         foreach (array_keys($pages) as $p) {
             $pg_ids[] = "blp:" . $p;
         }
     }
     if (sizeof($pg_ids)) {
         $res[] = array("component" => "Services/COPage", "entity" => "pg", "ids" => $pg_ids);
     }
     // style
     $style_ids = array();
     foreach ($a_ids as $id) {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $style_id = ilObjStyleSheet::lookupObjectStyle($id);
         if ($style_id > 0) {
             $style_ids[] = $style_id;
         }
     }
     if (sizeof($style_ids)) {
         $res[] = array("component" => "Services/Style", "entity" => "sty", "ids" => $style_ids);
     }
     return $res;
 }
Ejemplo n.º 2
0
 protected function doRead()
 {
     global $ilDB;
     $set = $ilDB->query("SELECT * FROM il_blog" . " WHERE id = " . $ilDB->quote($this->id, "integer"));
     $row = $ilDB->fetchAssoc($set);
     $this->setNotesStatus((bool) $row["notes"]);
     $this->setProfilePicture((bool) $row["ppic"]);
     $this->setBackgroundColor($row["bg_color"]);
     $this->setFontColor($row["font_color"]);
     $this->setImage($row["img"]);
     $this->setRSS($row["rss_active"]);
     $this->setApproval($row["approval"]);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->id));
 }
Ejemplo n.º 3
0
 /**
  * read data of content object
  */
 function read()
 {
     global $ilDB;
     parent::read();
     #		echo "Glossary<br>\n";
     $q = "SELECT * FROM glossary WHERE id = " . $ilDB->quote($this->getId(), "integer");
     $gl_set = $ilDB->query($q);
     $gl_rec = $ilDB->fetchAssoc($gl_set);
     $this->setOnline(ilUtil::yn2tf($gl_rec["is_online"]));
     $this->setVirtualMode($gl_rec["virtual"]);
     $this->setPublicExportFile("xml", $gl_rec["public_xml_file"]);
     $this->setPublicExportFile("html", $gl_rec["public_html_file"]);
     $this->setActiveGlossaryMenu(ilUtil::yn2tf($gl_rec["glo_menu_active"]));
     $this->setActiveDownloads(ilUtil::yn2tf($gl_rec["downloads_active"]));
     $this->setPresentationMode($gl_rec["pres_mode"]);
     $this->setSnippetLength($gl_rec["snippet_length"]);
     $this->setShowTaxonomy($gl_rec["show_tax"]);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->setStyleSheetId((int) ilObjStyleSheet::lookupObjectStyle($this->getId()));
 }
 protected function doRead()
 {
     global $ilDB;
     $set = $ilDB->query("SELECT * FROM usr_portfolio" . " WHERE id = " . $ilDB->quote($this->id, "integer"));
     $row = $ilDB->fetchAssoc($set);
     $this->setOnline((bool) $row["is_online"]);
     $this->setPublicComments((bool) $row["comments"]);
     $this->setProfilePicture((bool) $row["ppic"]);
     $this->setBackgroundColor($row["bg_color"]);
     $this->setFontColor($row["font_color"]);
     $this->setImage($row["img"]);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->id));
     $this->doReadCustom($row);
 }
 protected function afterSave(ilObject $a_new_object)
 {
     global $ilUser, $tree;
     // add default translation
     $a_new_object->addTranslation($a_new_object->getTitle(), $a_new_object->getDescription(), $ilUser->getPref("language"), true);
     // default: sort by title
     include_once 'Services/Container/classes/class.ilContainerSortingSettings.php';
     $settings = new ilContainerSortingSettings($a_new_object->getId());
     $settings->setSortMode(ilContainer::SORT_TITLE);
     $settings->save();
     // inherit parents content style, if not individual
     $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
     $parent_id = ilObject::_lookupObjId($parent_ref_id);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
     if ($style_id > 0) {
         if (ilObjStyleSheet::_lookupStandard($style_id)) {
             ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
         }
     }
     // always send a message
     ilUtil::sendSuccess($this->lng->txt("cat_added"), true);
     $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
     $this->redirectToRefId($a_new_object->getRefId(), "");
 }
Ejemplo n.º 6
0
 /**
  * Get xml record
  *
  * @param
  * @return
  */
 function getXmlRecord($a_entity, $a_version, $a_set)
 {
     if ($a_entity == "blog") {
         include_once "./Modules/Blog/classes/class.ilObjBlog.php";
         $dir = ilObjBlog::initStorage($a_set["Id"]);
         $a_set["Dir"] = $dir;
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $a_set["Style"] = ilObjStyleSheet::lookupObjectStyle($a_set["Id"]);
         // #14734
         include_once "./Services/Notes/classes/class.ilNote.php";
         $a_set["Notes"] = ilNote::commentsActivated($a_set["Id"], 0, "blog");
     }
     return $a_set;
 }
Ejemplo n.º 7
0
 /**
  * read
  *
  * @access public
  * @param
  * @return
  */
 public function read()
 {
     parent::read();
     include_once "./Services/Container/classes/class.ilContainerSortingSettings.php";
     $this->setOrderType(ilContainerSortingSettings::_lookupSortMode($this->getId()));
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->setStyleSheetId((int) ilObjStyleSheet::lookupObjectStyle($this->getId()));
 }
Ejemplo n.º 8
0
 /**
  * Read wiki data
  */
 function read()
 {
     global $ilDB;
     parent::read();
     $query = "SELECT * FROM il_wiki_data WHERE id = " . $ilDB->quote($this->getId(), "integer");
     $set = $ilDB->query($query);
     $rec = $ilDB->fetchAssoc($set);
     $this->setOnline($rec["is_online"]);
     $this->setStartPage($rec["startpage"]);
     $this->setShortTitle($rec["short"]);
     $this->setRatingOverall($rec["rating_overall"]);
     $this->setRating($rec["rating"]);
     $this->setRatingAsBlock($rec["rating_side"]);
     $this->setRatingForNewPages($rec["rating_new"]);
     $this->setRatingCategories($rec["rating_ext"]);
     $this->setPublicNotes($rec["public_notes"]);
     $this->setIntroduction($rec["introduction"]);
     $this->setImportantPages($rec["imp_pages"]);
     $this->setPageToc($rec["page_toc"]);
     $this->setEmptyPageTemplate($rec["empty_page_templ"]);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->setStyleSheetId((int) ilObjStyleSheet::lookupObjectStyle($this->getId()));
 }
Ejemplo n.º 9
0
 protected function doRead()
 {
     global $ilDB;
     $set = $ilDB->query("SELECT * FROM il_blog" . " WHERE id = " . $ilDB->quote($this->id, "integer"));
     $row = $ilDB->fetchAssoc($set);
     $this->setProfilePicture((bool) $row["ppic"]);
     $this->setBackgroundColor($row["bg_color"]);
     $this->setFontColor($row["font_color"]);
     $this->setImage($row["img"]);
     $this->setRSS($row["rss_active"]);
     $this->setApproval($row["approval"]);
     $this->setAbstractShorten($row["abs_shorten"]);
     $this->setAbstractShortenLength($row["abs_shorten_len"]);
     $this->setAbstractImage($row["abs_image"]);
     $this->setAbstractImageWidth($row["abs_img_width"]);
     $this->setAbstractImageHeight($row["abs_img_height"]);
     $this->setKeywords($row["keywords"]);
     $this->setAuthors($row["authors"]);
     $this->setNavMode($row["nav_mode"]);
     $this->setNavModeListPostings($row["nav_list_post"]);
     $this->setNavModeListMonths($row["nav_list_mon"]);
     $this->setOverviewPostings($row["ov_post"]);
     if (trim($row["nav_order"])) {
         $this->setOrder(explode(";", $row["nav_order"]));
     }
     // #14661
     include_once "./Services/Notes/classes/class.ilNote.php";
     $this->setNotesStatus(ilNote::commentsActivated($this->id, 0, "blog"));
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->id));
 }