added __CODE__::revision and #R
This commit is contained in:
parent
9d983dc548
commit
11ee99c799
@ -8,6 +8,12 @@ class WikiHelper
|
|||||||
|
|
||||||
function parseLink ($name, $projectid, $converter)
|
function parseLink ($name, $projectid, $converter)
|
||||||
{
|
{
|
||||||
|
if (preg_match ('/^#R([[:digit:]]+)$/', $name, $matches) == 1)
|
||||||
|
{
|
||||||
|
// #R123 -> translate it to code reivision.
|
||||||
|
$link = "code/revision/{$projectid}/2e/{$matches[1]}";
|
||||||
|
return $link;
|
||||||
|
}
|
||||||
if ($this->_is_reserved ($name, TRUE))
|
if ($this->_is_reserved ($name, TRUE))
|
||||||
{
|
{
|
||||||
$ex0 = $this->_trans_reserved ($name);
|
$ex0 = $this->_trans_reserved ($name);
|
||||||
@ -94,6 +100,14 @@ class WikiHelper
|
|||||||
$link = "{$ex0}/{$ex[2]}/{$ex1}/{$ex3}";
|
$link = "{$ex0}/{$ex[2]}/{$ex1}/{$ex3}";
|
||||||
return $link;
|
return $link;
|
||||||
}
|
}
|
||||||
|
else if ($ex[2] == 'revision')
|
||||||
|
{
|
||||||
|
// __CODE__::revision:178.
|
||||||
|
// 2e for the root directory.
|
||||||
|
if ($ex1 == NULL) return FALSE;
|
||||||
|
$link = "{$ex0}/{$ex[2]}/{$ex1}/2e/{$ex[3]}";
|
||||||
|
return $link;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user