protected function doUpdate() { global $ilDB; if ($this->getId()) { $fields = $this->propertiesToDB(); $ilDB->update("il_poll", $fields, array("id" => array("integer", $this->getId()))); // #14661 include_once "./Services/Notes/classes/class.ilNote.php"; ilNote::activateComments($this->getId(), 0, $this->getType(), $this->getShowComments()); if ($this->ref_id) { $activation = new ilObjectActivation(); $activation->setTimingType($this->getAccessType()); $activation->setTimingStart($this->getAccessBegin()); $activation->setTimingEnd($this->getAccessEnd()); $activation->toggleVisible($this->getAccessVisibility()); $activation->update($this->ref_id); } } }
/** * create new properties record */ function createProperties() { global $ilDB; $q = "INSERT INTO content_object (id) VALUES (" . $ilDB->quote($this->getId(), "integer") . ")"; $ilDB->manipulate($q); // #14661 include_once "./Services/Notes/classes/class.ilNote.php"; ilNote::activateComments($this->getId(), 0, $this->getType(), true); $this->readProperties(); // to get db default values }
protected function doUpdate() { global $ilDB; if ($this->id) { $ilDB->manipulate("UPDATE il_blog" . " SET ppic = " . $ilDB->quote($this->hasProfilePicture(), "integer") . ",bg_color = " . $ilDB->quote($this->getBackgroundColor(), "text") . ",font_color = " . $ilDB->quote($this->getFontcolor(), "text") . ",img = " . $ilDB->quote($this->getImage(), "text") . ",rss_active = " . $ilDB->quote($this->hasRSS(), "text") . ",approval = " . $ilDB->quote($this->hasApproval(), "integer") . ",abs_shorten = " . $ilDB->quote($this->hasAbstractShorten(), "integer") . ",abs_shorten_len = " . $ilDB->quote($this->getAbstractShortenLength(), "integer") . ",abs_image = " . $ilDB->quote($this->hasAbstractImage(), "integer") . ",abs_img_width = " . $ilDB->quote($this->getAbstractImageWidth(), "integer") . ",abs_img_height = " . $ilDB->quote($this->getAbstractImageHeight(), "integer") . ",keywords = " . $ilDB->quote($this->hasKeywords(), "integer") . ",authors = " . $ilDB->quote($this->hasAuthors(), "integer") . ",nav_mode = " . $ilDB->quote($this->getNavMode(), "integer") . ",nav_list_post = " . $ilDB->quote($this->getNavModeListPostings(), "integer") . ",nav_list_mon = " . $ilDB->quote($this->getNavModeListMonths(), "integer") . ",ov_post = " . $ilDB->quote($this->getOverviewPostings(), "integer") . ",nav_order = " . $ilDB->quote(implode(";", $this->getOrder()), "text") . " WHERE id = " . $ilDB->quote($this->id, "integer")); // #14661 include_once "./Services/Notes/classes/class.ilNote.php"; ilNote::activateComments($this->id, 0, "blog", $this->getNotesStatus()); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; ilObjStyleSheet::writeStyleUsage($this->id, $this->getStyleSheetId()); } }
/** * Deactivate Comments */ function deactivateComments() { global $ilCtrl; $notes_settings = new ilSetting("notes"); if ($this->comments_settings) { $id = $this->rep_obj_id . "_" . $this->obj_id . "_" . $this->obj_type; //$notes_settings->set("activate_".$id, 0); ilNote::activateComments($this->rep_obj_id, $this->obj_id, $this->obj_type, false); } $ilCtrl->redirectByClass("ilnotegui", "showNotes", "", $this->ajax); //$ilCtrl->redirectByClass("ilnotegui", "getNotesHtml", "", $this->ajax); }
protected function doUpdate() { global $ilDB; $fields = array("is_online" => array("integer", $this->isOnline()), "ppic" => array("integer", $this->hasProfilePicture()), "bg_color" => array("text", $this->getBackgroundColor()), "font_color" => array("text", $this->getFontcolor()), "img" => array("text", $this->getImage())); $this->doUpdateCustom($fields); // #14661 include_once "./Services/Notes/classes/class.ilNote.php"; ilNote::activateComments($this->id, 0, $this->getType(), $this->hasPublicComments()); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; ilObjStyleSheet::writeStyleUsage($this->id, $this->getStyleSheetId()); $ilDB->update("usr_portfolio", $fields, array("id" => array("integer", $this->id))); }