diff options
author | neoraider <devnull@localhost> | 2006-02-11 01:31:03 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-02-11 01:31:03 +0100 |
commit | 446b94d9cd09003903a270619f368cba0b7ca594 (patch) | |
tree | 6fdb044813f4f07d365a05e4dbdb537c6bfdf13c /code/pages.inc.php | |
parent | af3aaf3630d4634a85d7d912f751f3bf36633278 (diff) | |
download | neon-446b94d9cd09003903a270619f368cba0b7ca594.tar neon-446b94d9cd09003903a270619f368cba0b7ca594.zip |
DB-Funktionen durch Klasse gekapselt.
Diffstat (limited to 'code/pages.inc.php')
-rw-r--r-- | code/pages.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/code/pages.inc.php b/code/pages.inc.php index 24d0ec4..4516303 100644 --- a/code/pages.inc.php +++ b/code/pages.inc.php @@ -12,7 +12,7 @@ return array('title' => $name, 'content' => ErrorMessage('PageNotFound', array('page' => $name))); - $res = DBQuery('SELECT id, handler, data FROM pages WHERE name = ? AND type = ?', array($name, $type)); + $res = $GLOBALS['db']->Query('SELECT id, handler, data FROM pages WHERE name = ? AND type = ?', array($name, $type)); if(!$this->HasAccess($name, $type)) return array('title' => $name, @@ -32,7 +32,7 @@ return array('title' => $name, 'content' => ErrorMessage('PageNotFound', array('page' => $name))); - $res = DBQuery('SELECT id, handler, data FROM pages WHERE name = ? AND type = ?', array($name, $type)); + $res = $GLOBALS['db']->Query('SELECT id, handler, data FROM pages WHERE name = ? AND type = ?', array($name, $type)); if(!$GLOBALS['user']->IsAdmin()) return array('title' => $name, @@ -47,13 +47,13 @@ } function Exists($name, $type) { - $res = DBQuery('SELECT id FROM pages WHERE name = ? AND type = ?', array($name, $type)); + $res = $GLOBALS['db']->Query('SELECT id FROM pages WHERE name = ? AND type = ?', array($name, $type)); return ($res->RecordCount() > 0); } function HasAccess($name, $type) { - $res = DBQuery('SELECT access FROM pages WHERE name = ? AND type = ?', array($name, $type)); + $res = $GLOBALS['db']->Query('SELECT access FROM pages WHERE name = ? AND type = ?', array($name, $type)); return ($GLOBALS['user']->IsAdmin() || ($res->fields[0] & (1 << $GLOBALS['user']->GetGid())) != 0); } |