projects
/
mdref
/
mdref
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix serving presets
[mdref/mdref]
/
mdref
/
Action.php
diff --git
a/mdref/Action.php
b/mdref/Action.php
index 05e007fe37b0ea176dda8d9be8b738c2e273294e..19cf9106f363c9edb6e89e1b83a9cd6fa6aa5ac0 100644
(file)
--- a/
mdref/Action.php
+++ b/
mdref/Action.php
@@
-97,6
+97,7
@@
class Action {
/**
* Serve a preset
* @param \stdClass $pld
/**
* Serve a preset
* @param \stdClass $pld
+ * @return true to continue serving the payload
* @throws Exception
*/
private function servePreset($pld) {
* @throws Exception
*/
private function servePreset($pld) {
@@
-105,7
+106,7
@@
class Action {
case "LICENSE":
case "VERSION":
$pld->text = file_get_contents(ROOT."/$pld->ref");
case "LICENSE":
case "VERSION":
$pld->text = file_get_contents(ROOT."/$pld->ref");
-
break
;
+
return true
;
case "index.css":
$this->serveStylesheet();
break;
case "index.css":
$this->serveStylesheet();
break;
@@
-115,6
+116,7
@@
class Action {
default:
throw new Exception(404, "$pld->ref not found");
}
default:
throw new Exception(404, "$pld->ref not found");
}
+ return false;
}
private function serve() {
}
private function serve() {
@@
-138,8
+140,8
@@
class Action {
/* direct match */
$pld->entry = $repo->getEntry($pld->ref);
}
/* direct match */
$pld->entry = $repo->getEntry($pld->ref);
}
- } else {
- return
$this->servePreset($pld)
;
+ } else
if (!$this->servePreset($pld))
{
+ return;
}
}
}
}