diff options
author | neoraider <devnull@localhost> | 2006-03-12 00:49:00 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-03-12 00:49:00 +0100 |
commit | c787833e7cbd2c33257a963e4bc99a3f7dc97cd7 (patch) | |
tree | 410d10eaeba4647936c78fdc0dd67aab867cd43d /code/pages.inc.php | |
parent | a8c94b9b74d7f586ea4b8a5b09290c04b44df7fe (diff) | |
download | neon-c787833e7cbd2c33257a963e4bc99a3f7dc97cd7.tar neon-c787833e7cbd2c33257a963e4bc99a3f7dc97cd7.zip |
Benutzerverwaltung implementiert.
Diffstat (limited to 'code/pages.inc.php')
-rw-r--r-- | code/pages.inc.php | 10 |
1 files changed, 8 insertions, 2 deletions
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); } } |