diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-12 10:34:10 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-12 10:34:10 +0000 |
commit | 5eb30685c8da7911fe9f48c708f9d7a99b0abe39 (patch) | |
tree | 30968c6062969d65fdbaf42ad5a840958608e655 | |
parent | de2c155193c35f4e764fb09ba564be86237e3335 (diff) | |
download | elgg-5eb30685c8da7911fe9f48c708f9d7a99b0abe39.tar.gz elgg-5eb30685c8da7911fe9f48c708f9d7a99b0abe39.tar.bz2 |
Updates to both objects (in order to be able to resave type properly) and access (to add useful constants)
git-svn-id: https://code.elgg.org/elgg/trunk@179 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/access.php | 6 | ||||
-rw-r--r-- | engine/lib/objects.php | 4 | ||||
-rw-r--r-- | mod/test/index.php | 2 |
3 files changed, 11 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}'";
}
diff --git a/mod/test/index.php b/mod/test/index.php index 5b749e2e7..b068c4dd4 100644 --- a/mod/test/index.php +++ b/mod/test/index.php @@ -8,4 +8,6 @@ $body = elgg_view("testplugin/pageshell");
page_draw("Test plugin",$body);
+
+
?>
\ No newline at end of file |