aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 07:29:37 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 07:29:37 +0000
commit953fdd3e112f40fe74cc5ac53ad8efd6a57550d3 (patch)
tree216796db3ebc66e1a5f342d45171d79b00892f51
parent9ac2ca3377d4e8271a9a7718f7715e043aeb2de1 (diff)
downloadelgg-953fdd3e112f40fe74cc5ac53ad8efd6a57550d3.tar.gz
elgg-953fdd3e112f40fe74cc5ac53ad8efd6a57550d3.tar.bz2
Deprecated (user)settings/$plugin_id/edit in favor of plugins/$plugin_id/(user)settings
git-svn-id: http://code.elgg.org/elgg/trunk@8421 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/default/admin/plugin_settings.php3
-rw-r--r--views/default/core/settings/tools.php12
-rw-r--r--views/default/forms/plugins/settings/save.php7
3 files changed, 16 insertions, 6 deletions
diff --git a/views/default/admin/plugin_settings.php b/views/default/admin/plugin_settings.php
index c2801cec3..7473768c0 100644
--- a/views/default/admin/plugin_settings.php
+++ b/views/default/admin/plugin_settings.php
@@ -14,8 +14,9 @@ $plugin_id = $plugin->getID();
// required for plugin settings backward compatibility
$vars['entity'] = $plugin;
-if (elgg_view_exists("settings/$plugin_id/edit")) {
+$settings = false;
+if (elgg_view_exists("settings/$plugin_id/edit") || elgg_view_exists("plugins/$plugin_id/settings")) {
$title = $plugin->manifest->getName();
$params = array('id' => "$plugin_id-settings");
diff --git a/views/default/core/settings/tools.php b/views/default/core/settings/tools.php
index 3836b7ef1..ff02c9183 100644
--- a/views/default/core/settings/tools.php
+++ b/views/default/core/settings/tools.php
@@ -25,9 +25,13 @@ $count = count($installed_plugins);
// Display all plugins' usersettings forms
foreach ($installed_plugins as $plugin) {
$plugin_id = $plugin->getID();
- if ($plugin->isActive() && elgg_view_exists("usersettings/$plugin_id/edit")) {
- $title = $plugin->manifest->getName();
- $body = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin));
- echo elgg_view_module('info', $title, $body);
+ if ($plugin->isActive()) {
+ if (elgg_view_exists("usersettings/$plugin_id/edit")
+ || elgg_view_exists("plugins/$plugin_id/usersettings")) {
+
+ $title = $plugin->manifest->getName();
+ $body = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin));
+ echo elgg_view_module('info', $title, $body);
+ }
}
} \ No newline at end of file
diff --git a/views/default/forms/plugins/settings/save.php b/views/default/forms/plugins/settings/save.php
index 5125f3142..efe6d7792 100644
--- a/views/default/forms/plugins/settings/save.php
+++ b/views/default/forms/plugins/settings/save.php
@@ -17,7 +17,12 @@ if ($type != 'user') {
$type = '';
}
-echo elgg_view("{$type}settings/$plugin_id/edit", $vars);
+if (elgg_view_exists("{$type}settings/$plugin_id/edit")) {
+ elgg_deprecated_notice("{$type}settings/$plugin_id/edit was deprecated in favor of plugins/$plugin_id/{$type}settings", 1.8);
+ echo elgg_view("{$type}settings/$plugin_id/edit", $vars);
+} else {
+ echo elgg_view("plugins/$plugin_id/{$type}settings", $vars);
+}
echo "<div>";
echo elgg_view('input/hidden', array('name' => 'plugin_id', 'value' => $plugin_id));