diff options
Diffstat (limited to 'code/links.inc.php')
-rw-r--r-- | code/links.inc.php | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/code/links.inc.php b/code/links.inc.php index 7895197..2eddb77 100644 --- a/code/links.inc.php +++ b/code/links.inc.php @@ -4,10 +4,10 @@ class Links { function GetNeonLink($page, $extra = '', $html = true) { if($GLOBALS['pages']->HasAccess($page, 'c')) { - if($GLOBALS['user']->login_type == 'url') - $ret = 'index.php?page=' . $page . '&login=' . $GLOBALS['user']->login_key - . ($extra ? '&' . $extra : ''); - + if($GLOBALS['user']->login_type == 'url') + $ret = 'index.php?page=' . $page . '&login=' . $GLOBALS['user']->login_key + . ($extra ? '&' . $extra : ''); + else $ret = 'index.php?page=' . $page . ($extra ? '&' . $extra : ''); @@ -28,8 +28,8 @@ function GetNavPage($page) { if($GLOBALS['pages']->HasAccess($page, 'n')) { - $page = $GLOBALS['pages']->Get($page, 'n'); - return $page['content']; + $page = $GLOBALS['pages']->Get($page, 'n'); + return $page['content']; } return ''; @@ -40,22 +40,22 @@ switch($link[0]) { case ':': - $ret = $this->GetNeonLink(substr($link, 1)); - - if($ret) + $ret = $this->GetNeonLink(substr($link, 1)); + + if($ret) return '<a href="' . $ret . '">' . $text . '</a>'; return $text; - case '@': - return '<a href="' . $this->GetMailtoLink(substr($link, 1)) . '">' . $text . '</a>'; - case '!': - $ret = $this->GetNavPage(substr($link, 1)); - - if($ret) - return $ret; - - return $text; - default: + case '@': + return '<a href="' . $this->GetMailtoLink(substr($link, 1)) . '">' . $text . '</a>'; + case '!': + $ret = $this->GetNavPage(substr($link, 1)); + + if($ret) + return $ret; + + return $text; + default: return '<a href="' . $this->GetExternalLink($link) . '">' . $text . '</a>'; } } |