aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-20 20:05:32 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-20 20:05:32 +0000
commit686fea0f624de4bfbec2db196770b94c1fbacd47 (patch)
tree735d54c872ffa3a6564851f3ba450d49ed34fda9 /engine
parent5b4e68bf848d696b0c0bcbe719b3d3a62c8a687f (diff)
downloadelgg-686fea0f624de4bfbec2db196770b94c1fbacd47.tar.gz
elgg-686fea0f624de4bfbec2db196770b94c1fbacd47.tar.bz2
Fixed documentation for time created and modified params in elgg_get_entities().
git-svn-id: http://code.elgg.org/elgg/trunk@3814 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php30
1 files changed, 17 insertions, 13 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 4e201f326..fe6017e1b 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -124,24 +124,24 @@ abstract class ElggEntity implements
}
/**
- * Clone an entity
- *
- * Resets the guid so that the entity can be saved as a distinct entity from
- * the original. Creation time will be set when this new entity is saved.
- * The owner and container guids come from the original entity. The clone
+ * Clone an entity
+ *
+ * Resets the guid so that the entity can be saved as a distinct entity from
+ * the original. Creation time will be set when this new entity is saved.
+ * The owner and container guids come from the original entity. The clone
* method copies metadata but does not copy over annotations, or private settings.
- *
+ *
* Note: metadata will have its owner and access id set when the entity is saved
* and it will be the same as that off the entity.
*/
public function __clone() {
-
+
$orig_entity = get_entity($this->guid);
if (!$orig_entity) {
elgg_log("Failed to clone entity with GUID $this->guid", "ERROR");
return;
}
-
+
$metadata_array = get_metadata_for_entity($this->guid);
$this->attributes['guid'] = "";
@@ -156,14 +156,14 @@ abstract class ElggEntity implements
}
// arrays are stored with multiple enties per name
$metadata_names = array_unique($metadata_names);
-
+
// move the metadata over
foreach ($metadata_names as $name) {
$this->set($name, $orig_entity->$name);
}
}
}
-
+
/**
* Return the value of a given key.
* If $name is a key field (as defined in $this->attributes) that value is returned, otherwise it will
@@ -304,7 +304,7 @@ abstract class ElggEntity implements
* @param string $name Name of the metadata
* @param mixed $value Value of the metadata
* @param string $value_type Types supported: integer and string. Will auto-identify if not set
- * @param bool $multiple
+ * @param bool $multiple
* @return bool
*/
public function setMetaData($name, $value, $value_type = "", $multiple = false) {
@@ -1672,9 +1672,13 @@ function get_entity($guid) {
*
* offset => NULL (0)|INT SQL offset clause
*
- * time_lower => NULL|INT Time lower boundary in epoch time
+ * created_time_lower => NULL|INT Created time lower boundary in epoch time
+ *
+ * created_time_upper => NULL|INT Created time upper boundary in epoch time
+ *
+ * modified_time_lower => NULL|INT Modified time lower boundary in epoch time
*
- * time_upper => NULL|INT Time upper boundary in epoch time
+ * modified_time_upper => NULL|INT Modified time upper boundary in epoch time
*
* count => TRUE|FALSE return a count instead of entities
*