aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/admin.php8
-rw-r--r--views/default/object/plugin/advanced.php5
2 files changed, 8 insertions, 5 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 5528a29cc..8016a2fd6 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -325,7 +325,9 @@ function elgg_admin_add_plugin_settings_menu() {
foreach ($active_plugins as $plugin) {
$plugin_id = $plugin->getID();
- if (elgg_view_exists("settings/$plugin_id/edit")) {
+ $settings_view_old = 'settings/' . $plugin_id . '/edit';
+ $settings_view_new = 'plugins/' . $plugin_id . '/settings';
+ if (elgg_view_exists($settings_view_new) || elgg_view_exists($settings_view_old)) {
elgg_register_menu_item('page', array(
'name' => $plugin_id,
'href' => "admin/plugin_settings/$plugin_id",
@@ -413,8 +415,8 @@ function admin_settings_page_handler($page) {
$vars = array('page' => $page);
// special page for plugin settings since we create the form for them
- if ($page[0] == 'plugin_settings' && isset($page[1])
- && elgg_view_exists("settings/{$page[1]}/edit")) {
+ if ($page[0] == 'plugin_settings' && isset($page[1]) &&
+ (elgg_view_exists("settings/{$page[1]}/edit") || elgg_view_exists("plugins/{$page[1]}/settings"))) {
$view = 'admin/plugin_settings';
$plugin = elgg_get_plugin_from_id($page[1]);
diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php
index 4c8bc8c17..9aed4163c 100644
--- a/views/default/object/plugin/advanced.php
+++ b/views/default/object/plugin/advanced.php
@@ -182,8 +182,9 @@ if ($files) {
</div>
<div class="elgg-body">
<?php
-$settings_view = 'settings/' . $plugin->getID() . '/edit';
-if (elgg_view_exists($settings_view)) {
+$settings_view_old = 'settings/' . $plugin->getID() . '/edit';
+$settings_view_new = 'plugins/' . $plugin->getID() . '/settings';
+if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new)) {
$link = elgg_get_site_url() . "admin/plugin_settings/" . $plugin->getID();
$settings_link = "<a class='plugin_settings small link' href='$link'>[" . elgg_echo('settings') . "]</a>";
}