editable = USER_GROUP; $this->visible = 1; } /** @see CmsObject::publish() */ //--------------------------------------------- function publish(){ //--------------------------------------------- $out = $this->doPublish(); $query = sprintf("UPDATE bruckm_index SET cache = %s WHERE id = %d OR id = %d", sqlstring($out), sqlnum($this->id), sqlnum($this->parentId)); dbQuery($query); return true; } /** @see CmsObjec::canBePublished() */ //---------------------------------------------- function canBePublished(){ //---------------------------------------------- return true; } /** @see CmsObject::doPublish() */ //---------------------------------------------- function doPublish(){ //---------------------------------------------- if(!$this->parentObj){ $this->parentObj = FlexiconFactory::instanceById($this->parentId); } if(!$this->parentObj->isLoaded()){ $this->parentObj->load(); } $menu = $this->parentObj->getMenu(); if(empty($this->template)){ $this->template = $this->parentObj->getTemplate(); } $t = new Template(TEMPLATE_DIR.$this->template); $content = ""; foreach($this->buildingBlocks as $i=>$block){ $content .= $this->buildingBlocks[$i]->publish(); } $t->setVar("CONTENT", $content); $t = $menu->printMenu($t); $t->setVar("TITLE", $this->toString()); return $t->toString(); } // === ADDITIONAL METHODS ==================================================== // /** sets the page title * @param name page title */ //------------------------------------------- function setName($name){ //------------------------------------------- $this->name = $name; $query = sprintf("UPDATE bruckm_index SET name = %s WHERE id = %d", sqlstring($name), sqlnum($this->id)); dbQuery($query); } }; ?>