Cap migration.

git-svn-id: https://develop.svn.wordpress.org/trunk@2720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-07-17 19:29:55 +00:00
parent 21a150eefa
commit 268fc9f7a1
10 changed files with 16 additions and 36 deletions

View File

@@ -5,13 +5,10 @@ $title = 'Upload Image or File';
require_once('admin-header.php');
if ($user_level == 0) //Checks to see if user has logged in
die (__("Cheatin' uh ?"));
if (!get_settings('use_fileupload')) //Checks if file upload is enabled in the config
die (__("The admin disabled this function"));
if ( !get_settings('fileupload_minlevel') )
if ( ! current_user_can('upload_files') )
die (__("You are not allowed to upload files"));
$allowed_types = explode(' ', trim(strtolower(get_settings('fileupload_allowedtypes'))));