aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggBatch.php10
-rw-r--r--engine/classes/ElggPlugin.php23
-rw-r--r--engine/classes/ElggSite.php3
-rw-r--r--engine/classes/ElggUser.php3
4 files changed, 21 insertions, 18 deletions
diff --git a/engine/classes/ElggBatch.php b/engine/classes/ElggBatch.php
index 49aed800a..62128e34f 100644
--- a/engine/classes/ElggBatch.php
+++ b/engine/classes/ElggBatch.php
@@ -6,7 +6,7 @@
* This is usually used with elgg_get_entities() and friends, elgg_get_annotations()
* and elgg_get_metadata().
*
- * If pass a valid PHP callback, all results will be run through that callback.
+ * If you pass a valid PHP callback, all results will be run through that callback.
* You can still foreach() through the result set after. Valid PHP callbacks
* can be a string, an array, or a closure.
* {@link http://php.net/manual/en/language.pseudo-types.php}
@@ -14,10 +14,10 @@
* The callback function must accept 3 arguments: an entity, the getter used, and the options used.
*
* Results from the callback are stored in callbackResult.
- * If the callback returns only booleans callbackResults will be the combined
+ * If the callback returns only booleans, callbackResults will be the combined
* result of all calls.
*
- * If the callback returns anything else callbackresult will be an indexed array
+ * If the callback returns anything else, callbackresult will be an indexed array
* of whatever the callback returns. If returning error handling information,
* you should include enough information to determine which result you're referring
* to.
@@ -90,7 +90,7 @@ class ElggBatch
private $offset = 0;
/**
- * Stop of this many results.
+ * Stop after this many results.
*
* @var unknown_type
*/
@@ -333,7 +333,7 @@ class ElggBatch
$result = current($this->results);
} else {
- // the function above resets the indexes, so don't only inc if not
+ // the function above resets the indexes, so only inc if not
// getting new set
$this->resultIndex++;
$result = next($this->results);
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index 95a7362e2..d837431fc 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -315,9 +315,9 @@ class ElggPlugin extends ElggObject {
return false;
}
// Hook to validate setting
- $value = elgg_trigger_plugin_hook('plugin:setting', 'plugin', array(
- 'plugin' => $this->pluginID,
- 'plugin_object' => $this,
+ $value = elgg_trigger_plugin_hook('setting', 'plugin', array(
+ 'plugin_id' => $this->pluginID,
+ 'plugin' => $this,
'name' => $name,
'value' => $value
), $value);
@@ -454,10 +454,11 @@ class ElggPlugin extends ElggObject {
}
// Hook to validate setting
- // note this doesn't pass the namespaced name!
- $value = elgg_trigger_plugin_hook('plugin:usersetting', 'user', array(
+ // note: this doesn't pass the namespaced name
+ $value = elgg_trigger_plugin_hook('usersetting', 'plugin', array(
'user' => $user,
- 'plugin' => $this->getID(),
+ 'plugin' => $this,
+ 'plugin_id' => $this->getID(),
'name' => $name,
'value' => $value
), $value);
@@ -700,6 +701,11 @@ class ElggPlugin extends ElggObject {
// return false;
// }
+ // include classes
+ if ($flags & ELGG_PLUGIN_REGISTER_CLASSES) {
+ $this->registerClasses();
+ }
+
// include start file
if ($flags & ELGG_PLUGIN_INCLUDE_START) {
$this->includeFile('start.php');
@@ -715,11 +721,6 @@ class ElggPlugin extends ElggObject {
$this->registerLanguages();
}
- // include classes
- if ($flags & ELGG_PLUGIN_REGISTER_CLASSES) {
- $this->registerClasses();
- }
-
return true;
}
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index e3b8b8f1a..40bfca060 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -410,8 +410,9 @@ class ElggSite extends ElggEntity {
'register',
'action/register',
'forgotpassword',
- 'action/user/requestnewpassword',
'resetpassword',
+ 'action/user/requestnewpassword',
+ 'action/user/passwordreset',
'upgrade\.php',
'xml-rpc\.php',
'mt/mt-xmlrpc\.cgi',
diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php
index 1af4cdc3a..75ac008f6 100644
--- a/engine/classes/ElggUser.php
+++ b/engine/classes/ElggUser.php
@@ -484,7 +484,8 @@ class ElggUser extends ElggEntity
* @return array|false
*/
public function getCollections($subtype = "", $limit = 10, $offset = 0) {
- return get_user_collections($this->getGUID(), $subtype, $limit, $offset);
+ elgg_deprecated_notice("ElggUser::getCollections() has been deprecated", 1.8);
+ return false;
}
/**