Media: Prevent Multisite fatal error in legacy file rewrites.

Removes a call to the `is_super_admin()` function in `ms-files.php` as the function isn't available when using the `SHORTINIT` feature, causing fatal errors on systems using file rewrites.

Reverts [59967].

Reviewed by jorbin.
Merges [60170] to the 6.8 branch.

Props audrasjb, desrosj, jeremyfelt, johnjamesjacoby, jorbin, presskopp, verygoode, dd32, joemcgill.
See #36803.
Fixes #63285.

Built from https://develop.svn.wordpress.org/branches/6.8@60171


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson
2025-04-16 22:23:29 +00:00
parent 7cf35fdc15
commit 0d5205144d
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ if ( ! is_multisite() ) {
ms_file_constants();
if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) {
if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) {
status_header( 404 );
die( '404 — File not found.' );
}

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8.1-alpha-60169';
$wp_version = '6.8.1-alpha-60171';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.