summaryrefslogtreecommitdiffstats
path: root/code/pages.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'code/pages.inc.php')
-rw-r--r--code/pages.inc.php10
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);
}
}