diff options
author | Sem <sembrestels@riseup.net> | 2012-12-07 23:55:12 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-12-07 23:55:12 +0100 |
commit | 3ed289b03fa3d851fd7fffbc0441ebc9b5e98310 (patch) | |
tree | b2c8d2d7f569f0e3e7bfa6711cef96f806aea9f1 /engine/classes | |
parent | 2b2af5392f0daadc22a1db04aa17c17d4dd37c65 (diff) | |
parent | ccf7abb4b2b94781f9b67a6cf8798994aa1cca0d (diff) | |
download | elgg-3ed289b03fa3d851fd7fffbc0441ebc9b5e98310.tar.gz elgg-3ed289b03fa3d851fd7fffbc0441ebc9b5e98310.tar.bz2 |
Merge tag '1.8.11' of git://github.com/Elgg/Elgg
Elgg 1.8.11 release
Diffstat (limited to 'engine/classes')
-rw-r--r-- | engine/classes/ElggPAM.php | 8 | ||||
-rw-r--r-- | engine/classes/ElggPlugin.php | 7 | ||||
-rw-r--r-- | engine/classes/ElggVolatileMetadataCache.php | 3 |
3 files changed, 15 insertions, 3 deletions
diff --git a/engine/classes/ElggPAM.php b/engine/classes/ElggPAM.php index 0681a909b..f07095fc1 100644 --- a/engine/classes/ElggPAM.php +++ b/engine/classes/ElggPAM.php @@ -53,11 +53,17 @@ class ElggPAM { foreach ($_PAM_HANDLERS[$this->policy] as $k => $v) { $handler = $v->handler; + if (!is_callable($handler)) { + continue; + } + /* @var callable $handler */ + $importance = $v->importance; try { // Execute the handler - $result = $handler($credentials); + // @todo don't assume $handler is a global function + $result = call_user_func($handler, $credentials); if ($result) { $authenticated = true; } elseif ($result === false) { diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 3e43c8e81..c6ce2905f 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -36,8 +36,9 @@ class ElggPlugin extends ElggObject { * @warning Unlike other ElggEntity objects, you cannot null instantiate * ElggPlugin. You must point it to an actual plugin GUID or location. * - * @param mixed $plugin The GUID of the ElggPlugin object or the path of - * the plugin to load. + * @param mixed $plugin The GUID of the ElggPlugin object or the path of the plugin to load. + * + * @throws PluginException */ public function __construct($plugin) { if (!$plugin) { @@ -76,6 +77,8 @@ class ElggPlugin extends ElggObject { // load the rest of the plugin parent::__construct($existing_guid); } + + _elgg_cache_plugin_by_id($this); } /** diff --git a/engine/classes/ElggVolatileMetadataCache.php b/engine/classes/ElggVolatileMetadataCache.php index 24ae58d42..8a33c198d 100644 --- a/engine/classes/ElggVolatileMetadataCache.php +++ b/engine/classes/ElggVolatileMetadataCache.php @@ -279,6 +279,9 @@ class ElggVolatileMetadataCache { ), 'selects' => array('n.string AS name', 'v.string AS value'), 'order_by' => 'n_table.entity_guid, n_table.time_created ASC', + + // @todo don't know why this is necessary + 'wheres' => array(get_access_sql_suffix('n_table')), ); $data = elgg_get_metadata($options); |