aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-19 23:42:41 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-19 23:42:41 +0000
commit7ee9c7cacbe5da9ecc8c5bb8d3ba51be3ce1d30a (patch)
treec2edb606412996b5ef1a0222ea6039014bc1c8c8 /engine
parent81d6884ecad771f4b4f2d8be7572d1a89deaab10 (diff)
downloadelgg-7ee9c7cacbe5da9ecc8c5bb8d3ba51be3ce1d30a.tar.gz
elgg-7ee9c7cacbe5da9ecc8c5bb8d3ba51be3ce1d30a.tar.bz2
Fixes #3163 plugin/<plugin id>/settings.php is now the preferred way to add settings plugins
git-svn-id: http://code.elgg.org/elgg/trunk@9101 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/admin.php8
1 files changed, 5 insertions, 3 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]);