diff options
author | neoraider <devnull@localhost> | 2006-04-11 01:32:02 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-04-11 01:32:02 +0200 |
commit | e267e31bd045ff4a6bfa1489b0ad0eb5fcc7b31d (patch) | |
tree | 12258874b7507fd9784184c08e2fbd89e945edd4 | |
parent | 9697f5a0d665e7171de958182cbe59c1dcfe2c87 (diff) | |
download | neon-e267e31bd045ff4a6bfa1489b0ad0eb5fcc7b31d.tar neon-e267e31bd045ff4a6bfa1489b0ad0eb5fcc7b31d.zip |
/code/links.inc.php /code/nav.inc.php: Links::ParseNavLink nach Nav::ParseLink verschoben.
/code/pages.inc.php: Bug in HasAccess() gefixt.
/handlers/default.inc.php /handlers/phpexec.inc.php: Globale Variablen wurden nicht in $GLOBALS gesetzt.
-rw-r--r-- | code/links.inc.php | 25 | ||||
-rw-r--r-- | code/nav.inc.php | 27 | ||||
-rw-r--r-- | code/pages.inc.php | 1 | ||||
-rw-r--r-- | handlers/default.inc.php | 2 | ||||
-rw-r--r-- | handlers/phpexec.inc.php | 7 | ||||
-rw-r--r-- | styles/GreenGrid/style.css | 2 |
6 files changed, 31 insertions, 33 deletions
diff --git a/code/links.inc.php b/code/links.inc.php index 2eddb77..b5ae18e 100644 --- a/code/links.inc.php +++ b/code/links.inc.php @@ -34,31 +34,6 @@ return ''; } - - function ParseNavLink($text, $link) { - if(!$link) return $text; - - switch($link[0]) { - case ':': - $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: - return '<a href="' . $this->GetExternalLink($link) . '">' . $text . '</a>'; - } - } } $GLOBALS['links'] = new Links; diff --git a/code/nav.inc.php b/code/nav.inc.php index e7617d1..06ce84d 100644 --- a/code/nav.inc.php +++ b/code/nav.inc.php @@ -29,6 +29,31 @@ return $ret; } + + function ParseLink($text, $link) { + if(!$link) return $text; + + switch($link[0]) { + case ':': + $ret = $GLOBALS['links']->GetNeonLink(substr($link, 1)); + + if($ret) + return '<a href="' . $ret . '">' . $text . '</a>'; + + return $text; + case '@': + return '<a href="' . $GLOBALS['links']->GetMailtoLink(substr($link, 1)) . '">' . $text . '</a>'; + case '!': + $ret = $GLOBALS['links']->GetNavPage(substr($link, 1)); + + if($ret) + return $ret; + + return $text; + default: + return '<a href="' . $GLOBALS['links']->GetExternalLink($link) . '">' . $text . '</a>'; + } + } } class NavEntry { @@ -49,7 +74,7 @@ $ccount = 0; $ret = '<li>'; - $a = $GLOBALS['links']->ParseNavLink($this->text, $this->link); + $a = $GLOBALS['nav']->ParseLink($this->text, $this->link); $ret .= $a; diff --git a/code/pages.inc.php b/code/pages.inc.php index 50e45fe..3a84aa3 100644 --- a/code/pages.inc.php +++ b/code/pages.inc.php @@ -72,6 +72,7 @@ if($type) $res = $GLOBALS['db']->Execute('SELECT access FROM pages WHERE name = ? AND type = ?', array($page, $type)); else $res = $GLOBALS['db']->Execute('SELECT access FROM pages WHERE id = ?', $page); + if(!$res->RecordCount()) return false; return ($GLOBALS['user']->IsAdmin() || (ord($res->fields[0][$gid/8]) & (1 << ($gid%8))) != 0); } diff --git a/handlers/default.inc.php b/handlers/default.inc.php index 14e00c3..8bc8200 100644 --- a/handlers/default.inc.php +++ b/handlers/default.inc.php @@ -14,5 +14,5 @@ } } - $handlers['default'] = new default_handler; + $GLOBALS['handlers']['default'] = new default_handler; ?> diff --git a/handlers/phpexec.inc.php b/handlers/phpexec.inc.php index 76dccae..5b8c751 100644 --- a/handlers/phpexec.inc.php +++ b/handlers/phpexec.inc.php @@ -4,10 +4,7 @@ class phpexec_handler { function Get($data) { - if($data['title']) - $title = strtr($data['title'], array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); - else - $title = strtr($data['_page'], array(':' => ' - ')); + $title = strtr($data['_page'], array(':' => ' - ')); ob_start(); @@ -20,5 +17,5 @@ } } - $handlers['phpexec'] = new phpexec_handler; + $GLOBALS['handlers']['phpexec'] = new phpexec_handler; ?> diff --git a/styles/GreenGrid/style.css b/styles/GreenGrid/style.css index ce2bc41..7468ce4 100644 --- a/styles/GreenGrid/style.css +++ b/styles/GreenGrid/style.css @@ -3,7 +3,7 @@ body { background:url(Grid.gif) #000000 repeat fixed; font-family:Larabiefont, Westminster, Courier, monospace; } - + a:link { color:#008000; text-decoration:none; |