Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/02/2018 02:06:07 AM (8 years ago)
Author:
r-a-y
Message:

Attachments: Fix uploading for those on Windows/WAMP installs.

Props andrewteg, r-a-y.

Fixes #7674 (2.9-branch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/src/bp-core/bp-core-attachments.php

    r11820 r11873  
    266266
    267267        // Make sure the file path is safe.
    268         if ( 0 !== validate_file( $r['image'] ) ) {
     268        if ( 1 === validate_file( $r['image'] ) ) {
    269269                return false;
    270270        }
     
    448448        $type_dir    = trailingslashit( $bp_attachments_uploads_dir['basedir'] ) . $type_subdir;
    449449
    450         if ( 0 !== validate_file( $type_dir ) || ! is_dir( $type_dir ) ) {
     450        if ( 1 === validate_file( $type_dir ) || ! is_dir( $type_dir ) ) {
    451451                return $attachment_data;
    452452        }
     
    13151315        $cover_dir    = trailingslashit( $bp_attachments_uploads_dir['basedir'] ) . $cover_subdir;
    13161316
    1317         if ( 0 !== validate_file( $cover_dir ) || ! is_dir( $cover_dir ) ) {
     1317        if ( 1 === validate_file( $cover_dir ) || ! is_dir( $cover_dir ) ) {
    13181318                // Upload error response.
    13191319                bp_attachments_json_response( false, $is_html4, array(
Note: See TracChangeset for help on using the changeset viewer.