Skip to content

Commit ab67127

Browse files
author
Your Name
committed
Relative path ".:" does not work (2nd revised) close dokufreaks#95
1 parent d913e05 commit ab67127

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

syntax/archive.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ function handle($match, $state, $pos, Doku_Handler $handler) {
5353
if ($ns == '') $ns = cleanID($this->getConf('namespace'));
5454
elseif (($ns == '*') || ($ns == ':')) $ns = '';
5555
elseif ($ns == '.') $ns = getNS($ID);
56+
elseif (preg_match('/^\.:/', $ns)){
57+
if (getNS(getID())) {
58+
$ns = getNS($ID) . ltrim($ns, ".");
59+
} else {
60+
$ns = ltrim($ns, ".:");
61+
}
62+
}
5663
else $ns = cleanID($ns);
5764

5865
// daily archive

syntax/autoarchive.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ function handle($match, $state, $pos, Doku_Handler $handler) {
3737
if ($ns == '') $ns = cleanID($this->getConf('namespace'));
3838
elseif (($ns == '*') || ($ns == ':')) $ns = '';
3939
elseif ($ns == '.') $ns = getNS($ID);
40+
elseif (preg_match('/^\.:/', $ns)){
41+
if (getNS(getID())) {
42+
$ns = getNS($ID) . ltrim($ns, ".");
43+
} else {
44+
$ns = ltrim($ns, ".:");
45+
}
46+
}
4047
else $ns = cleanID($ns);
4148

4249
return array($ns, $flags, $refine, $pos);

syntax/blog.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ function handle($match, $state, $pos, Doku_Handler $handler) {
4949
if ($ns == '') $ns = cleanID($this->getConf('namespace'));
5050
elseif (($ns == '*') || ($ns == ':')) $ns = '';
5151
elseif ($ns == '.') $ns = getNS($ID);
52+
elseif (preg_match('/^\.:/', $ns)){
53+
if (getNS(getID())) {
54+
$ns = getNS($ID) . ltrim($ns, ".");
55+
} else {
56+
$ns = ltrim($ns, ".:");
57+
}
58+
}
5259
else $ns = cleanID($ns);
5360

5461
return array($ns, $num, $flags, $refine);

0 commit comments

Comments
 (0)