diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-12 12:56:19 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-12 12:56:19 +0000 |
commit | 8f5ac5c27f81b04bb71bab930638762c8c3e501e (patch) | |
tree | 6b9d1fec66c50b342167d17816f4c8d444406918 /engine/lib/sites.php | |
parent | 70dafccc9b4cdef58a559fc8fa5ec640bf13af1d (diff) | |
download | elgg-8f5ac5c27f81b04bb71bab930638762c8c3e501e.tar.gz elgg-8f5ac5c27f81b04bb71bab930638762c8c3e501e.tar.bz2 |
closes #1145 - deprecated current "copy constructor" for all entities and implemented a clone method. The clone copies over all metadata but not annotations and private settings. It sets the guid to 0 so saving the cloned entity creates a new database record. The ownership/access of metadata is set during the save and will be the same as that of the entity.
git-svn-id: http://code.elgg.org/elgg/trunk@3802 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/sites.php')
-rw-r--r-- | engine/lib/sites.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php index d38113d27..0892f2963 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -54,6 +54,8 @@ class ElggSite extends ElggEntity { // Is $guid is an ElggSite? Use a copy constructor else if ($guid instanceof ElggSite) { + elgg_log('This type of usage of the ElggSite constructor was deprecated in 1.7. Please use the clone method.', 'WARNING'); + foreach ($guid->attributes as $key => $value) { $this->attributes[$key] = $value; } |