aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggEntity.php3
-rw-r--r--engine/classes/ElggGroup.php9
-rw-r--r--engine/classes/ElggMenuItem.php24
-rw-r--r--engine/classes/ElggObject.php5
-rw-r--r--engine/classes/ElggPluginManifest.php2
-rw-r--r--engine/classes/ElggRelationship.php4
-rw-r--r--engine/classes/ElggSite.php5
-rw-r--r--engine/classes/ElggUser.php5
8 files changed, 48 insertions, 9 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index fdf2a80ea..df87082fe 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -1335,6 +1335,9 @@ abstract class ElggEntity extends ElggData implements
$this->attributes['tables_loaded']++;
}
+ // guid needs to be an int http://trac.elgg.org/ticket/4111
+ $this->attributes['guid'] = (int)$this->attributes['guid'];
+
// Cache object handle
if ($this->attributes['guid']) {
cache_entity($this);
diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php
index 49ba27204..0190e5eac 100644
--- a/engine/classes/ElggGroup.php
+++ b/engine/classes/ElggGroup.php
@@ -309,7 +309,7 @@ class ElggGroup extends ElggEntity
*
* @param ElggUser $user User
*
- * @return void
+ * @return bool
*/
public function leave(ElggUser $user) {
return leave_group($this->getGUID(), $user->getGUID());
@@ -322,7 +322,7 @@ class ElggGroup extends ElggEntity
*
* @param int $guid GUID of an ElggGroup entity
*
- * @return true
+ * @return bool
*/
protected function load($guid) {
// Test to see if we have the generic stuff
@@ -340,7 +340,7 @@ class ElggGroup extends ElggEntity
$row = get_group_entity_as_row($guid);
if (($row) && (!$this->isFullyLoaded())) {
// If $row isn't a cached copy then increment the counter
- $this->attributes['tables_loaded'] ++;
+ $this->attributes['tables_loaded']++;
}
// Now put these into the attributes array as core values
@@ -349,6 +349,9 @@ class ElggGroup extends ElggEntity
$this->attributes[$key] = $value;
}
+ // guid needs to be an int http://trac.elgg.org/ticket/4111
+ $this->attributes['guid'] = (int)$this->attributes['guid'];
+
return true;
}
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 8ddb1ecd8..62547134a 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -100,6 +100,9 @@ class ElggMenuItem {
if (!isset($options['name']) || !isset($options['text'])) {
return NULL;
}
+ if (!isset($options['href'])) {
+ $options['href'] = '';
+ }
$item = new ElggMenuItem($options['name'], $options['text'], $options['href']);
unset($options['name']);
@@ -412,6 +415,7 @@ class ElggMenuItem {
*
* @param int $priority The smaller numbers mean higher priority (1 before 100)
* @return void
+ * @deprecated
*/
public function setWeight($priority) {
$this->data['priority'] = $priority;
@@ -421,12 +425,32 @@ class ElggMenuItem {
* Get the priority of the menu item
*
* @return int
+ * @deprecated
*/
public function getWeight() {
return $this->data['priority'];
}
/**
+ * Set the priority of the menu item
+ *
+ * @param int $priority The smaller numbers mean higher priority (1 before 100)
+ * @return void
+ */
+ public function setPriority($priority) {
+ $this->data['priority'] = $priority;
+ }
+
+ /**
+ * Get the priority of the menu item
+ *
+ * @return int
+ */
+ public function getPriority() {
+ return $this->data['priority'];
+ }
+
+ /**
* Set the section identifier
*
* @param string $section The identifier of the section
diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php
index caccfb038..0b8340697 100644
--- a/engine/classes/ElggObject.php
+++ b/engine/classes/ElggObject.php
@@ -110,7 +110,7 @@ class ElggObject extends ElggEntity {
$row = get_object_entity_as_row($guid);
if (($row) && (!$this->isFullyLoaded())) {
// If $row isn't a cached copy then increment the counter
- $this->attributes['tables_loaded'] ++;
+ $this->attributes['tables_loaded']++;
}
// Now put these into the attributes array as core values
@@ -119,6 +119,9 @@ class ElggObject extends ElggEntity {
$this->attributes[$key] = $value;
}
+ // guid needs to be an int http://trac.elgg.org/ticket/4111
+ $this->attributes['guid'] = (int)$this->attributes['guid'];
+
return true;
}
diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php
index eacc16455..7592eb667 100644
--- a/engine/classes/ElggPluginManifest.php
+++ b/engine/classes/ElggPluginManifest.php
@@ -553,7 +553,7 @@ class ElggPluginManifest {
}
/**
- * Returns the admin interface to use.
+ * Should this plugin be activated when Elgg is installed
*
* @return bool
*/
diff --git a/engine/classes/ElggRelationship.php b/engine/classes/ElggRelationship.php
index a0826689d..2d9a32cbd 100644
--- a/engine/classes/ElggRelationship.php
+++ b/engine/classes/ElggRelationship.php
@@ -10,9 +10,9 @@ class ElggRelationship extends ElggData implements
{
/**
- * Construct a new site object, optionally from a given id value or row.
+ * Create a relationship object, optionally from a given id value or row.
*
- * @param mixed $id ElggRelationship id
+ * @param mixed $id ElggRelationship id, database row, or null for new relationship
*/
function __construct($id = null) {
$this->initializeAttributes();
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index 16b80b9d3..5c44d4076 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -128,7 +128,7 @@ class ElggSite extends ElggEntity {
$row = get_site_entity_as_row($guid);
if (($row) && (!$this->isFullyLoaded())) {
// If $row isn't a cached copy then increment the counter
- $this->attributes['tables_loaded'] ++;
+ $this->attributes['tables_loaded']++;
}
// Now put these into the attributes array as core values
@@ -137,6 +137,9 @@ class ElggSite extends ElggEntity {
$this->attributes[$key] = $value;
}
+ // guid needs to be an int http://trac.elgg.org/ticket/4111
+ $this->attributes['guid'] = (int)$this->attributes['guid'];
+
return true;
}
diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php
index 75ac008f6..a1c7147a5 100644
--- a/engine/classes/ElggUser.php
+++ b/engine/classes/ElggUser.php
@@ -114,7 +114,7 @@ class ElggUser extends ElggEntity
$row = get_user_entity_as_row($guid);
if (($row) && (!$this->isFullyLoaded())) {
// If $row isn't a cached copy then increment the counter
- $this->attributes['tables_loaded'] ++;
+ $this->attributes['tables_loaded']++;
}
// Now put these into the attributes array as core values
@@ -123,6 +123,9 @@ class ElggUser extends ElggEntity
$this->attributes[$key] = $value;
}
+ // guid needs to be an int http://trac.elgg.org/ticket/4111
+ $this->attributes['guid'] = (int)$this->attributes['guid'];
+
return true;
}