projects
/
mdref
/
mdref
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
8c22806
)
fix repos containing supplementary .md files
author
Michael Wallner
<mike@php.net>
Tue, 19 Jan 2016 07:59:07 +0000
(08:59 +0100)
committer
Michael Wallner
<mike@php.net>
Tue, 19 Jan 2016 07:59:07 +0000
(08:59 +0100)
mdref/Tree.php
patch
|
blob
|
history
diff --git
a/mdref/Tree.php
b/mdref/Tree.php
index dd27d6fd0f94ca8616031f1127a3d14a38f0ac59..8f6c7739f6eaca5fea832fe847ae133ad4657823 100644
(file)
--- a/
mdref/Tree.php
+++ b/
mdref/Tree.php
@@
-26,7
+26,9
@@
class Tree implements \RecursiveIterator {
* @param \mdref\Repo $repo
*/
public function __construct($path, Repo $repo) {
- if (!($list = glob("$path/*.md"))) {
+ if (realpath($path)."/" === $repo->getPath()) {
+ $list = [$path ."/". $repo->getName() .".md"];
+ } elseif (!($list = glob("$path/*.md"))) {
$list = glob("$path/*/*.md");
}
if ($list) {