WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#371 closed defect (bug) (fixed)

Test for upload enabled in every iteration of loop

Reported by: nickromney Owned by: matt
Milestone: Priority: normal
Severity: trivial Version:
Component: Administration Keywords:
Focuses: Cc:

Description

In wp-admin/menu.php, in the foreach ($menu as $item) loop, lines 56-59 test for the upload condition.

It would be easier to test for it when specifying the array in line 17:

Replace:
$menu[45] = array(('Upload'), get_settings('fileupload_minlevel'), 'upload.php');

with:

if ((get_settings('use_fileupload') && ($user_level >= get_settings('fileupload_minlevel')))) {
$menu[45] = array(('Upload'), get_settings('fileupload_minlevel'), 'upload.php');
}

Change History (2)

comment:2 @matt11 years ago

  • fixed_in_version set to 1.3
  • Owner changed from anonymous to matt
  • Resolution changed from 10 to 20
  • Status changed from new to closed

Good idea.

Note: See TracTickets for help on using tickets.