/** * set the IntroText for use on the current page * * @param integer $intro_id The database id of the IntroText to use * @access public * @since 3.5.3 * @return void */ function setIntroText($intro_id) { require_once 'AMP/System/IntroText.inc.php'; if ($intro_id == AMP_CONTENT_INTRO_ID_DEFAULT) { return $this->_setNullIntro(); } $introtext = new AMPSystem_IntroText($this->dbcon, $intro_id); if (!$introtext->hasData()) { return $this->_setNullItem(); } $this->_globalizeIntroVars($introtext); $this->introtext =& $introtext; if ($template = $introtext->getTemplate()) { $this->template_id = $template; } if ($section = $introtext->getSection()) { $this->section_id = $section; $this->_globalizePageVars(); } }
function &getPublicPage($action = 'input') { $empty_value = false; if (!($id = $this->getPublicPageId($action))) { return $empty_value; } require_once 'AMP/System/IntroText.inc.php'; $page = new AMPSystem_IntroText(AMP_Registry::getDbcon(), $id); if (!$page->hasData()) { return false; } return $page; }