mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 12:29:53 +01:00
Media: Allow super-admin to access files of archived sites.
This changeset fixes an issue in multisite installations where archived sites remain accessible to network administrators, but the associated files do not. The previous implementation was checking if the blog is archived, marked as spam, or deleted, to subsequently return a 404 error for file requests. However, this did not account for network administrators who should retain access to these files. Props antwortzeit, jeremyfelt, debarghyabanerjee, audrasjb. Fixes #36803. git-svn-id: https://develop.svn.wordpress.org/trunk@59967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
173ee18cca
commit
16ee79bf24
@ -20,7 +20,7 @@ if ( ! is_multisite() ) {
|
||||
|
||||
ms_file_constants();
|
||||
|
||||
if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) {
|
||||
if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) {
|
||||
status_header( 404 );
|
||||
die( '404 — File not found.' );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user