function start($text, $request) { $this->project = $request->project; $this->request = $request; // Replace like in the issue text $tag = new IDF_Template_IssueComment(); $text = $tag->start($text, $request, false, false, false, false); // Replace [[[path/to/file.mdtext, commit]]] with embedding // the content of the file into the wki page if ($this->request->rights['hasSourceAccess']) { $text = preg_replace_callback('#\\[\\[\\[([^\\,]+)(?:, ([^/]+))?\\]\\]\\]#im', array($this, 'callbackEmbeddedDoc'), $text); } // Replace [[PageName]] with corresponding link to the page. $text = preg_replace_callback('#\\[\\[([A-Za-z0-9\\-]+)\\]\\]#im', array($this, 'callbackWikiPage'), $text); $filter = new IDF_Template_MarkdownPrefilter(); echo $filter->go(Pluf_Text_MarkDown_parse($text)); }
/** * Returns the timeline fragment for the commit. * * * @param Pluf_HTTP_Request * @return Pluf_Template_SafeString */ public function timelineFragment($request) { $url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::commit', array($request->project->shortname, $this->scm_id)); $out = '<tr class="log"><td><a href="' . $url . '">' . Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')) . '</a></td><td>'; $stag = new IDF_Template_ShowUser(); $user = $stag->start($this->get_author(), $request, $this->origauthor, false); $tag = new IDF_Template_IssueComment(); $out .= $tag->start($this->summary, $request, false); if (0 && $this->fullmessage) { $out .= '<br /><br />' . $tag->start($this->fullmessage, $request, false); } $out .= '</td> </tr> <tr class="extra"> <td colspan="2"> <div class="helptext right">' . sprintf(__('Commit %s, by %s'), '<a href="' . $url . '" class="mono">' . $this->scm_id . '</a>', $user) . '</div></td></tr>'; return Pluf_Template::markSafe($out); }