WordPress.org

Make WordPress Core

Changeset 7396


Ignore:
Timestamp:
03/19/2008 06:18:05 AM (14 years ago)
Author:
ryan
Message:

Disable flash uploader if mac and mod_security is enabled. Props andy. fixes #6278

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r7384 r7396  
    779779    $flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php";
    780780
     781    // If Mac and mod_security, no Flash. :(
     782    if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && 'on' == strtolower(apache_getenv('MODSEC_ENABLE')) )
     783        $flash = false;
     784    else
     785        $flash = true;
     786
    781787    $post_id = intval($_REQUEST['post_id']);
    782788
     
    788794<?php } ?>
    789795</div>
     796<?php if ( $flash ) : ?>
    790797<script type="text/javascript">
    791798<!--
     
    829836</div>
    830837
     838<?php endif; // $flash ?>
     839
    831840<div id="html-upload-ui">
    832841    <p>
Note: See TracChangeset for help on using the changeset viewer.