projects
/
mdref
/
mdref
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix discovery of subentries
[mdref/mdref]
/
mdref
/
Entry.php
diff --git
a/mdref/Entry.php
b/mdref/Entry.php
index 587cd1e8a33122b3f44e69b78b884a912b1c9208..5292fff4660dcbb3fd4796044350a591b051ae2b 100644
(file)
--- a/
mdref/Entry.php
+++ b/
mdref/Entry.php
@@
-218,9
+218,10
@@
class Entry implements \IteratorAggregate {
* @param string $glob
* @return boolean
*/
* @param string $glob
* @return boolean
*/
- function hasIterator($glob = null) {
+ function hasIterator($glob = null
, $loose = false
) {
if (strlen($glob)) {
if (strlen($glob)) {
- return glob($this->getBasename() . "/$glob");
+ return glob($this->getBasename() . "/$glob") ||
+ ($loose && glob($this->getBasename() . "/*/$glob"));
} elseif ($this->isRoot()) {
return true;
} else {
} elseif ($this->isRoot()) {
return true;
} else {
@@
-233,7
+234,7
@@
class Entry implements \IteratorAggregate {
* @return bool
*/
function hasNsClasses() {
* @return bool
*/
function hasNsClasses() {
- return $this->hasIterator("/[A-Z]*.md");
+ return $this->hasIterator("/[A-Z]*.md"
, true
);
}
/**
}
/**
@@
-249,6
+250,6
@@
class Entry implements \IteratorAggregate {
* @return \mdref\Tree child nodes
*/
function getIterator() {
* @return \mdref\Tree child nodes
*/
function getIterator() {
- return new Tree($this->getBasename(), $this->repo
, $this->isRoot()
);
+ return new Tree($this->getBasename(), $this->repo);
}
}
}
}