function getLinkCtrl($title = "", $absolute = FALSE) { $_S =& new AppSettings(); if ($_S->permaLinksEnabled()) { if (!$title) { $title = $this->getTitle(FALSE); } $permaLink = "{$this->id}_" . preg_replace("[\\W]", "_", strtolower($title)); if (!$_S->ommitCatPermaLink) { $catPermaLink = $this->getCatPermaLink(); $permaLink = "{$catPermaLink}/{$permaLink}"; } $ctrl = new AppController(); $ctrl->setPermaLink($permaLink); } else { $ctrl =& new AppController($this->get_class() . "/{$this->id}"); } $ctrl->setAbsolute($absolute); return $ctrl; }
function getLinkCtrl($absolute = FALSE) { $_S =& new AppSettings(); if ($_S->permaLinksEnabled()) { $ctrl = new AppController(); $ctrl->setPermaLink($this->permaLink); } else { $ctrl = new AppController("cat/list/{$this->id}"); } $ctrl->setAbsolute($absolute); return $ctrl; }