aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/access.php6
-rw-r--r--engine/lib/objects.php4
2 files changed, 9 insertions, 1 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index e704dfd5e..d89357ec0 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -88,4 +88,10 @@
}
+ /**
+ * Some useful constant definitions
+ */
+ define('PRIVATE',0);
+ define('LOGGED_IN',1);
+ define('PUBLIC',2);
?> \ No newline at end of file
diff --git a/engine/lib/objects.php b/engine/lib/objects.php
index 3ab4040c0..ccfc6b8b1 100644
--- a/engine/lib/objects.php
+++ b/engine/lib/objects.php
@@ -359,8 +359,10 @@
// We also need the access restriction to be valid
if ($owner > 0 && in_array($access_id,get_access_array())) {
+ $type_id = get_object_type_id($type);
+
$params = array();
- foreach(array('title','description','owner','site_id','access_id','site_id','owner') as $param) {
+ foreach(array('title','description','owner','access_id','site_id','owner','type_id') as $param) {
if ($$param != null) {
$params[] = "{$param} = '{$$param}'";
}