summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-admin/plugin-editor.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-inst/wp-admin/plugin-editor.php')
-rw-r--r--wp-inst/wp-admin/plugin-editor.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/wp-inst/wp-admin/plugin-editor.php b/wp-inst/wp-admin/plugin-editor.php
index 16de1cf..4811574 100644
--- a/wp-inst/wp-admin/plugin-editor.php
+++ b/wp-inst/wp-admin/plugin-editor.php
@@ -34,9 +34,8 @@ switch($action) {
case 'update':
- if ($user_level < 5) {
+ if ( !current_user_can('edit_plugins') )
die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
- }
$newcontent = stripslashes($_POST['newcontent']);
if (is_writeable($real_file)) {
@@ -55,9 +54,8 @@ break;
default:
require_once('admin-header.php');
- if ($user_level <= 5) {
+ if ( !current_user_can('edit_plugins') )
die(__('<p>You have do not have sufficient permissions to edit plugins for this blog.</p>'));
- }
update_recently_edited("wp-content/plugins/$file");