From c787833e7cbd2c33257a963e4bc99a3f7dc97cd7 Mon Sep 17 00:00:00 2001 From: neoraider Date: Sat, 11 Mar 2006 23:49:00 +0000 Subject: Benutzerverwaltung implementiert. --- code/pages.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'code/pages.inc.php') diff --git a/code/pages.inc.php b/code/pages.inc.php index d57bb17..e1bfd9b 100644 --- a/code/pages.inc.php +++ b/code/pages.inc.php @@ -93,6 +93,8 @@ array(substr($string, 0, -1), $page, $type)); else $GLOBALS['db']->Execute('UPDATE pages SET data = ? WHERE id = ?', array(substr($string, 0, -1), $page)); + + return ($GLOBALS['db']->Affected_Rows() > 0); } function Rename($page, $new_name, $type = null) { @@ -106,16 +108,18 @@ $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE id = ?', array($new_name, $page)); } + + return ($GLOBALS['db']->Affected_Rows() > 0); } function Copy($page, $new_name, $type = null) { if($type) { - if($this->Exists($new_name, $type)) return; + if($this->Exists($new_name, $type)) return 0; $res = $GLOBALS['db']->Execute('SELECT * FROM pages WHERE name = ? AND type = ?', array($page, $type)); } else { - if($this->Exists($new_name, $this->GetType($type))) return; + if($this->Exists($new_name, $this->GetType($type))) return 0; $res = $GLOBALS['db']->Execute('SELECT handler, data, type FROM pages WHERE id = ?', $page); } @@ -129,6 +133,8 @@ function Delete($page, $type = null) { if($type) $GLOBALS['db']->Execute('DELETE FROM pages WHERE name = ? AND type = ?', array($page, $type)); else $GLOBALS['db']->Execute('DELETE FROM pages WHERE id = ?', $page); + + return ($GLOBALS['db']->Affected_Rows() > 0); } } -- cgit v1.2.3