diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/plugins/simple_update_states.php | 48 | ||||
-rw-r--r-- | actions/useradd.php | 2 | ||||
-rw-r--r-- | actions/widgets/save.php | 7 |
3 files changed, 7 insertions, 50 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/actions/useradd.php b/actions/useradd.php index be08b4be5..3df41af79 100644 --- a/actions/useradd.php +++ b/actions/useradd.php @@ -37,7 +37,7 @@ try { if ($guid) { $new_user = get_entity($guid); - if (($guid) && ($admin)) { + if ($uew_user && $admin && elgg_is_admin_logged_in()) { $new_user->makeAdmin(); } diff --git a/actions/widgets/save.php b/actions/widgets/save.php index 0a2de0c4d..dad48b30b 100644 --- a/actions/widgets/save.php +++ b/actions/widgets/save.php @@ -16,7 +16,12 @@ $widget = get_entity($guid); if ($widget && $widget->saveSettings($params)) { elgg_set_page_owner_guid($widget->getContainerGUID()); if (!$default_widgets) { - $view = "widgets/$widget->handler/content"; + if (elgg_view_exists("widgets/$widget->handler/content")) { + $view = "widgets/$widget->handler/content"; + } else { + elgg_deprecated_notice("widgets use content as the display view", 1.8); + $view = "widgets/$widget->handler/view"; + } echo elgg_view($view, array('entity' => $widget)); } } else { |