X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=mdref%2FAction.php;fp=mdref%2FAction.php;h=dcd8fcbed025d24f4725c9b9c0976a2c19d8e2ba;hb=3d804b7c153990d081d5acfaee7e594873666f13;hp=dafc8e55f493346e5f324fd9592bba7b2c69ce1f;hpb=6478b415c59070f70ed860f3a592377eef9783b1;p=mdref%2Fmdref diff --git a/mdref/Action.php b/mdref/Action.php index dafc8e5..dcd8fcb 100644 --- a/mdref/Action.php +++ b/mdref/Action.php @@ -135,12 +135,15 @@ class Action extends Observer { return; } + $cnn = null; if (($repo = $this->reference->getRepoForEntry($pld->ref, $cnn))) { - /* direct match */ - $pld->entry = $repo->getEntry($pld->ref); - } else if (strlen($cnn)) { - /* redirect */ - $this->serveCanonical($ctl, $cnn); + if (strlen($cnn)) { + /* redirect */ + $this->serveCanonical($ctl, $cnn); + } else { + /* direct match */ + $pld->entry = $repo->getEntry($pld->ref); + } } else { $this->servePreset($ctl, $pld); }