| private $request = null;␊ |
| private $scm = null;␊ |
| ␊ |
| function start($text, $request, $echo=true, $wordwrap=true, $esc=true)␊ |
| function start($text, $request, $echo=true, $wordwrap=true, $esc=true, $autolink=true)␊ |
| {␊ |
| $this->project = $request->project;␊ |
| $this->request = $request;␊ |
| $this->scm = IDF_Scm::get($request);␊ |
| if ($wordwrap) $text = wordwrap($text, 69, "\n", true);␊ |
| if ($esc) $text = Pluf_esc($text);␊ |
| $text = ereg_replace('[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]', ␊ |
| '<a href="\\0" rel="nofollow">\\0</a>', ␊ |
| $text); ␊ |
| if ($autolink) {␊ |
| $text = ereg_replace('[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]', ␊ |
| '<a href="\\0" rel="nofollow">\\0</a>', ␊ |
| $text); ␊ |
| }␊ |
| if ($request->rights['hasIssuesAccess']) {␊ |
| $text = preg_replace_callback('#(issues?|bugs?|tickets?)\s+(\d+)((\s+and|\s+or|,)\s+(\d+)){0,}#im',␊ |
| array($this, 'callbackIssues'), $text);␊ |