Make WordPress Core

Opened 22 years ago

Closed 22 years ago

Last modified 17 years ago

#371 closed defect (bug) (fixed)

Test for upload enabled in every iteration of loop

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

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)

#2 @matt
22 years ago

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

Good idea.

Note: See TracTickets for help on using tickets.