diff options
Diffstat (limited to 'engine/classes')
-rw-r--r-- | engine/classes/ElggAnnotation.php | 2 | ||||
-rw-r--r-- | engine/classes/ElggMenuItem.php | 4 | ||||
-rw-r--r-- | engine/classes/ElggPlugin.php | 22 | ||||
-rw-r--r-- | engine/classes/ElggPluginManifest.php | 18 | ||||
-rw-r--r-- | engine/classes/ElggPluginManifestParser18.php | 3 | ||||
-rw-r--r-- | engine/classes/ElggPluginPackage.php | 4 | ||||
-rw-r--r-- | engine/classes/ElggPriorityList.php | 2 | ||||
-rw-r--r-- | engine/classes/ElggSite.php | 3 |
8 files changed, 24 insertions, 34 deletions
diff --git a/engine/classes/ElggAnnotation.php b/engine/classes/ElggAnnotation.php index 78d29ee7f..511b5151f 100644 --- a/engine/classes/ElggAnnotation.php +++ b/engine/classes/ElggAnnotation.php @@ -78,7 +78,7 @@ class ElggAnnotation extends ElggExtender { * @return bool */ function delete() { - remove_from_river_by_annotation($this->id); + elgg_delete_river(array('annotation_id' => $this->id)); return elgg_delete_metastring_based_object_by_id($this->id, 'annotations'); } diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php index b9c81fd78..8ddb1ecd8 100644 --- a/engine/classes/ElggMenuItem.php +++ b/engine/classes/ElggMenuItem.php @@ -549,6 +549,10 @@ class ElggMenuItem { } } + if (!isset($vars['rel']) && !isset($vars['is_trusted'])) { + $vars['is_trusted'] = true; + } + if ($this->confirm) { $vars['confirm'] = $this->confirm; return elgg_view('output/confirmlink', $vars); diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 4aee1e898..c4d6ec034 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -264,8 +264,6 @@ class ElggPlugin extends ElggObject { /** * Returns a plugin setting * - * @todo These need to be namespaced - * * @param string $name The setting name * @return mixed */ @@ -318,7 +316,6 @@ class ElggPlugin extends ElggObject { * Set a plugin setting for the plugin * * @todo This will only work once the plugin has a GUID. - * @todo These need to be namespaced. * * @param string $name The name to set * @param string $value The value to set @@ -329,13 +326,6 @@ class ElggPlugin extends ElggObject { if (!$this->guid) { return false; } - // Hook to validate setting - $value = elgg_trigger_plugin_hook('setting', 'plugin', array( - 'plugin_id' => $this->pluginID, - 'plugin' => $this, - 'name' => $name, - 'value' => $value - ), $value); return $this->set($name, $value); } @@ -902,7 +892,9 @@ class ElggPlugin extends ElggObject { } /** - * Save a value to private settings. + * Save a value as private setting or attribute. + * + * Attributes include title and description. * * @param string $name Name * @param mixed $value Value @@ -920,6 +912,14 @@ class ElggPlugin extends ElggObject { return true; } else { + // Hook to validate setting + $value = elgg_trigger_plugin_hook('setting', 'plugin', array( + 'plugin_id' => $this->pluginID, + 'plugin' => $this, + 'name' => $name, + 'value' => $value + ), $value); + return $this->setPrivateSetting($name, $value); } } diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 0e47f388d..eacc16455 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -555,24 +555,6 @@ class ElggPluginManifest { /** * Returns the admin interface to use. * - * @return string simple or advanced - */ - public function getAdminInterface() { - $interface = $this->parser->getAttribute('admin_interface'); - - switch ($interface) { - case 'simple': - case 'advanced': - return $interface; - - default: - return 'advanced'; - } - } - - /** - * Returns the admin interface to use. - * * @return bool */ public function getActivateOnInstall() { diff --git a/engine/classes/ElggPluginManifestParser18.php b/engine/classes/ElggPluginManifestParser18.php index db8b3dc6a..554e28c02 100644 --- a/engine/classes/ElggPluginManifestParser18.php +++ b/engine/classes/ElggPluginManifestParser18.php @@ -16,7 +16,7 @@ class ElggPluginManifestParser18 extends ElggPluginManifestParser { 'name', 'author', 'version', 'blurb', 'description', 'website', 'copyright', 'license', 'requires', 'suggests', 'screenshot', 'category', 'conflicts', 'provides', - 'admin_interface', 'activate_on_install' + 'activate_on_install' ); /** @@ -46,7 +46,6 @@ class ElggPluginManifestParser18 extends ElggPluginManifestParser { case 'website': case 'copyright': case 'license': - case 'admin_interface': case 'activate_on_install': $parsed[$element->name] = $element->content; break; diff --git a/engine/classes/ElggPluginPackage.php b/engine/classes/ElggPluginPackage.php index 145f71fcd..d240af477 100644 --- a/engine/classes/ElggPluginPackage.php +++ b/engine/classes/ElggPluginPackage.php @@ -33,7 +33,9 @@ class ElggPluginPackage { */ private $textFiles = array( 'README.txt', 'CHANGES.txt', - 'INSTALL.txt', 'COPYRIGHT.txt', 'LICENSE.txt' + 'INSTALL.txt', 'COPYRIGHT.txt', 'LICENSE.txt', + + 'README', 'README.md', 'README.markdown' ); /** diff --git a/engine/classes/ElggPriorityList.php b/engine/classes/ElggPriorityList.php index aa33831ff..8a3b836a8 100644 --- a/engine/classes/ElggPriorityList.php +++ b/engine/classes/ElggPriorityList.php @@ -303,7 +303,7 @@ class ElggPriorityList */ public function rewind() { $this->sortIfUnsorted(); - return rewind($this->elements); + return reset($this->elements); } /** diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php index 40bfca060..8708800cf 100644 --- a/engine/classes/ElggSite.php +++ b/engine/classes/ElggSite.php @@ -371,6 +371,7 @@ class ElggSite extends ElggEntity { elgg_register_plugin_hook_handler('index', 'system', 'elgg_walled_garden_index', 1); if (!$this->isPublicPage()) { + $_SESSION['last_forward_from'] = current_page_url(); register_error(elgg_echo('loggedinrequired')); forward(); } @@ -413,6 +414,8 @@ class ElggSite extends ElggEntity { 'resetpassword', 'action/user/requestnewpassword', 'action/user/passwordreset', + 'action/security/refreshtoken', + 'ajax/view/js/languages', 'upgrade\.php', 'xml-rpc\.php', 'mt/mt-xmlrpc\.cgi', |