aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-13 22:08:26 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-13 22:08:26 -0700
commit96604b6836edc0ee2f9bfc58fdbaedf19a6f099c (patch)
tree3e5a970928925a533a119d3b07b0ea9444c1b743
parenta11aec8c7b88e78581a5550c059c2cfab099a02d (diff)
downloadelgg-96604b6836edc0ee2f9bfc58fdbaedf19a6f099c.tar.gz
elgg-96604b6836edc0ee2f9bfc58fdbaedf19a6f099c.tar.bz2
Fixes #3917. Removed uses of admin interface in manifests. Removed related code.
-rw-r--r--actions/admin/plugins/simple_update_states.php48
-rw-r--r--documentation/examples/plugins/manifest.xml4
-rw-r--r--engine/classes/ElggPluginManifest.php18
-rw-r--r--engine/classes/ElggPluginManifestParser18.php3
-rw-r--r--engine/lib/admin.php2
-rw-r--r--engine/tests/api/plugins.php5
-rw-r--r--engine/tests/test_files/plugin_18/manifest.xml1
-rw-r--r--languages/en.php5
-rw-r--r--mod/blog/manifest.xml1
-rw-r--r--mod/bookmarks/manifest.xml1
-rw-r--r--mod/categories/manifest.xml1
-rw-r--r--mod/custom_index/manifest.xml1
-rw-r--r--mod/dashboard/manifest.xml3
-rw-r--r--mod/developers/manifest.xml3
-rw-r--r--mod/diagnostics/manifest.xml1
-rw-r--r--mod/embed/manifest.xml1
-rw-r--r--mod/externalpages/manifest.xml1
-rw-r--r--mod/file/manifest.xml1
-rw-r--r--mod/garbagecollector/manifest.xml1
-rw-r--r--mod/groups/manifest.xml1
-rw-r--r--mod/htmlawed/manifest.xml1
-rw-r--r--mod/invitefriends/manifest.xml1
-rw-r--r--mod/likes/manifest.xml3
-rw-r--r--mod/logbrowser/manifest.xml1
-rw-r--r--mod/logrotate/manifest.xml1
-rw-r--r--mod/members/manifest.xml3
-rw-r--r--mod/messageboard/manifest.xml1
-rw-r--r--mod/messages/manifest.xml1
-rw-r--r--mod/notifications/manifest.xml1
-rw-r--r--mod/pages/manifest.xml1
-rw-r--r--mod/profile/manifest.xml1
-rw-r--r--mod/reportedcontent/manifest.xml1
-rw-r--r--mod/search/manifest.xml1
-rw-r--r--mod/tagcloud/manifest.xml1
-rw-r--r--mod/thewire/manifest.xml1
-rw-r--r--mod/tinymce/manifest.xml1
-rw-r--r--mod/twitter/manifest.xml1
-rw-r--r--mod/uservalidationbyemail/manifest.xml1
-rw-r--r--mod/zaudio/manifest.xml1
39 files changed, 4 insertions, 121 deletions
diff --git a/actions/admin/plugins/simple_update_states.php b/actions/admin/plugins/simple_update_states.php
deleted file mode 100644
index 7601013a7..000000000
--- a/actions/admin/plugins/simple_update_states.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * Bulk activate/deactivate for plugins appearing in the "simple" interface.
- *
- * Plugins marked as using the "simple" interface can be activated/deactivated
- * en masse by passing the plugins to activate as an array of their plugin guids
- * in $_REQUEST['enabled_plugins']. All "simple" plugins not in this array will be
- * deactivated.
- *
- * Simplecache and views cache are reset.
- *
- * @uses array $_REQUEST['activated_plugin_guids'] Array of plugin guids to activate.
- *
- * @since 1.8
- * @package Elgg.Core
- * @subpackage Administration.Plugins
- */
-
-$active_plugin_guids = get_input('active_plugin_guids', array());
-$installed_plugins = elgg_get_plugins('any');
-$success = TRUE;
-
-foreach ($installed_plugins as $plugin) {
- // this is only for simple plugins.
- if ($plugin->getManifest()->getAdminInterface() != 'simple') {
- continue;
- }
-
- // only effect changes to plugins not already in that state.
- if ($plugin->isActive() && !in_array($plugin->guid, $active_plugin_guids)) {
- $success = $success && $plugin->deactivate();
- } elseif (!$plugin->isActive() && in_array($plugin->guid, $active_plugin_guids)) {
- $success = $success && $plugin->activate();
- }
-}
-
-if ($success) {
- //system_message(elgg_echo('admin:plugins:simple_simple_success'));
-} else {
- register_error(elgg_echo('admin:plugins:simple_simple_fail'));
-}
-
-// don't regenerate the simplecache because the plugin won't be
-// loaded until next run. Just invalidate and let it regnerate as needed
-elgg_invalidate_simplecache();
-elgg_filepath_cache_reset();
-
-forward(REFERER); \ No newline at end of file
diff --git a/documentation/examples/plugins/manifest.xml b/documentation/examples/plugins/manifest.xml
index 1602a7358..2a8a2bd5c 100644
--- a/documentation/examples/plugins/manifest.xml
+++ b/documentation/examples/plugins/manifest.xml
@@ -32,10 +32,6 @@
<category>admin</category>
<category>api</category>
- <on_enable>setup_function</on_enable>
- <on_disable>teardown_function</on_disable>
- <admin_interface>simple</admin_interface>
-
<requires>
<type>php_extension</type>
<name>gd</name>
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/lib/admin.php b/engine/lib/admin.php
index d12baed50..ae6429baf 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -230,8 +230,6 @@ function admin_init() {
elgg_register_action('admin/delete_admin_notice', '', 'admin');
- elgg_register_action('admin/plugins/simple_update_states', '', 'admin');
-
elgg_register_action('profile/fields/reset', '', 'admin');
elgg_register_action('profile/fields/add', '', 'admin');
elgg_register_action('profile/fields/edit', '', 'admin');
diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php
index 72092b688..8f5f5dd1e 100644
--- a/engine/tests/api/plugins.php
+++ b/engine/tests/api/plugins.php
@@ -105,7 +105,6 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest {
array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => 1.0),
),
- 'admin_interface' => 'simple',
'activate_on_install' => true
);
@@ -265,10 +264,6 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest {
$this->assertEqual($this->manifest17->getConflicts(), array());
}
- public function testElggPluginManifestGetAdminInterface() {
- $this->assertEqual($this->manifest18->getAdminInterface(), 'simple');
- }
-
public function testElggPluginManifestGetActivateOnInstall() {
$this->assertEqual($this->manifest18->getActivateOnInstall(), true);
}
diff --git a/engine/tests/test_files/plugin_18/manifest.xml b/engine/tests/test_files/plugin_18/manifest.xml
index 23f0fa0bf..445a41c2e 100644
--- a/engine/tests/test_files/plugin_18/manifest.xml
+++ b/engine/tests/test_files/plugin_18/manifest.xml
@@ -34,7 +34,6 @@
<category>ServiceAPI</category>
- <admin_interface>simple</admin_interface>
<activate_on_install>true</activate_on_install>
<requires>
diff --git a/languages/en.php b/languages/en.php
index 9967bc34d..67e447901 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -686,12 +686,7 @@ $english = array(
'admin:plugins:plugin_website' => 'Plugin website',
'admin:plugins:author' => '%s',
'admin:plugins:version' => 'Version %s',
- 'admin:plugins:simple' => 'Simple',
- 'admin:plugins:advanced' => 'Advanced',
'admin:plugin_settings' => 'Plugin Settings',
- 'admin:plugins:simple_simple_fail' => 'Could not save settings.',
- 'admin:plugins:simple_simple_success' => 'Settings saved.',
- 'admin:plugins:simple:cannot_activate' => 'Cannot activate this plugin. Check the advanced plugin admin area for more information.',
'admin:plugins:warning:unmet_dependencies_active' => 'This plugin is active but has unmet dependencies. You may encounter problems. See "more info" below for details.',
'admin:plugins:dependencies:type' => 'Type',
diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml
index 991462060..dfbd7a1a6 100644
--- a/mod/blog/manifest.xml
+++ b/mod/blog/manifest.xml
@@ -15,6 +15,5 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>simple</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml
index 72e9af9b0..24969b837 100644
--- a/mod/bookmarks/manifest.xml
+++ b/mod/bookmarks/manifest.xml
@@ -16,5 +16,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>simple</admin_interface>
</plugin_manifest>
diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml
index 15d7192c1..db6f0324f 100644
--- a/mod/categories/manifest.xml
+++ b/mod/categories/manifest.xml
@@ -14,5 +14,4 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml
index 7bb2a2543..dd00f2c49 100644
--- a/mod/custom_index/manifest.xml
+++ b/mod/custom_index/manifest.xml
@@ -12,5 +12,4 @@
<type>elgg_version</type>
<version>2009030702</version>
</requires>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml
index b5e9cff2e..7096fc86a 100644
--- a/mod/dashboard/manifest.xml
+++ b/mod/dashboard/manifest.xml
@@ -12,5 +12,4 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
-</plugin_manifest> \ No newline at end of file
+</plugin_manifest>
diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml
index 4a7ed82bd..25840e164 100644
--- a/mod/developers/manifest.xml
+++ b/mod/developers/manifest.xml
@@ -15,7 +15,4 @@
<type>elgg_version</type>
<version>2009030802</version>
</requires>
-
- <admin_interface>advanced</admin_interface>
-
</plugin_manifest>
diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml
index e85b19aef..5ebd7cf55 100644
--- a/mod/diagnostics/manifest.xml
+++ b/mod/diagnostics/manifest.xml
@@ -14,5 +14,4 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml
index 02c012330..27e9b9ada 100644
--- a/mod/embed/manifest.xml
+++ b/mod/embed/manifest.xml
@@ -18,5 +18,4 @@
<name>file</name>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml
index 32528585d..4064ea602 100644
--- a/mod/externalpages/manifest.xml
+++ b/mod/externalpages/manifest.xml
@@ -12,5 +12,4 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml
index aac9c3f6b..8a80e38dc 100644
--- a/mod/file/manifest.xml
+++ b/mod/file/manifest.xml
@@ -14,6 +14,5 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>simple</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml
index 466e49d61..0da71cd6b 100644
--- a/mod/garbagecollector/manifest.xml
+++ b/mod/garbagecollector/manifest.xml
@@ -14,5 +14,4 @@
<version>2009030702</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml
index 4188aa861..542e9de01 100644
--- a/mod/groups/manifest.xml
+++ b/mod/groups/manifest.xml
@@ -15,5 +15,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>simple</admin_interface>
</plugin_manifest>
diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml
index 0c48bbd28..b176834e5 100644
--- a/mod/htmlawed/manifest.xml
+++ b/mod/htmlawed/manifest.xml
@@ -14,5 +14,4 @@
<version>2009041701</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml
index e02c19c36..75a2d17f2 100644
--- a/mod/invitefriends/manifest.xml
+++ b/mod/invitefriends/manifest.xml
@@ -13,6 +13,5 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml
index f63c643a6..946cfd86b 100644
--- a/mod/likes/manifest.xml
+++ b/mod/likes/manifest.xml
@@ -14,5 +14,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
-</plugin_manifest> \ No newline at end of file
+</plugin_manifest>
diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml
index 585288912..846ad155a 100644
--- a/mod/logbrowser/manifest.xml
+++ b/mod/logbrowser/manifest.xml
@@ -14,5 +14,4 @@
<version>2009030702</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml
index ab6250ac0..503bf6cd1 100644
--- a/mod/logrotate/manifest.xml
+++ b/mod/logrotate/manifest.xml
@@ -14,5 +14,4 @@
<version>2009030702</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml
index b96684198..f5e95eb41 100644
--- a/mod/members/manifest.xml
+++ b/mod/members/manifest.xml
@@ -13,5 +13,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
-</plugin_manifest> \ No newline at end of file
+</plugin_manifest>
diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml
index 25c42ee93..5881c4e46 100644
--- a/mod/messageboard/manifest.xml
+++ b/mod/messageboard/manifest.xml
@@ -14,5 +14,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>simple</admin_interface>
</plugin_manifest>
diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml
index 66ca4b444..30acc240d 100644
--- a/mod/messages/manifest.xml
+++ b/mod/messages/manifest.xml
@@ -14,5 +14,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>simple</admin_interface>
</plugin_manifest>
diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml
index 16a67cb00..97b88fb75 100644
--- a/mod/notifications/manifest.xml
+++ b/mod/notifications/manifest.xml
@@ -12,6 +12,5 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml
index 4b5e5c747..a91881cab 100644
--- a/mod/pages/manifest.xml
+++ b/mod/pages/manifest.xml
@@ -14,6 +14,5 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>simple</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml
index d811e373b..a1cff4dc2 100644
--- a/mod/profile/manifest.xml
+++ b/mod/profile/manifest.xml
@@ -10,7 +10,6 @@
<copyright>See COPYRIGHT.txt</copyright>
<license>GNU Public License Version 2</license>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
<requires>
<type>elgg_version</type>
<version>2011010401</version>
diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml
index c51134608..d65b55ca3 100644
--- a/mod/reportedcontent/manifest.xml
+++ b/mod/reportedcontent/manifest.xml
@@ -13,5 +13,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml
index 053e22178..b13e127d0 100644
--- a/mod/search/manifest.xml
+++ b/mod/search/manifest.xml
@@ -13,5 +13,4 @@
<version>2009030702</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml
index 6fcad14e2..7c64829fc 100644
--- a/mod/tagcloud/manifest.xml
+++ b/mod/tagcloud/manifest.xml
@@ -13,5 +13,4 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml
index 27dd5732d..74e811bed 100644
--- a/mod/thewire/manifest.xml
+++ b/mod/thewire/manifest.xml
@@ -13,6 +13,5 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>simple</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml
index 5e69055d8..2d062d399 100644
--- a/mod/tinymce/manifest.xml
+++ b/mod/tinymce/manifest.xml
@@ -14,5 +14,4 @@
<version>2010030101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml
index bd7176620..ffb6ccc05 100644
--- a/mod/twitter/manifest.xml
+++ b/mod/twitter/manifest.xml
@@ -13,5 +13,4 @@
<type>elgg_version</type>
<version>2010030101</version>
</requires>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml
index df0a7cb58..3358e1119 100644
--- a/mod/uservalidationbyemail/manifest.xml
+++ b/mod/uservalidationbyemail/manifest.xml
@@ -14,5 +14,4 @@
<version>2009033101</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>
diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml
index ecbff85fe..423a7e863 100644
--- a/mod/zaudio/manifest.xml
+++ b/mod/zaudio/manifest.xml
@@ -15,5 +15,4 @@
<version>2010111501</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
</plugin_manifest>